use of org.eclipse.jface.action.GroupMarker in project yamcs-studio by yamcs.
the class YamcsStudioActionBarAdvisor method fillCoolBar.
@Override
protected void fillCoolBar(ICoolBarManager coolbar) {
IToolBarManager appToolBar = new ToolBarManager(coolbar.getStyle());
coolbar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
coolbar.add(new ToolBarContributionItem(appToolBar, IWorkbenchActionConstants.TOOLBAR_FILE));
coolbar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
coolbar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
fillAppToolBar(appToolBar);
// Doesn't seem to work...
coolbar.setLockLayout(true);
}
use of org.eclipse.jface.action.GroupMarker in project hale by halestudio.
the class ApplicationActionBarAdvisor method fillCoolBar.
/**
* @see org.eclipse.ui.application.ActionBarAdvisor#fillCoolBar(org.eclipse.jface.action.ICoolBarManager)
*/
@Override
protected void fillCoolBar(ICoolBarManager coolBar) {
IActionBarConfigurer2 actionBarConfigurer = (IActionBarConfigurer2) getActionBarConfigurer();
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_FILE));
{
// File Group
IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager();
fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP));
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_GROUP));
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
fileToolBar.add(new Separator(IWorkbenchActionConstants.BUILD_GROUP));
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT));
fileToolBar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
// Add to the cool bar manager
coolBar.add(actionBarConfigurer.createToolBarContributionItem(fileToolBar, IWorkbenchActionConstants.TOOLBAR_FILE));
}
// coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
coolBar.add(new GroupMarker("group.nav"));
{
// Navigate group
IToolBarManager navToolBar = actionBarConfigurer.createToolBarManager();
navToolBar.add(new Separator(IWorkbenchActionConstants.HISTORY_GROUP));
navToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_APP));
navToolBar.add(new Separator(IWorkbenchActionConstants.PIN_GROUP));
// Add to the cool bar manager
coolBar.add(actionBarConfigurer.createToolBarContributionItem(navToolBar, IWorkbenchActionConstants.TOOLBAR_NAVIGATE));
}
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR));
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP));
{
// Help group
IToolBarManager helpToolBar = actionBarConfigurer.createToolBarManager();
helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP));
// Add the group for applications to contribute
helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP));
// Add to the cool bar manager
coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar, IWorkbenchActionConstants.TOOLBAR_HELP));
}
}
use of org.eclipse.jface.action.GroupMarker in project dbeaver by dbeaver.
the class BaseTextEditor method editorContextMenuAboutToShow.
@Override
protected void editorContextMenuAboutToShow(IMenuManager menu) {
// super.editorContextMenuAboutToShow(menu);
menu.add(new GroupMarker(GROUP_SQL_ADDITIONS));
menu.add(new GroupMarker(GROUP_SQL_EXTRAS));
menu.add(new Separator());
menu.add(new Separator(ITextEditorActionConstants.GROUP_COPY));
menu.add(new Separator(ITextEditorActionConstants.GROUP_PRINT));
menu.add(new Separator(ITextEditorActionConstants.GROUP_EDIT));
menu.add(new Separator(ITextEditorActionConstants.GROUP_FIND));
menu.add(new Separator(IWorkbenchActionConstants.GROUP_ADD));
menu.add(new Separator(ITextEditorActionConstants.GROUP_UNDO));
menu.add(new GroupMarker(ITextEditorActionConstants.GROUP_SAVE));
menu.add(new Separator(ITextEditorActionConstants.GROUP_REST));
menu.add(new Separator());
menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
menu.add(new Separator());
menu.add(new GroupMarker(GROUP_SQL_PREFERENCES));
if (isEditable()) {
addAction(menu, ITextEditorActionConstants.GROUP_UNDO, ITextEditorActionConstants.UNDO);
addAction(menu, ITextEditorActionConstants.GROUP_SAVE, ITextEditorActionConstants.SAVE);
addAction(menu, ITextEditorActionConstants.GROUP_COPY, ITextEditorActionConstants.CUT);
addAction(menu, ITextEditorActionConstants.GROUP_COPY, ITextEditorActionConstants.COPY);
addAction(menu, ITextEditorActionConstants.GROUP_COPY, ITextEditorActionConstants.PASTE);
IAction action = getAction(ITextEditorActionConstants.QUICK_ASSIST);
if (action != null && action.isEnabled()) {
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, ITextEditorActionConstants.QUICK_ASSIST);
}
} else {
addAction(menu, ITextEditorActionConstants.GROUP_COPY, ITextEditorActionConstants.COPY);
}
IAction preferencesAction = getAction(ITextEditorActionConstants.CONTEXT_PREFERENCES);
if (preferencesAction != null) {
menu.appendToGroup(GROUP_SQL_PREFERENCES, preferencesAction);
}
for (IActionContributor ac : actionContributors) {
ac.contributeActions(menu);
}
}
use of org.eclipse.jface.action.GroupMarker in project dbeaver by dbeaver.
the class ValueViewerPanel method fillToolBar.
private void fillToolBar(final IContributionManager contributionManager) {
contributionManager.add(new Separator());
if (valueManager != null) {
try {
valueManager.contributeActions(contributionManager, previewController, valueEditor);
} catch (Exception e) {
log.error("Can't contribute value manager actions", e);
}
}
contributionManager.add(new GroupMarker(IValueManager.GROUP_ACTIONS_ADDITIONAL));
if (valueEditor != null && !valueEditor.isReadOnly()) {
contributionManager.add(ActionUtils.makeCommandContribution(presentation.getController().getSite(), ValueViewCommandHandler.CMD_SAVE_VALUE));
contributionManager.add(new Action("Auto-apply value", Action.AS_CHECK_BOX) {
{
setImageDescriptor(DBeaverIcons.getImageDescriptor(UIIcon.AUTO_SAVE));
}
@Override
public boolean isChecked() {
return DBWorkbench.getPlatform().getPreferenceStore().getBoolean(ResultSetPreferences.RS_EDIT_AUTO_UPDATE_VALUE);
}
@Override
public void run() {
boolean newValue = !isChecked();
DBWorkbench.getPlatform().getPreferenceStore().setValue(ResultSetPreferences.RS_EDIT_AUTO_UPDATE_VALUE, newValue);
presentation.getController().updatePanelActions();
}
});
}
}
use of org.eclipse.jface.action.GroupMarker in project archi by archimatetool.
the class ArchimateDiagramEditorActionBarContributor method contributeToEditMenu.
@Override
protected IMenuManager contributeToEditMenu(IMenuManager menuManager) {
IMenuManager editMenu = super.contributeToEditMenu(menuManager);
// Text Positions
IMenuManager textPositionMenu = new MenuManager(Messages.ArchimateDiagramEditorActionBarContributor_1);
for (String id : TextPositionAction.ACTION_IDS) {
textPositionMenu.add(getAction(id));
}
editMenu.appendToGroup(GROUP_EDIT_MENU, textPositionMenu);
editMenu.insertAfter(ArchiActionFactory.DELETE.getId(), new GroupMarker(editDeleteMenuGroup));
editMenu.appendToGroup(editDeleteMenuGroup, getAction(DeleteFromModelAction.ID));
return editMenu;
}
Aggregations