use of org.palladiosimulator.pcm.repository.OperationInterface in project Palladio-Editors-Sirius by PalladioSimulator.
the class EntryLevelSystemCallDialog method getOperationSignature.
private OperationSignature getOperationSignature(EntryLevelSystemCall element) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(OperationInterface.class);
filter.add(OperationSignature.class);
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, element.eResource().getResourceSet());
dialog.setProvidedService(OperationSignature.class);
for (Object o : dialog.getTreeViewer().getExpandedElements()) {
if (!(o instanceof OperationInterface))
continue;
OperationInterface oi = (OperationInterface) o;
if (!element.getProvidedRole_EntryLevelSystemCall().getProvidedInterface__OperationProvidedRole().equals(oi))
dialog.getTreeViewer().remove(o);
}
dialog.open();
return (OperationSignature) dialog.getResult();
}
use of org.palladiosimulator.pcm.repository.OperationInterface in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddOperationProvidedRole method execute.
@Override
public void execute(Collection<? extends EObject> selection, Map<String, Object> parameters) {
OperationProvidedRole role = (OperationProvidedRole) parameters.get("instance");
OperationInterface oInterface = getOperationInterface(role);
role.setProvidedInterface__OperationProvidedRole(oInterface);
}
use of org.palladiosimulator.pcm.repository.OperationInterface in project Palladio-Editors-Sirius by PalladioSimulator.
the class AddOperationProvidedRole method getOperationInterface.
private OperationInterface getOperationInterface(OperationProvidedRole role) {
Collection<Object> filter = new ArrayList<Object>();
filter.add(Repository.class);
filter.add(OperationInterface.class);
// Additional Child References
Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
// Creating the dialog
PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, role.eResource().getResourceSet());
// Setting the needed object type
dialog.setProvidedService(OperationInterface.class);
dialog.open();
return (OperationInterface) dialog.getResult();
}
Aggregations