Class AddATRoleAction
java.lang.Object
org.palladiosimulator.editors.sirius.custom.externaljavaactions.AddATRoleAction
- All Implemented Interfaces:
org.eclipse.sirius.tools.api.ui.IExternalJavaAction
public class AddATRoleAction
extends Object
implements org.eclipse.sirius.tools.api.ui.IExternalJavaAction
This class applies an ArchitecturalTemplate to a
System
. It will ask the user to select
from an list of available ArchitecturalTemplates.
TODO: Should rely on ArchitecturalTemplateAPI.getApplicableRoles(EObject)
with a
refactored RoleStereotypeSelectionDialog
that works on Role
s. This however
induces a weird Acceleo bug at the moment (1.7.2015) where expressions on the element will only
be evaluated after an restart (ArgumentTypeMissmatch).
FIXME: use org.eclipse.sirius.tools.api.ui.IExternalJavaAction2-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canExecute
(Collection<? extends EObject> selections) Tests whether the object this tool is applied to is aSystem
.void
Asks the user to select aRole
and attaches it to the givenAssemblyContext
.
-
Constructor Details
-
AddATRoleAction
public AddATRoleAction()
-
-
Method Details
-
execute
Asks the user to select aRole
and attaches it to the givenAssemblyContext
.- Specified by:
execute
in interfaceorg.eclipse.sirius.tools.api.ui.IExternalJavaAction
-
canExecute
Tests whether the object this tool is applied to is aSystem
.- Specified by:
canExecute
in interfaceorg.eclipse.sirius.tools.api.ui.IExternalJavaAction
-