Search in sources :

Example 61 with IActionBars

use of org.eclipse.ui.IActionBars in project linuxtools by eclipse.

the class ChartView method createPartControl.

@Override
public void createPartControl(Composite parent) {
    this.parent = parent;
    createActions();
    IActionBars actionBars = getViewSite().getActionBars();
    initToolBar(actionBars.getToolBarManager());
}
Also used : IActionBars(org.eclipse.ui.IActionBars)

Example 62 with IActionBars

use of org.eclipse.ui.IActionBars in project linuxtools by eclipse.

the class AbstractSTDataView method createPartControl.

@Override
public void createPartControl(Composite parent) {
    GridLayout gridLayout = new GridLayout(1, true);
    parent.setLayout(gridLayout);
    createTitle(parent);
    stViewer = createAbstractSTViewer(parent);
    // create the actions before the input is set on the viewer but after
    // the sorter and filter are set so the actions will be enabled correctly.
    createActions();
    final MenuManager mgr = initContextMenu();
    final Menu menu = mgr.createContextMenu(parent);
    stViewer.getViewer().getControl().setMenu(menu);
    getSite().registerContextMenu(mgr, stViewer.getViewer());
    // the selection provider registered
    getSite().setSelectionProvider(stViewer.getViewer());
    IActionBars actionBars = getViewSite().getActionBars();
    initMenu(actionBars.getMenuManager());
    initToolBar(actionBars.getToolBarManager());
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) Menu(org.eclipse.swt.widgets.Menu) IActionBars(org.eclipse.ui.IActionBars)

Example 63 with IActionBars

use of org.eclipse.ui.IActionBars in project linuxtools by eclipse.

the class SourceDisassemblyView method setupFindDialog.

/**
 * Create find dialog and set is as a toolbar action.
 */
private void setupFindDialog() {
    FindReplaceAction findAction = new FindReplaceAction(Platform.getResourceBundle(PerfPlugin.getDefault().getBundle()), null, text.getShell(), this);
    findAction.setImageDescriptor(PerfPlugin.getImageDescriptor(// $NON-NLS-1$
    "icons/search.gif"));
    findAction.setToolTipText(PerfPlugin.STRINGS_SearchSourceDisassembly);
    IActionBars bars = getViewSite().getActionBars();
    bars.getToolBarManager().add(findAction);
    bars.setGlobalActionHandler(ActionFactory.FIND.getId(), findAction);
}
Also used : FindReplaceAction(org.eclipse.ui.texteditor.FindReplaceAction) IActionBars(org.eclipse.ui.IActionBars)

Example 64 with IActionBars

use of org.eclipse.ui.IActionBars in project knime-core by knime.

the class AbstractRepositoryView method contributeToActionBars.

private void contributeToActionBars() {
    initializeFilters();
    // Create drill down adapter
    IActionBars bars = getViewSite().getActionBars();
    fillLocalPullDown(bars.getMenuManager());
    fillLocalToolBar(bars.getToolBarManager());
}
Also used : IActionBars(org.eclipse.ui.IActionBars)

Example 65 with IActionBars

use of org.eclipse.ui.IActionBars in project yamcs-studio by yamcs.

the class CommandHistoryView method createActions.

private void createActions() {
    IActionBars bars = getViewSite().getActionBars();
    IMenuManager mgr = bars.getMenuManager();
    Filter allColumnsFilter = new Filter("Full");
    allColumnsFilter.filterFields.add(Pattern.compile(".*"));
    Action allColumnsAction = new Action("Show all columns", IAction.AS_RADIO_BUTTON) {

        @Override
        public void run() {
            if (isChecked()) {
                applyFilter(allColumnsFilter);
            }
        }
    };
    allColumnsAction.setChecked(true);
    mgr.add(allColumnsAction);
    Filter keyColumnsFilter = new Filter("Brief");
    keyColumnsFilter.filterFields.add(Pattern.compile("^Command$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^PTV$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^Seq.ID$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^FRC$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^DASS$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^MCS$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^[A-Z]$"));
    keyColumnsFilter.filterFields.add(Pattern.compile("^Comment$"));
    mgr.add(new Action("Show key columns", IAction.AS_RADIO_BUTTON) {

        @Override
        public void run() {
            if (isChecked()) {
                applyFilter(keyColumnsFilter);
            }
        }
    });
    mgr.add(new Separator());
    Action showRelativeTimeAction = new Action("Show relative time", IAction.AS_CHECK_BOX) {

        @Override
        public void run() {
            showRelativeTime = isChecked();
            tableViewer.refresh();
        }
    };
    showRelativeTimeAction.setChecked(showRelativeTime);
    mgr.add(showRelativeTimeAction);
}
Also used : IAction(org.eclipse.jface.action.IAction) Action(org.eclipse.jface.action.Action) Filter(org.yamcs.studio.commanding.cmdhist.CommandHistoryFilters.Filter) IMenuManager(org.eclipse.jface.action.IMenuManager) IActionBars(org.eclipse.ui.IActionBars) Separator(org.eclipse.jface.action.Separator)

Aggregations

IActionBars (org.eclipse.ui.IActionBars)65 IToolBarManager (org.eclipse.jface.action.IToolBarManager)21 Action (org.eclipse.jface.action.Action)19 IMenuManager (org.eclipse.jface.action.IMenuManager)8 RecordAction (com.cubrid.cubridmanager.ui.monitoring.editor.internal.RecordAction)6 IAction (org.eclipse.jface.action.IAction)6 Separator (org.eclipse.jface.action.Separator)6 TableLayout (org.eclipse.jface.viewers.TableLayout)3 GridLayout (org.eclipse.swt.layout.GridLayout)3 ActionManager (com.cubrid.common.ui.spi.action.ActionManager)2 ApplyServerInfo (com.cubrid.cubridmanager.core.broker.model.ApplyServerInfo)2 ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)2 BrokerStatusSettingDlg (com.cubrid.cubridmanager.ui.broker.editor.internal.BrokerStatusSettingDlg)2 ArrayList (java.util.ArrayList)2 MenuManager (org.eclipse.jface.action.MenuManager)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)2 Menu (org.eclipse.swt.widgets.Menu)2 Tree (org.eclipse.swt.widgets.Tree)2 CopyAction (org.talend.designer.runtime.visualization.internal.actions.CopyAction)2 HttpClient (aQute.bnd.http.HttpClient)1