use of org.obeonetwork.dsl.soa.Wire in project InformationSystem by ObeoNetwork.
the class SOAService method allReferencedComponents.
public List<Component> allReferencedComponents(System context) {
List<Component> allReferencedComponents = new ArrayList<Component>();
List<Wire> ownedWires = context.getOwnedWires();
// Add Components parent of source and dest of westWire
for (Wire wire : ownedWires) {
Component componentSource = (Component) wire.getSource().eContainer();
allReferencedComponents.add(componentSource);
Component componentDest = (Component) wire.getDest().eContainer();
allReferencedComponents.add(componentDest);
}
Set<Component> componentsSet = new HashSet<Component>();
// Remove duplicates
componentsSet.addAll(allReferencedComponents);
return new ArrayList<Component>(componentsSet);
}
use of org.obeonetwork.dsl.soa.Wire in project InformationSystem by ObeoNetwork.
the class WireWirePropertiesEditionComponent 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 Wire wire = (Wire) elt;
final WirePropertiesEditionPart wirePart = (WirePropertiesEditionPart) editingPart;
// init values
if (isAccessible(SoaViewsRepository.Wire.Properties.source)) {
// init part
sourceSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Source());
wirePart.initSource(sourceSettings);
// set the button mode
wirePart.setSourceButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Wire.Properties.dest)) {
// init part
destSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Dest());
wirePart.initDest(destSettings);
// set the button mode
wirePart.setDestButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(SoaViewsRepository.Wire.Properties.description))
wirePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, wire.getDescription()));
// init filters
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations