use of com.archimatetool.editor.views.tree.actions.PropertiesAction in project archi by archimatetool.
the class ZestView method makeActions.
/**
* Make local actions
*/
private void makeActions() {
fActionProperties = new PropertiesAction(getViewer());
fActionLayout = new Action(Messages.ZestView_0) {
@Override
public void run() {
fGraphViewer.doApplyLayout();
}
@Override
public String getToolTipText() {
return getText();
}
@Override
public ImageDescriptor getImageDescriptor() {
return AbstractUIPlugin.imageDescriptorFromPlugin(ArchiZestPlugin.PLUGIN_ID, // $NON-NLS-1$
"img/layout.gif");
}
};
fActionPinContent = new Action(Messages.ZestView_4, IAction.AS_CHECK_BOX) {
{
setToolTipText(Messages.ZestView_1);
setImageDescriptor(IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_PIN));
}
};
fActionCopyImageToClipboard = new CopyZestViewAsImageToClipboardAction(fGraphViewer);
fActionExportImageToFile = new ExportAsImageAction(fGraphViewer);
fActionSelectInModelTree = new Action(Messages.ZestView_8) {
@Override
public void run() {
IStructuredSelection selection = (IStructuredSelection) getViewer().getSelection();
ITreeModelView view = (ITreeModelView) ViewManager.showViewPart(ITreeModelView.ID, true);
if (view != null && !selection.isEmpty()) {
view.getViewer().setSelection(new StructuredSelection(selection.toArray()), true);
}
}
@Override
public String getToolTipText() {
return getText();
}
};
}
use of com.archimatetool.editor.views.tree.actions.PropertiesAction in project archi by archimatetool.
the class TreeModelView method makeActions.
/**
* Make local actions
*/
private void makeActions() {
IWorkbenchWindow window = getViewSite().getWorkbenchWindow();
fActionNewModel = new NewArchimateModelAction();
fActionOpenModel = new OpenModelAction(window);
fActionOpenDiagram = new OpenDiagramAction(getSelectionProvider());
fActionCloseModel = new CloseModelAction(getSelectionProvider());
fActionSaveModel = new SaveModelAction(this);
fActionDelete = new DeleteAction(getViewer());
fActionRename = new RenameAction(getViewer());
fActionFindReplace = new FindReplaceAction(this);
fActionProperties = new PropertiesAction(getSelectionProvider());
fActionLinkToEditor = new LinkToEditorAction();
fActionNewFolder = new NewFolderAction(getSelectionProvider());
fActionDuplicate = new DuplicateAction(getViewer());
fActionGenerateView = new GenerateViewAction(getSelectionProvider());
fActionToggleSearchField = new // $NON-NLS-1$
Action(// $NON-NLS-1$
"", // $NON-NLS-1$
IAction.AS_CHECK_BOX) {
@Override
public void run() {
if (isChecked()) {
showSearchWidget();
} else {
hideSearchWidget();
}
}
};
fActionToggleSearchField.setToolTipText(Messages.TreeModelView_0);
fActionToggleSearchField.setImageDescriptor(IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_SEARCH));
fActionCollapseSelected = new Action(Messages.TreeModelView_3) {
@Override
public void run() {
IStructuredSelection selection = ((IStructuredSelection) getViewer().getSelection());
for (Object o : selection.toArray()) {
if (fTreeViewer.isExpandable(o) && fTreeViewer.getExpandedState(o)) {
fTreeViewer.collapseToLevel(o, AbstractTreeViewer.ALL_LEVELS);
}
}
}
@Override
public ImageDescriptor getImageDescriptor() {
return IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_COLLAPSEALL);
}
};
fActionExpandSelected = new Action(Messages.TreeModelView_4) {
@Override
public void run() {
IStructuredSelection selection = ((IStructuredSelection) getViewer().getSelection());
for (Object o : selection.toArray()) {
if (hasExpandableNodes(o)) {
fTreeViewer.expandToLevel(o, AbstractTreeViewer.ALL_LEVELS);
}
}
}
@Override
public ImageDescriptor getImageDescriptor() {
return IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_EXPANDALL);
}
};
}
use of com.archimatetool.editor.views.tree.actions.PropertiesAction in project archi by archimatetool.
the class NavigatorView method makeActions.
/**
* Make local actions
*/
private void makeActions() {
fActionProperties = new PropertiesAction(getViewer());
fActionPinContent = new Action(Messages.NavigatorView_0, IAction.AS_CHECK_BOX) {
{
setToolTipText(Messages.NavigatorView_1);
setImageDescriptor(IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_PIN));
}
};
fActionNavDown = new Action(Messages.NavigatorView_2, IAction.AS_RADIO_BUTTON) {
{
setToolTipText(Messages.NavigatorView_3);
setImageDescriptor(IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_NAVIGATOR_DOWNWARD));
setChecked(true);
}
@Override
public void run() {
fActionNavUp.setChecked(false);
fTreeViewer.setShowTargetElements(true);
}
};
fActionNavUp = new Action(Messages.NavigatorView_4, IAction.AS_RADIO_BUTTON) {
{
setToolTipText(Messages.NavigatorView_5);
setImageDescriptor(IArchiImages.ImageFactory.getImageDescriptor(IArchiImages.ICON_NAVIGATOR_UPWARD));
}
@Override
public void run() {
fActionNavDown.setChecked(false);
fTreeViewer.setShowTargetElements(false);
}
};
}
Aggregations