use of org.csstudio.trends.databrowser3.ui.RefreshAction in project org.csstudio.display.builder by kasemir.
the class DataBrowserEditor method fillContextMenu.
/**
* Dynamically fill context menu
* @param manager
*/
private void fillContextMenu(final IMenuManager manager) {
final Activator activator = Activator.getDefault();
final Shell shell = getSite().getShell();
final UndoableActionManager op_manager = plot.getPlot().getUndoableActionManager();
manager.add(toggle_toolbar);
manager.add(toggle_legend);
manager.add(new Separator());
manager.add(new AddPVAction(op_manager, shell, model, false));
manager.add(new AddPVAction(op_manager, shell, model, true));
final boolean is_rcp = SingleSourcePlugin.getUIHelper().getUI() == UI.RCP;
if (is_rcp) {
try {
for (IAction imp : SampleImporters.createImportActions(op_manager, shell, model)) manager.add(imp);
} catch (Exception ex) {
ExceptionDetailsErrorDialog.openError(shell, Messages.Error, ex);
}
}
manager.add(new RemoveUnusedAxesAction(op_manager, model));
manager.add(new RefreshAction(controller));
manager.add(new Separator());
manager.add(new OpenPropertiesAction());
manager.add(new OpenViewAction(SearchView.ID, Messages.OpenSearchView, activator.getImageDescriptor("icons/search.gif")));
if (is_rcp)
manager.add(new OpenViewAction(ExportView.ID, Messages.OpenExportView, activator.getImageDescriptor("icons/export.png")));
manager.add(new OpenViewAction(SampleView.ID, Messages.InspectSamples, activator.getImageDescriptor("icons/inspect.gif")));
manager.add(new OpenPerspectiveAction(activator.getImageDescriptor("icons/databrowser.png"), Messages.OpenDataBrowserPerspective, Perspective.ID));
manager.add(new OpenViewAction(WaveformView.ID, Messages.OpenWaveformView, activator.getImageDescriptor("icons/wavesample.gif")));
manager.add(new Separator());
manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
if (is_rcp) {
manager.add(new Separator());
manager.add(snapshot);
if (EMailSender.isEmailSupported())
manager.add(new SendEMailAction(shell, plot.getPlot()));
manager.add(new PrintAction(shell, plot.getPlot()));
if (SendToElogAction.isElogAvailable())
manager.add(new SendToElogAction(shell, plot.getPlot()));
}
}
Aggregations