use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class FlowEventFlowEventPropertiesEditionComponent method initPart.
/**
* {@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 FlowEvent flowEvent = (FlowEvent) elt;
final FlowEventPropertiesEditionPart flowEventPart = (FlowEventPropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.FlowEvent.Properties.description))
flowEventPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, flowEvent.getDescription()));
if (isAccessible(FlowViewsRepository.FlowEvent.Properties.name))
flowEventPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, flowEvent.getName()));
if (isAccessible(FlowViewsRepository.FlowEvent.Properties.binds)) {
bindsSettings = new ReferencesTableSettings(flowEvent, FlowPackage.eINSTANCE.getFlowEvent_Binds());
flowEventPart.initBinds(bindsSettings);
}
if (isAccessible(FlowViewsRepository.FlowEvent.Properties.binds)) {
flowEventPart.addFilterToBinds(new EObjectFilter(ViewPackage.Literals.VIEW_EVENT));
// Start of user code for additional businessfilters for binds
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class DtoDtoPropertiesEditionComponent method initPart.
/**
* {@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 DTO dTO = (DTO) elt;
final DtoPropertiesEditionPart dtoPart = (DtoPropertiesEditionPart) editingPart;
// init values
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.name))
dtoPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, dTO.getName()));
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.supertype)) {
// init part
supertypeSettings = new EObjectFlatComboSettings(dTO, EnvironmentPackage.eINSTANCE.getStructuredType_Supertype());
dtoPart.initSupertype(supertypeSettings);
// set the button mode
dtoPart.setSupertypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.description))
dtoPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, dTO.getDescription()));
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.associatedTypes)) {
associatedTypesSettings = new ReferencesTableSettings(dTO, EnvironmentPackage.eINSTANCE.getStructuredType_AssociatedTypes());
dtoPart.initAssociatedTypes(associatedTypesSettings);
}
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.supertype)) {
dtoPart.addFilterToSupertype(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof StructuredType);
}
});
// Start of user code for additional businessfilters for supertype
// End of user code
}
if (isAccessible(EnvironmentViewsRepository.Dto.Properties.associatedTypes)) {
dtoPart.addFilterToAssociatedTypes(new EObjectFilter(EnvironmentPackage.Literals.STRUCTURED_TYPE));
// Start of user code for additional businessfilters for associatedTypes
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class AbortNodeAbortNodePropertiesEditionComponent method initPart.
/**
* {@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 AbortNode abortNode = (AbortNode) elt;
final AbortNodePropertiesEditionPart abortNodePart = (AbortNodePropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.AbortNode.Properties.description))
abortNodePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, abortNode.getDescription()));
if (isAccessible(GraalViewsRepository.AbortNode.Properties.outgoingTransitions)) {
outgoingTransitionsSettings = new ReferencesTableSettings(abortNode, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
abortNodePart.initOutgoingTransitions(outgoingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(abortNode, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
abortNodePart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.outgoingTransitions)) {
abortNodePart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outgoingTransitions
// End of user code
}
if (isAccessible(GraalViewsRepository.AbortNode.Properties.incomingTransitions)) {
abortNodePart.addFilterToIncomingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for incomingTransitions
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class EntityEntityPropertiesEditionComponent method initPart.
/**
* {@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 Entity entity = (Entity) elt;
final EntityPropertiesEditionPart entityPart = (EntityPropertiesEditionPart) editingPart;
// init values
if (isAccessible(EntityViewsRepository.Entity_.Properties.name))
entityPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, entity.getName()));
if (isAccessible(EntityViewsRepository.Entity_.Properties.superType)) {
// init part
superTypeSettings = new EObjectFlatComboSettings(entity, EnvironmentPackage.eINSTANCE.getStructuredType_Supertype());
entityPart.initSuperType(superTypeSettings);
// set the button mode
entityPart.setSuperTypeButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(EntityViewsRepository.Entity_.Properties.description))
entityPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, entity.getDescription()));
if (isAccessible(EntityViewsRepository.Entity_.Properties.associatedTypes)) {
associatedTypesSettings = new ReferencesTableSettings(entity, EnvironmentPackage.eINSTANCE.getStructuredType_AssociatedTypes());
entityPart.initAssociatedTypes(associatedTypesSettings);
}
if (isAccessible(EntityViewsRepository.Entity_.Properties.associatedTypes)) {
entityPart.addFilterToAssociatedTypes(new EObjectFilter(EnvironmentPackage.Literals.STRUCTURED_TYPE));
// Start of user code for additional businessfilters for associatedTypes
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class CinematicRootToolkitsPropertiesEditionComponent method initPart.
/**
* {@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 CinematicRoot cinematicRoot = (CinematicRoot) elt;
final ToolkitsPropertiesEditionPart toolkitsPart = (ToolkitsPropertiesEditionPart) editingPart;
// init values
if (isAccessible(CinematicViewsRepository.Toolkits.Properties.toolkits_)) {
toolkitsSettings = new ReferencesTableSettings(cinematicRoot, CinematicPackage.eINSTANCE.getCinematicRoot_Toolkits());
toolkitsPart.initToolkits(toolkitsSettings);
}
// init filters
if (isAccessible(CinematicViewsRepository.Toolkits.Properties.toolkits_)) {
toolkitsPart.addFilterToToolkits(new EObjectFilter(ToolkitsPackage.Literals.TOOLKIT));
// Start of user code for additional businessfilters for toolkits
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations