Search in sources :

Example 6 with OperationSignature

use of org.palladiosimulator.pcm.repository.OperationSignature 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();
}
Also used : OperationSignature(org.palladiosimulator.pcm.repository.OperationSignature) PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference) OperationInterface(org.palladiosimulator.pcm.repository.OperationInterface)

Aggregations

OperationSignature (org.palladiosimulator.pcm.repository.OperationSignature)6 ArrayList (java.util.ArrayList)3 EObject (org.eclipse.emf.ecore.EObject)3 EReference (org.eclipse.emf.ecore.EReference)3 PalladioSelectEObjectDialog (org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog)3 OperationInterface (org.palladiosimulator.pcm.repository.OperationInterface)3 CollectionDataType (org.palladiosimulator.pcm.repository.CollectionDataType)2 InfrastructureSignature (org.palladiosimulator.pcm.repository.InfrastructureSignature)2 OperationRequiredRole (org.palladiosimulator.pcm.repository.OperationRequiredRole)2 Parameter (org.palladiosimulator.pcm.repository.Parameter)2 HashMap (java.util.HashMap)1 BasicComponent (org.palladiosimulator.pcm.repository.BasicComponent)1 DataType (org.palladiosimulator.pcm.repository.DataType)1 OperationProvidedRole (org.palladiosimulator.pcm.repository.OperationProvidedRole)1 PrimitiveDataType (org.palladiosimulator.pcm.repository.PrimitiveDataType)1 Signature (org.palladiosimulator.pcm.repository.Signature)1 ExternalCallAction (org.palladiosimulator.pcm.seff.ExternalCallAction)1 ResourceDemandingBehaviour (org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour)1 ServiceEffectSpecification (org.palladiosimulator.pcm.seff.ServiceEffectSpecification)1 EntryLevelSystemCall (org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall)1