Search in sources :

Example 1 with GenerateViewCommand

use of com.archimatetool.editor.tools.GenerateViewCommand in project archi by archimatetool.

the class GenerateViewAction method run.

@Override
public void run() {
    List<IArchimateElement> selected = getValidSelectedObjects(getSelection());
    if (!selected.isEmpty()) {
        GenerateViewCommand command = new GenerateViewCommand(selected);
        if (command.openDialog(Display.getCurrent().getActiveShell())) {
            CommandStack commandStack = (CommandStack) ((IAdapter) selected.get(0)).getAdapter(CommandStack.class);
            commandStack.execute(command);
        }
    }
}
Also used : CommandStack(org.eclipse.gef.commands.CommandStack) IArchimateElement(com.archimatetool.model.IArchimateElement) GenerateViewCommand(com.archimatetool.editor.tools.GenerateViewCommand)

Aggregations

GenerateViewCommand (com.archimatetool.editor.tools.GenerateViewCommand)1 IArchimateElement (com.archimatetool.model.IArchimateElement)1 CommandStack (org.eclipse.gef.commands.CommandStack)1