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();
}
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();
}
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();
}
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();
}
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();
}
Aggregations