use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.
the class FinalStateFinalStatePropertiesEditionComponent 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 FinalState finalState = (FinalState) elt;
final FinalStatePropertiesEditionPart finalStatePart = (FinalStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.description))
finalStatePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, finalState.getDescription()));
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.keywords))
finalStatePart.setKeywords(finalState.getKeywords());
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(finalState, StateMachinePackage.eINSTANCE.getAbstractState_IncomingTransitions());
finalStatePart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.outcomingTransitions)) {
outcomingTransitionsSettings = new ReferencesTableSettings(finalState, StateMachinePackage.eINSTANCE.getAbstractState_OutcomingTransitions());
finalStatePart.initOutcomingTransitions(outcomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.incomingTransitions)) {
finalStatePart.addFilterToIncomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for incomingTransitions
// End of user code
}
if (isAccessible(StatemachineViewsRepository.FinalState.Properties.outcomingTransitions)) {
finalStatePart.addFilterToOutcomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outcomingTransitions
// 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 StateStatePropertiesEditionComponent 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 State state = (State) elt;
final StatePropertiesEditionPart statePart = (StatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(StatemachineViewsRepository.State.Properties.description))
statePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, state.getDescription()));
if (isAccessible(StatemachineViewsRepository.State.Properties.keywords))
statePart.setKeywords(state.getKeywords());
if (isAccessible(StatemachineViewsRepository.State.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(state, StateMachinePackage.eINSTANCE.getAbstractState_IncomingTransitions());
statePart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.State.Properties.outcomingTransitions)) {
outcomingTransitionsSettings = new ReferencesTableSettings(state, StateMachinePackage.eINSTANCE.getAbstractState_OutcomingTransitions());
statePart.initOutcomingTransitions(outcomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.State.Properties.name))
statePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, state.getName()));
if (isAccessible(StatemachineViewsRepository.State.Properties.incomingTransitions)) {
statePart.addFilterToIncomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for incomingTransitions
// End of user code
}
if (isAccessible(StatemachineViewsRepository.State.Properties.outcomingTransitions)) {
statePart.addFilterToOutcomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outcomingTransitions
// 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 TaskTaskPropertiesEditionComponent 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 Task task = (Task) elt;
final TaskPropertiesEditionPart taskPart = (TaskPropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.Task.Properties.description))
taskPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, task.getDescription()));
if (isAccessible(GraalViewsRepository.Task.Properties.subActivities)) {
subActivitiesSettings = new ReferencesTableSettings(task, GraalPackage.eINSTANCE.getActivity_SubActivities());
taskPart.initSubActivities(subActivitiesSettings);
}
if (isAccessible(GraalViewsRepository.Task.Properties.actors)) {
actorsSettings = new ReferencesTableSettings(task, GraalPackage.eINSTANCE.getTask_Actors());
taskPart.initActors(actorsSettings);
}
if (isAccessible(GraalViewsRepository.Task.Properties.id))
taskPart.setId(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, task.getId()));
if (isAccessible(GraalViewsRepository.Task.Properties.name))
taskPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, task.getName()));
if (isAccessible(GraalViewsRepository.Task.Properties.uses)) {
usesSettings = new ReferencesTableSettings(task, GraalPackage.eINSTANCE.getTask_Uses());
taskPart.initUses(usesSettings);
}
if (isAccessible(GraalViewsRepository.Task.Properties.preconditions))
taskPart.setPreconditions(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, task.getPreconditions()));
if (isAccessible(GraalViewsRepository.Task.Properties.postconditions))
taskPart.setPostconditions(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, task.getPostconditions()));
if (isAccessible(GraalViewsRepository.Task.Properties.subActivities)) {
taskPart.addFilterToSubActivities(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 Loop);
}
});
// Start of user code for additional businessfilters for subActivities
// End of user code
}
if (isAccessible(GraalViewsRepository.Task.Properties.actors)) {
taskPart.addFilterToActors(new EObjectFilter(GraalPackage.Literals.ACTOR));
// Start of user code for additional businessfilters for actors
// End of user code
}
if (isAccessible(GraalViewsRepository.Task.Properties.uses)) {
taskPart.addFilterToUses(new EObjectFilter(GraalPackage.Literals.TASK));
// Start of user code for additional businessfilters for uses
// 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 UseCaseUseCasePropertiesEditionComponent 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 UseCase useCase = (UseCase) elt;
final UseCasePropertiesEditionPart useCasePart = (UseCasePropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.UseCase.Properties.description))
useCasePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, useCase.getDescription()));
if (isAccessible(GraalViewsRepository.UseCase.Properties.tasks)) {
tasksSettings = new ReferencesTableSettings(useCase, GraalPackage.eINSTANCE.getUseCase_Tasks());
useCasePart.initTasks(tasksSettings);
}
if (isAccessible(GraalViewsRepository.UseCase.Properties.name))
useCasePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, useCase.getName()));
if (isAccessible(GraalViewsRepository.UseCase.Properties.namespaces)) {
namespacesSettings = new ReferencesTableSettings(useCase, GraalPackage.eINSTANCE.getDomainModelRegistry_Namespaces());
useCasePart.initNamespaces(namespacesSettings);
}
if (isAccessible(GraalViewsRepository.UseCase.Properties.domainClasses)) {
domainClassesSettings = new ReferencesTableSettings(useCase, GraalPackage.eINSTANCE.getUseCase_DomainClasses());
useCasePart.initDomainClasses(domainClassesSettings);
}
if (isAccessible(GraalViewsRepository.UseCase.Properties.tasks)) {
useCasePart.addFilterToTasks(new EObjectFilter(GraalPackage.Literals.ABSTRACT_TASK));
// Start of user code for additional businessfilters for tasks
// End of user code
}
if (isAccessible(GraalViewsRepository.UseCase.Properties.namespaces)) {
useCasePart.addFilterToNamespaces(new EObjectFilter(EnvironmentPackage.Literals.NAMESPACE));
// Start of user code for additional businessfilters for namespaces
// End of user code
}
if (isAccessible(GraalViewsRepository.UseCase.Properties.domainClasses)) {
useCasePart.addFilterToDomainClasses(new EObjectFilter(GraalPackage.Literals.DOMAIN_CLASS));
// Start of user code for additional businessfilters for domainClasses
// 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 AppliActionAppliActionPropertiesEditionComponent 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 AppliAction appliAction = (AppliAction) elt;
final AppliActionPropertiesEditionPart appliActionPart = (AppliActionPropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.AppliAction.Properties.description))
appliActionPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, appliAction.getDescription()));
if (isAccessible(GraalViewsRepository.AppliAction.Properties.name))
appliActionPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, appliAction.getName()));
if (isAccessible(GraalViewsRepository.AppliAction.Properties.outgoingTransitions)) {
outgoingTransitionsSettings = new ReferencesTableSettings(appliAction, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
appliActionPart.initOutgoingTransitions(outgoingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AppliAction.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(appliAction, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
appliActionPart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.AppliAction.Properties.outgoingTransitions)) {
appliActionPart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outgoingTransitions
// End of user code
}
if (isAccessible(GraalViewsRepository.AppliAction.Properties.incomingTransitions)) {
appliActionPart.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);
}
Aggregations