use of org.obeonetwork.dsl.interaction.Interaction in project InformationSystem by ObeoNetwork.
the class InteractionServices method getAllInteractionsInSession.
public List<Interaction> getAllInteractionsInSession(EObject context) {
List<Interaction> allInteractions = new ArrayList<Interaction>();
List<EObject> roots = getAllRootsInSession(context);
for (EObject root : roots) {
for (Iterator<EObject> i = root.eAllContents(); i.hasNext(); ) {
EObject object = i.next();
if (object instanceof Interaction) {
allInteractions.add((Interaction) object);
}
}
}
return allInteractions;
}
use of org.obeonetwork.dsl.interaction.Interaction in project InformationSystem by ObeoNetwork.
the class InteractionServices method getPrecedingEnds.
private List<End> getPrecedingEnds(End end) {
List<End> result = new ArrayList<End>();
Interaction interaction = (Interaction) end.eContainer();
for (End siblingEnd : interaction.getEnds()) {
if (!end.equals(siblingEnd)) {
result.add(siblingEnd);
} else {
return result;
}
}
return result;
}
use of org.obeonetwork.dsl.interaction.Interaction in project InformationSystem by ObeoNetwork.
the class InteractionUseInteractionUsePropertiesEditionComponent 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 InteractionUse interactionUse = (InteractionUse) elt;
final InteractionUsePropertiesEditionPart interactionUsePart = (InteractionUsePropertiesEditionPart) editingPart;
// init values
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.name))
interactionUsePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getName()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.type))
interactionUsePart.setType(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getType()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.interaction_)) {
// init part
interactionSettings = new EObjectFlatComboSettings(interactionUse, InteractionPackage.eINSTANCE.getInteractionUse_Interaction());
interactionUsePart.initInteraction(interactionSettings);
// set the button mode
interactionUsePart.setInteractionButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.description))
interactionUsePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getDescription()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.interaction_)) {
interactionUsePart.addFilterToInteraction(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) {
return (element instanceof Interaction);
}
});
// Start of user code for additional businessfilters for interaction
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations