Search in sources :

Example 1 with SortFolderCommand

use of com.archimatetool.editor.views.tree.commands.SortFolderCommand in project archi by archimatetool.

the class SortFolderAction method run.

@Override
public void run() {
    Object selected = getSelection().getFirstElement();
    if (selected instanceof IFolder) {
        IFolder folder = (IFolder) selected;
        Command cmd = new SortFolderCommand(folder);
        CommandStack commandStack = (CommandStack) folder.getAdapter(CommandStack.class);
        commandStack.execute(cmd);
    }
}
Also used : CommandStack(org.eclipse.gef.commands.CommandStack) SortFolderCommand(com.archimatetool.editor.views.tree.commands.SortFolderCommand) Command(org.eclipse.gef.commands.Command) SortFolderCommand(com.archimatetool.editor.views.tree.commands.SortFolderCommand) IFolder(com.archimatetool.model.IFolder)

Aggregations

SortFolderCommand (com.archimatetool.editor.views.tree.commands.SortFolderCommand)1 IFolder (com.archimatetool.model.IFolder)1 Command (org.eclipse.gef.commands.Command)1 CommandStack (org.eclipse.gef.commands.CommandStack)1