use of com.archimatetool.editor.views.tree.TreeSelectionRequest in project archi by archimatetool.
the class NewElementCommand method redo.
@Override
public void redo() {
fFolder.getElements().add(fElement);
// Select
UIRequestManager.INSTANCE.fireRequest(new TreeSelectionRequest(this, new StructuredSelection(fElement), true));
}
use of com.archimatetool.editor.views.tree.TreeSelectionRequest in project archi by archimatetool.
the class NewFolderCommand method undo.
@Override
public void undo() {
fParent.getFolders().remove(fFolder);
// Select the parent node if no node is selected (this happens when the node is deleted)
TreeSelectionRequest request = new TreeSelectionRequest(this, new StructuredSelection(fParent), true) {
@Override
public boolean shouldSelect(Viewer viewer) {
return viewer.getSelection().isEmpty();
}
};
UIRequestManager.INSTANCE.fireRequest(request);
}
Aggregations