Search in sources :

Example 11 with PalladioSelectEObjectDialog

use of org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddAllocationContextAssemblyContext method getAssemblyContext.

private AssemblyContext getAssemblyContext(AllocationContext allocationContext) {
    Collection<Object> filter = new ArrayList<Object>();
    filter.add(org.palladiosimulator.pcm.system.System.class);
    filter.add(AssemblyContext.class);
    Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
    PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, allocationContext.eResource().getResourceSet());
    dialog.setProvidedService(AssemblyContext.class);
    dialog.open();
    return (AssemblyContext) dialog.getResult();
}
Also used : PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) AssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext) EReference(org.eclipse.emf.ecore.EReference)

Example 12 with PalladioSelectEObjectDialog

use of org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddAllocationContextEventChannel method getEventChannel.

private EventChannel getEventChannel(AllocationContext allocationContext) {
    Collection<Object> filter = new ArrayList<Object>();
    filter.add(org.palladiosimulator.pcm.system.System.class);
    filter.add(EventChannel.class);
    Collection<EReference> additionalChildReferences = new ArrayList<EReference>();
    PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(SHELL, filter, additionalChildReferences, allocationContext.eResource().getResourceSet());
    dialog.setProvidedService(EventChannel.class);
    dialog.open();
    return (EventChannel) dialog.getResult();
}
Also used : EventChannel(org.palladiosimulator.pcm.core.composition.EventChannel) PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference)

Example 13 with PalladioSelectEObjectDialog

use of org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddAssemblyContext method getRepositoryComponent.

private RepositoryComponent getRepositoryComponent(final AssemblyContext assemblyContext) {
    final PalladioSelectEObjectDialog dialog = new PalladioSelectEObjectDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), FILTER_LIST, ADDITIONAL_REFERENCES, assemblyContext.eResource().getResourceSet());
    dialog.setProvidedService(RepositoryComponent.class);
    dialog.open();
    if (dialog.getResult() == null) {
        return null;
    }
    if (!(dialog.getResult() instanceof RepositoryComponent)) {
        return null;
    }
    return (RepositoryComponent) dialog.getResult();
}
Also used : PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) RepositoryComponent(org.palladiosimulator.pcm.repository.RepositoryComponent)

Example 14 with PalladioSelectEObjectDialog

use of org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddInfrastructureProvidedRole method getInfrastructureInterface.

private InfrastructureInterface getInfrastructureInterface(InfrastructureProvidedRole role) {
    Collection<Object> filter = new ArrayList<Object>();
    filter.add(Repository.class);
    filter.add(InfrastructureInterface.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(InfrastructureInterface.class);
    dialog.open();
    return (InfrastructureInterface) dialog.getResult();
}
Also used : PalladioSelectEObjectDialog(org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog) ArrayList(java.util.ArrayList) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference) InfrastructureInterface(org.palladiosimulator.pcm.repository.InfrastructureInterface)

Example 15 with PalladioSelectEObjectDialog

use of org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog in project Palladio-Editors-Sirius by PalladioSimulator.

the class AddOperationRequiredRole method getOperationInterface.

private OperationInterface getOperationInterface(OperationRequiredRole 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();
}
Also used : 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

PalladioSelectEObjectDialog (org.palladiosimulator.editors.commons.dialogs.selection.PalladioSelectEObjectDialog)29 ArrayList (java.util.ArrayList)28 EObject (org.eclipse.emf.ecore.EObject)28 EReference (org.eclipse.emf.ecore.EReference)28 BasicComponent (org.palladiosimulator.pcm.repository.BasicComponent)4 EventGroup (org.palladiosimulator.pcm.repository.EventGroup)4 OperationInterface (org.palladiosimulator.pcm.repository.OperationInterface)4 InfrastructureInterface (org.palladiosimulator.pcm.repository.InfrastructureInterface)3 OperationSignature (org.palladiosimulator.pcm.repository.OperationSignature)3 Signature (org.palladiosimulator.pcm.repository.Signature)3 ProcessingResourceType (org.palladiosimulator.pcm.resourcetype.ProcessingResourceType)3 ServiceEffectSpecification (org.palladiosimulator.pcm.seff.ServiceEffectSpecification)3 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)2 ResourceRequiredRole (org.palladiosimulator.pcm.core.entity.ResourceRequiredRole)2 InfrastructureSignature (org.palladiosimulator.pcm.repository.InfrastructureSignature)2 OperationProvidedRole (org.palladiosimulator.pcm.repository.OperationProvidedRole)2 PassiveResource (org.palladiosimulator.pcm.repository.PassiveResource)2 RequiredRole (org.palladiosimulator.pcm.repository.RequiredRole)2 ResourceInterface (org.palladiosimulator.pcm.resourcetype.ResourceInterface)2 SchedulingPolicy (org.palladiosimulator.pcm.resourcetype.SchedulingPolicy)2