當前位置: 首頁>>代碼示例>>Java>>正文


Java BasicDiagnostic.toDiagnostic方法代碼示例

本文整理匯總了Java中org.eclipse.emf.common.util.BasicDiagnostic.toDiagnostic方法的典型用法代碼示例。如果您正苦於以下問題:Java BasicDiagnostic.toDiagnostic方法的具體用法?Java BasicDiagnostic.toDiagnostic怎麽用?Java BasicDiagnostic.toDiagnostic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.emf.common.util.BasicDiagnostic的用法示例。


在下文中一共展示了BasicDiagnostic.toDiagnostic方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (MetamodelViewsRepository.Poisson.Properties.interval == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getPoisson_Interval().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getPoisson_Interval().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:26,代碼來源:PoissonPropertiesEditionComponent.java

示例2: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (MetamodelViewsRepository.Scalar.Properties.value == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getScalar_Value().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getScalar_Value().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:26,代碼來源:ScalarPropertiesEditionComponent.java

示例3: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (AnalysisViewsRepository.RequiredProtectionParameter.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:26,代碼來源:RequiredProtectionParameterPropertiesEditionComponent.java

示例4: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (HrmViewsRepository.Timing.TimingProperties.timings == event.getAffectedEditor()) {
				BasicDiagnostic chain = new BasicDiagnostic();
				for (Iterator iterator = ((List)event.getNewValue()).iterator(); iterator.hasNext();) {
					chain.add(Diagnostician.INSTANCE.validate(HrmPackage.eINSTANCE.getHardwareMemory_Timings().getEAttributeType(), iterator.next()));
				}
				ret = chain;
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:26,代碼來源:HardwareMemoryTimingPropertiesEditionComponent.java

示例5: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (HrmViewsRepository.Other.Properties.instWidth == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(HrmPackage.eINSTANCE.getHardwareIsa_InstWidth().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(HrmPackage.eINSTANCE.getHardwareIsa_InstWidth().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:26,代碼來源:HardwareIsaOtherPropertiesEditionComponent.java

示例6: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (GrmViewsRepository.Timing.TimingProperties.execTime == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getUsageTypedAmount_ExecTime().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getUsageTypedAmount_ExecTime().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:26,代碼來源:UsageTypedAmountTimingPropertiesEditionComponent.java

示例7: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
			if (AnalysisViewsRepository.ProtectionProtocol.Properties.protocolName == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getProtectionProtocol_ProtocolName().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getProtectionProtocol_ProtocolName().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:26,代碼來源:ProtectionProtocolPropertiesEditionComponent.java

示例8: validateValue

import org.eclipse.emf.common.util.BasicDiagnostic; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public Diagnostic validateValue(IPropertiesEditionEvent event) {
	Diagnostic ret = Diagnostic.OK_INSTANCE;
	if (event.getNewValue() != null) {
		try {
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
開發者ID:polarsys,項目名稱:time4sys,代碼行數:19,代碼來源:MemoryPartitionTimingPropertiesEditionComponent.java


注:本文中的org.eclipse.emf.common.util.BasicDiagnostic.toDiagnostic方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。