use of org.modelversioning.emfprofile.Profile in project Palladio-Editors-Sirius by PalladioSimulator.
the class ApplyUnapplyProfileAction method execute.
@SuppressWarnings("unchecked")
@Override
public void execute(final Collection<? extends EObject> selections, final Map<String, Object> parameters) {
final EObject target = ((DSemanticDecorator) selections.iterator().next()).getTarget();
final Resource targetResource = target.eResource();
final FeatureEditorDialog profileSelectionDialog = new FeatureEditorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), LABEL_PROVIDER, target, target.eClass().getEAllStructuralFeatures().get(0).getEType(), ProfileAPI.getAppliedProfiles(targetResource), SELECT_APPLIED_PROFILES_MESSAGE, ProfileAPI.getApplicableProfiles(), false, true, true);
if (profileSelectionDialog.open() == Dialog.OK) {
ProfileAPI.updateProfileApplications(targetResource, (EList<Profile>) profileSelectionDialog.getResult());
}
}
Aggregations