use of org.netxms.ui.eclipse.actions.ExportToCsvAction in project netxms by netxms.
the class MibExplorer method createActions.
/**
* Create actions
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefresh = new RefreshAction() {
@Override
public void run() {
mibBrowser.refreshTree();
}
};
actionWalk = new Action(Messages.get().MibExplorer_Walk) {
@Override
public void run() {
doWalk();
}
};
actionWalk.setEnabled(currentNode != null);
actionSetNode = new Action(Messages.get().MibExplorer_SetNodeObject) {
@Override
public void run() {
ObjectSelectionDialog dlg = new ObjectSelectionDialog(MibExplorer.this.getSite().getShell(), null, ObjectSelectionDialog.createNodeSelectionFilter(false));
dlg.enableMultiSelection(false);
if (dlg.open() == Window.OK) {
setNode((AbstractNode) dlg.getSelectedObjects().get(0));
}
}
};
actionSelect = new Action("Select in MIB tree") {
@Override
public void run() {
selectInTree();
}
};
actionSelect.setEnabled(false);
actionExportToCsv = new ExportToCsvAction(this, viewer, true);
actionShowFilter = new Action("Show filter", Action.AS_CHECK_BOX) {
@Override
public void run() {
enableFilter(!initShowFilter);
actionShowFilter.setChecked(initShowFilter);
}
};
actionShowFilter.setChecked(initShowFilter);
// $NON-NLS-1$
actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.snmp.commands.showFilter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
Aggregations