当前位置: 首页>>代码示例>>Java>>正文


Java EEFConverterUtil类代码示例

本文整理汇总了Java中org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil的典型用法代码示例。如果您正苦于以下问题:Java EEFConverterUtil类的具体用法?Java EEFConverterUtil怎么用?Java EEFConverterUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

EEFConverterUtil类属于org.eclipse.emf.eef.runtime.impl.utils包,在下文中一共展示了EEFConverterUtil类的37个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	SoftwareTimerResource softwareTimerResource = (SoftwareTimerResource)semanticObject;
	if (SrmViewsRepository.Timing.Properties.duration == event.getAffectedEditor()) {
		softwareTimerResource.setDuration((EEFConverterUtil.createFloatFromString(EcorePackage.Literals.EFLOAT, (String)event.getNewValue())));
	}
	if (SrmViewsRepository.Timing.Properties.isPeriodic == event.getAffectedEditor()) {
		softwareTimerResource.setIsPeriodic((Boolean)event.getNewValue());
	}
	if (SrmViewsRepository.Timing.Properties.durationElements == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.SET) {
			softwareTimerResource.getDurationElements().clear();
			softwareTimerResource.getDurationElements().addAll(((EList) event.getNewValue()));
		}
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:SoftwareTimerResourceTimingPropertiesEditionComponent.java


示例2: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final Gaussian gaussian = (Gaussian)elt;
		final GaussianPropertiesEditionPart basePart = (GaussianPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(MetamodelViewsRepository.Gaussian.Properties.location)) {
			basePart.setLocation(EEFConverterUtil.convertToString(EcorePackage.Literals.EDOUBLE, gaussian.getLocation()));
		}
		
		if (isAccessible(MetamodelViewsRepository.Gaussian.Properties.scale))
			basePart.setScale(EEFConverterUtil.convertToString(MetamodelPackage.Literals.POSITIVE_DOUBLE_NOT_NULL, gaussian.getScale()));
		
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:33,代码来源:GaussianPropertiesEditionComponent.java


示例3: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (SrmViewsRepository.Timing.Properties.accessPolicy == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(SrmPackage.eINSTANCE.getDeviceBroker_AccessPolicy().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(SrmPackage.eINSTANCE.getDeviceBroker_AccessPolicy().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:DeviceBrokerTimingPropertiesEditionComponent.java


示例4: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.ResultContainer.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,代码来源:ResultContainerPropertiesEditionComponent.java


示例5: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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


示例6: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.General.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.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,代码来源:HardwareServicePropertiesEditionComponent.java


示例7: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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


示例8: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.Model.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(MetamodelPackage.eINSTANCE.getModel_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(MetamodelPackage.eINSTANCE.getModel_Name().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:26,代码来源:ModelPropertiesEditionComponent.java


示例9: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final Query query = (Query)elt;
		final QueryPropertiesEditionPart basePart = (QueryPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(MetamodelViewsRepository.Query.Properties.name))
			basePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, query.getName()));
		
		if (isAccessible(MetamodelViewsRepository.Query.Properties.value))
			basePart.setValue(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, query.getValue()));
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:31,代码来源:QueryPropertiesEditionComponent.java


示例10: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final ResourceService resourceService = (ResourceService)elt;
		final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(GrmViewsRepository.General.Properties.name))
			generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourceService.getName()));
		
		// init filters
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:ResourceServicePropertiesEditionComponent.java


示例11: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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


示例12: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.General.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.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,代码来源:ResourceServicePropertiesEditionComponent.java


示例13: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final ResourcePort resourcePort = (ResourcePort)elt;
		final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(GrmViewsRepository.General.Properties.name))
			generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourcePort.getName()));
		
		if (isAccessible(GrmViewsRepository.General.Properties.packetSize)) {
			generalPart.setPacketSize(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, resourcePort.getPacketSize()));
		}
		
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:ResourcePortGeneralPropertiesEditionComponent.java


示例14: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	UsageDemand usageDemand = (UsageDemand)semanticObject;
	if (GrmViewsRepository.General.Properties.usage == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.ADD) {
			if (event.getNewValue() instanceof ResourceUsage) {
				usageSettings.addToReference((EObject) event.getNewValue());
			}
		} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
			usageSettings.removeFromReference((EObject) event.getNewValue());
		} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
			usageSettings.move(event.getNewIndex(), (ResourceUsage) event.getNewValue());
		}
	}
	if (GrmViewsRepository.General.Properties.event == event.getAffectedEditor()) {
		usageDemand.setEvent((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:23,代码来源:UsageDemandPropertiesEditionComponent.java


示例15: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.General.Properties.event == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getUsageDemand_Event().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.eINSTANCE.getUsageDemand_Event().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:UsageDemandPropertiesEditionComponent.java


示例16: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	ResourceInstance resourceInstance = (ResourceInstance)semanticObject;
	if (GrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
		resourceInstance.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
	if (GrmViewsRepository.General.Properties.type == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.SET) {
			typeSettings.setToReference((Resource)event.getNewValue());
		} else if (event.getKind() == PropertiesEditionEvent.ADD) {
			EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, typeSettings, editingContext.getAdapterFactory());
			PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
			if (provider != null) {
				PropertiesEditingPolicy policy = provider.getPolicy(context);
				if (policy instanceof CreateEditingPolicy) {
					policy.execute();
				}
			}
		}
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:ResourceInstancePropertiesEditionComponent.java


示例17: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * @generated
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final ResourceProtectionParameterValue resourceProtectionParameterValue = (ResourceProtectionParameterValue)elt;
		final ResourceProtectionParameterValuePropertiesEditionPart basePart = (ResourceProtectionParameterValuePropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.name))
			basePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourceProtectionParameterValue.getName()));
		
		if (isAccessible(AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.value))
			basePart.setValue(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, resourceProtectionParameterValue.getValue()));
		
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:32,代码来源:ResourceProtectionParameterValuePropertiesEditionComponent.java


示例18: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	ResultContainer resultContainer = (ResultContainer)semanticObject;
	if (AnalysisViewsRepository.ResultContainer.Properties.name == event.getAffectedEditor()) {
		resultContainer.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
	if (AnalysisViewsRepository.ResultContainer.Properties.analyzedSystem == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.SET) {
			analyzedSystemSettings.setToReference((AnalyzedSystem)event.getNewValue());
		} else if (event.getKind() == PropertiesEditionEvent.ADD) {
			AnalyzedSystem eObject = AnalysisFactory.eINSTANCE.createAnalyzedSystem();
			EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
			PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
			if (provider != null) {
				PropertiesEditingPolicy policy = provider.getPolicy(context);
				if (policy != null) {
					policy.execute();
				}
			}
			analyzedSystemSettings.setToReference(eObject);
		}
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:ResultContainerPropertiesEditionComponent.java


示例19: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final TimerResource timerResource = (TimerResource)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(GrmViewsRepository.Timing.TimingProperties.duration)) {
			timingPart.setDuration(EEFConverterUtil.convertToString(EcorePackage.Literals.EFLOAT, timerResource.getDuration()));
		}
		
		// init filters
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:29,代码来源:TimerResourceTimingPropertiesEditionComponent.java


示例20: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.OutputPort.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,代码来源:OutputPortPropertiesEditionComponent.java


示例21: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * @generated
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	RequiredProtectionParameter requiredProtectionParameter = (RequiredProtectionParameter)semanticObject;
	if (AnalysisViewsRepository.RequiredProtectionParameter.Properties.name == event.getAffectedEditor()) {
		requiredProtectionParameter.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
	if (AnalysisViewsRepository.RequiredProtectionParameter.Properties.parent_ == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.SET) {
			parent_Settings.setToReference((ProtectionProtocol)event.getNewValue());
		} else if (event.getKind() == PropertiesEditionEvent.ADD) {
			ProtectionProtocol eObject = AnalysisFactory.eINSTANCE.createProtectionProtocol();
			EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
			PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
			if (provider != null) {
				PropertiesEditingPolicy policy = provider.getPolicy(context);
				if (policy != null) {
					policy.execute();
				}
			}
			parent_Settings.setToReference(eObject);
		}
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:RequiredProtectionParameterPropertiesEditionComponent.java


示例22: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwarePin hardwarePin = (HardwarePin)elt;
		final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.General.Properties.name))
			generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, hardwarePin.getName()));
		
		// init filters
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:HardwarePinGeneralPropertiesEditionComponent.java


示例23: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.ProtectionParameterValue.Properties.value == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(AnalysisPackage.eINSTANCE.getProtectionParameterValue_Value().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(AnalysisPackage.eINSTANCE.getProtectionParameterValue_Value().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:ProtectionParameterValuePropertiesEditionComponent.java


示例24: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (SrmViewsRepository.Timing.Properties.accessPolicy == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(SrmPackage.eINSTANCE.getMemoryBroker_AccessPolicy().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(SrmPackage.eINSTANCE.getMemoryBroker_AccessPolicy().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:MemoryBrokerTimingPropertiesEditionComponent.java


示例25: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (SrmViewsRepository.General.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.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,代码来源:SoftwareResourcePackagePropertiesEditionComponent.java


示例26: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	ExecutionStep executionStep = (ExecutionStep)semanticObject;
	if (GqamViewsRepository.Timing.TimingProperties.respTime == event.getAffectedEditor()) {
		executionStep.setRespTime((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.bestCET == event.getAffectedEditor()) {
		executionStep.setBestCET((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.worstCET == event.getAffectedEditor()) {
		executionStep.setWorstCET((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.blockingTime == event.getAffectedEditor()) {
		executionStep.setBlockingTime((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:ExecutionStepTimingPropertiesEditionComponent.java


示例27: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	WorkloadEvent workloadEvent = (WorkloadEvent)semanticObject;
	if (GqamViewsRepository.General.Properties.name == event.getAffectedEditor()) {
		workloadEvent.setName((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.General.Properties.effect == event.getAffectedEditor()) {
		if (event.getKind() == PropertiesEditionEvent.SET) {
			effectSettings.setToReference((BehaviorScenario)event.getNewValue());
		} else if (event.getKind() == PropertiesEditionEvent.ADD) {
			BehaviorScenario eObject = GqamFactory.eINSTANCE.createBehaviorScenario();
			EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
			PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
			if (provider != null) {
				PropertiesEditingPolicy policy = provider.getPolicy(context);
				if (policy != null) {
					policy.execute();
				}
			}
			effectSettings.setToReference(eObject);
		}
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:WorkloadEventPropertiesEditionComponent.java


示例28: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (GqamViewsRepository.General.Properties.name == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GrmPackage.eINSTANCE.getNamedElement_Name().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GrmPackage.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,代码来源:WorkloadEventPropertiesEditionComponent.java


示例29: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final EndToEndFlow endToEndFlow = (EndToEndFlow)elt;
		final TimingPropertiesEditionPart timingPart = (TimingPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(GqamViewsRepository.Timing.TimingProperties.endToEndDeadline))
			timingPart.setEndToEndDeadline(EEFConverterUtil.convertToString(GqamPackage.Literals.NFP_DURATION, endToEndFlow.getEndToEndDeadline()));
		
		if (isAccessible(GqamViewsRepository.Timing.TimingProperties.endToEndTime))
			timingPart.setEndToEndTime(EEFConverterUtil.convertToString(GqamPackage.Literals.NFP_DURATION, endToEndFlow.getEndToEndTime()));
		
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:32,代码来源:EndToEndFlowTimingPropertiesEditionComponent.java


示例30: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (GqamViewsRepository.General.Properties.occurences == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GqamPackage.eINSTANCE.getPeriodicPattern_Occurences().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GqamPackage.eINSTANCE.getPeriodicPattern_Occurences().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:PeriodicPatternGeneralPropertiesEditionComponent.java


示例31: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final SoftwareInterface softwareInterface = (SoftwareInterface)elt;
		final GeneralPropertiesEditionPart generalPart = (GeneralPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(SrmViewsRepository.General.Properties.name))
			generalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, softwareInterface.getName()));
		
		// init filters
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:SoftwareInterfaceGeneralPropertiesEditionComponent.java


示例32: initPart

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, 
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 * 
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
	setInitializing(true);
	if (editingPart != null && key == partKey) {
		editingPart.setContext(elt, allResource);
		
		final HardwarePin hardwarePin = (HardwarePin)elt;
		final OtherPropertiesEditionPart otherPart = (OtherPropertiesEditionPart)editingPart;
		// init values
		if (isAccessible(HrmViewsRepository.Other.Properties.width)) {
			otherPart.setWidth(EEFConverterUtil.convertToString(EcorePackage.Literals.EINT, hardwarePin.getWidth()));
		}
		
		if (isAccessible(HrmViewsRepository.Other.Properties.direction)) {
			otherPart.initDirection(EEFUtils.choiceOfValues(hardwarePin, HrmPackage.eINSTANCE.getHardwarePin_Direction()), hardwarePin.getDirection());
		}
		// init filters
		
		
		// init values for referenced views
		
		// init filters for referenced views
		
	}
	setInitializing(false);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:HardwarePinOtherPropertiesEditionComponent.java


示例33: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	CommunicationStep communicationStep = (CommunicationStep)semanticObject;
	if (GqamViewsRepository.Timing.TimingProperties.respTime == event.getAffectedEditor()) {
		communicationStep.setRespTime((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.bestCET == event.getAffectedEditor()) {
		communicationStep.setBestCET((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.worstCET == event.getAffectedEditor()) {
		communicationStep.setWorstCET((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
	if (GqamViewsRepository.Timing.TimingProperties.blockingTime == event.getAffectedEditor()) {
		communicationStep.setBlockingTime((org.polarsys.time4sys.marte.nfp.Duration)EEFConverterUtil.createFromString(GqamPackage.Literals.NFP_DURATION, (String)event.getNewValue()));
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:CommunicationStepTimingPropertiesEditionComponent.java


示例34: updateSemanticModel

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
 * 
 */
public void updateSemanticModel(final IPropertiesEditionEvent event) {
	Duration duration = (Duration)semanticObject;
	if (NfpViewsRepository.General.Properties.value == event.getAffectedEditor()) {
		duration.setValue((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
	}
	if (NfpViewsRepository.General.Properties.unit == event.getAffectedEditor()) {
		duration.setUnit((TimeUnitKind)event.getNewValue());
	}
	if (NfpViewsRepository.General.Properties.best == event.getAffectedEditor()) {
		duration.setBest((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
	}
	if (NfpViewsRepository.General.Properties.worst == event.getAffectedEditor()) {
		duration.setWorst((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
	}
	if (NfpViewsRepository.General.Properties.clock == event.getAffectedEditor()) {
		duration.setClock((java.lang.String)EEFConverterUtil.createFromString(EcorePackage.Literals.ESTRING, (String)event.getNewValue()));
	}
	if (NfpViewsRepository.General.Properties.precision == event.getAffectedEditor()) {
		duration.setPrecision((EEFConverterUtil.createDoubleFromString(EcorePackage.Literals.EDOUBLE, (String)event.getNewValue())));
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:27,代码来源:DurationPropertiesEditionComponent.java


示例35: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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 (GqamViewsRepository.General.Properties.connectorKind == event.getAffectedEditor()) {
				Object newValue = event.getNewValue();
				if (newValue instanceof String) {
					newValue = EEFConverterUtil.createFromString(GqamPackage.eINSTANCE.getPrecedenceRelation_ConnectorKind().getEAttributeType(), (String)newValue);
				}
				ret = Diagnostician.INSTANCE.validate(GqamPackage.eINSTANCE.getPrecedenceRelation_ConnectorKind().getEAttributeType(), newValue);
			}
		} catch (IllegalArgumentException iae) {
			ret = BasicDiagnostic.toDiagnostic(iae);
		} catch (WrappedException we) {
			ret = BasicDiagnostic.toDiagnostic(we);
		}
	}
	return ret;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:26,代码来源:PrecedenceRelationPropertiesEditionComponent.java


示例36: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.InputPort.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,代码来源:InputPortPropertiesEditionComponent.java


示例37: validateValue

import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil; //导入依赖的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.OutputStimulus.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,代码来源:OutputStimulusPropertiesEditionComponent.java



注:本文中的org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。