use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class ActionManager method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction() {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
refreshActionList();
}
};
actionNew = new Action() {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
createAction();
}
};
actionNew.setText(Messages.get().ActionManager_ActionNew);
actionNew.setImageDescriptor(SharedIcons.ADD_OBJECT);
actionEdit = new Action() {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
editAction();
}
};
actionEdit.setText(Messages.get().ActionManager_ActionProperties);
actionEdit.setImageDescriptor(SharedIcons.EDIT);
actionDelete = new Action() {
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
deleteActions();
}
};
actionDelete.setText(Messages.get().ActionManager_ActionDelete);
actionDelete.setImageDescriptor(SharedIcons.DELETE_OBJECT);
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class LineChartElement method createActions.
/**
* Create actions
*/
private void createActions() {
actionRefresh = new RefreshAction() {
@Override
public void run() {
refreshData();
}
};
actionAdjustX = HistoricalGraphView.createAction(ActionType.ADJUST_X, chart);
actionAdjustY = HistoricalGraphView.createAction(ActionType.ADJUST_Y, chart);
actionAdjustBoth = HistoricalGraphView.createAction(ActionType.ADJUST_BOTH, chart);
presetActions = HistoricalGraphView.createPresetActions(new HistoricalGraphView.PresetHandler() {
@Override
public void onPresetSelected(int units, int range) {
config.setTimeUnits(units);
config.setTimeRange(range);
refreshData();
}
});
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class AgentFileManager method createActions.
/**
* Create actions
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefreshDirectory = new Action(Messages.get().AgentFileManager_RefreshFolder, SharedIcons.REFRESH) {
@Override
public void run() {
refreshFileOrDirectory();
}
};
// $NON-NLS-1$
actionRefreshDirectory.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.refreshFolder");
handlerService.activateHandler(actionRefreshDirectory.getActionDefinitionId(), new ActionHandler(actionRefreshDirectory));
actionRefreshAll = new RefreshAction(this) {
@Override
public void run() {
refreshFileList();
}
};
actionUploadFile = new Action(Messages.get().AgentFileManager_UploadFile) {
@Override
public void run() {
uploadFile(false);
}
};
// $NON-NLS-1$
actionUploadFile.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.uploadFile");
handlerService.activateHandler(actionUploadFile.getActionDefinitionId(), new ActionHandler(actionUploadFile));
actionDelete = new Action(Messages.get().AgentFileManager_Delete, SharedIcons.DELETE_OBJECT) {
@Override
public void run() {
deleteFile();
}
};
// $NON-NLS-1$
actionDelete.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.delete");
handlerService.activateHandler(actionDelete.getActionDefinitionId(), new ActionHandler(actionDelete));
actionRename = new Action(Messages.get().AgentFileManager_Rename) {
@Override
public void run() {
renameFile();
}
};
// $NON-NLS-1$
actionRename.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.rename");
handlerService.activateHandler(actionRename.getActionDefinitionId(), new ActionHandler(actionRename));
actionShowFilter = new Action(Messages.get().ViewServerFile_ShowFilterAction, 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.filemanager.commands.showFilter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
actionDownloadFile = new Action(Messages.get().AgentFileManager_Download) {
@Override
public void run() {
startDownload();
}
};
// $NON-NLS-1$
actionDownloadFile.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.download");
handlerService.activateHandler(actionDownloadFile.getActionDefinitionId(), new ActionHandler(actionDownloadFile));
actionTailFile = new Action(Messages.get().AgentFileManager_FollowChanges) {
@Override
public void run() {
tailFile(true, 1024);
}
};
actionShowFile = new Action(Messages.get().AgentFileManager_Show) {
@Override
public void run() {
tailFile(false, 0);
}
};
actionCreateDirectory = new Action(Messages.get().AgentFileManager_CreateFolder) {
@Override
public void run() {
createFolder();
}
};
// $NON-NLS-1$
actionCreateDirectory.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.newFolder");
handlerService.activateHandler(actionCreateDirectory.getActionDefinitionId(), new ActionHandler(actionCreateDirectory));
actionCalculateFolderSize = new Action("Calculate folder &size") {
@Override
public void run() {
calculateFolderSize();
}
};
// $NON-NLS-1$
actionCalculateFolderSize.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.calculateFolderSize");
handlerService.activateHandler(actionCalculateFolderSize.getActionDefinitionId(), new ActionHandler(actionCalculateFolderSize));
actionCopyFileName = new Action("Copy file &name") {
@Override
public void run() {
copyFileName();
}
};
// $NON-NLS-1$
actionCopyFileName.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.copyFileName");
handlerService.activateHandler(actionCopyFileName.getActionDefinitionId(), new ActionHandler(actionCopyFileName));
actionCopyFilePath = new Action("Copy file &path") {
@Override
public void run() {
copyFilePath();
}
};
// $NON-NLS-1$
actionCopyFilePath.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.copyFilePath");
handlerService.activateHandler(actionCopyFilePath.getActionDefinitionId(), new ActionHandler(actionCopyFilePath));
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class ServerFileManager method createActions.
/**
* Create actions
*/
private void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
refreshFileList();
}
};
actionNew = new Action(Messages.get().ViewServerFile_UploadFileOnServerAction) {
@Override
public void run() {
createFile();
}
};
actionNew.setImageDescriptor(SharedIcons.ADD_OBJECT);
actionDelete = new Action(Messages.get().ViewServerFile_DeleteFileOnServerAction) {
@Override
public void run() {
deleteFile();
}
};
actionDelete.setImageDescriptor(SharedIcons.DELETE_OBJECT);
actionShowFilter = new Action(Messages.get().ViewServerFile_ShowFilterAction, Action.AS_CHECK_BOX) {
@Override
public void run() {
enableFilter(!initShowFilter);
actionShowFilter.setChecked(initShowFilter);
}
};
actionShowFilter.setImageDescriptor(SharedIcons.FILTER);
actionShowFilter.setChecked(initShowFilter);
// $NON-NLS-1$
actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.filemanager.commands.showFilter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.
the class LogViewer method createActions.
/**
* Create actions
*/
protected void createActions() {
final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
actionRefresh = new RefreshAction(this) {
@Override
public void run() {
refreshData();
}
};
actionRefresh.setEnabled(false);
actionExecute = new Action(Messages.get().LogViewer_ActionExec, SharedIcons.EXECUTE) {
@Override
public void run() {
doQuery();
}
};
// $NON-NLS-1$
actionExecute.setActionDefinitionId("org.netxms.ui.eclipse.logviewer.commands.execute");
handlerService.activateHandler(actionExecute.getActionDefinitionId(), new ActionHandler(actionExecute));
actionClearFilter = new Action(Messages.get().LogViewer_ActionClearFilter, SharedIcons.CLEAR_LOG) {
@Override
public void run() {
filterBuilder.clearFilter();
}
};
actionGetMoreData = new // $NON-NLS-1$
Action(// $NON-NLS-1$
Messages.get().LogViewer_ActionGetMoreData, // $NON-NLS-1$
Activator.getImageDescriptor("icons/get_more_data.png")) {
@Override
public void run() {
getMoreData();
}
};
actionGetMoreData.setEnabled(false);
// $NON-NLS-1$
actionGetMoreData.setActionDefinitionId("org.netxms.ui.eclipse.logviewer.commands.get_more_data");
handlerService.activateHandler(actionGetMoreData.getActionDefinitionId(), new ActionHandler(actionGetMoreData));
actionShowFilter = new Action(Messages.get().LogViewer_ActionShowFilter, Action.AS_CHECK_BOX) {
@Override
public void run() {
showFilter(actionShowFilter.isChecked());
}
};
actionShowFilter.setChecked(true);
// $NON-NLS-1$
actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.logviewer.commands.show_filter");
handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
actionExportToCsv = new ExportToCsvAction(this, viewer, true);
actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Aggregations