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());
}
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());
}
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);
}
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());
}
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);
}
Aggregations