Search in sources :

Example 1 with RefreshAction

use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.

the class ServerJobManager method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction() {

        @Override
        public void run() {
            refreshJobList(true);
        }
    };
    actionCancelJob = new Action(Messages.get().ServerJobManager_Cancel) {

        @Override
        public void run() {
            cancelServerJob();
        }
    };
    // $NON-NLS-1$
    actionCancelJob.setImageDescriptor(Activator.getImageDescriptor("icons/cancel.png"));
    actionCancelJob.setEnabled(false);
    actionHoldJob = new Action(Messages.get().ServerJobManager_Hold) {

        @Override
        public void run() {
            holdServerJob();
        }
    };
    // $NON-NLS-1$
    actionHoldJob.setImageDescriptor(Activator.getImageDescriptor("icons/hold.gif"));
    actionHoldJob.setEnabled(false);
    actionUnholdJob = new Action(Messages.get().ServerJobManager_Unhold) {

        @Override
        public void run() {
            unholdServerJob();
        }
    };
    // $NON-NLS-1$
    actionUnholdJob.setImageDescriptor(Activator.getImageDescriptor("icons/unhold.gif"));
    actionUnholdJob.setEnabled(false);
    actionRestartJob = new Action(Messages.get().ServerJobManager_Restart) {

        @Override
        public void run() {
        }
    };
    actionRestartJob.setEnabled(false);
}
Also used : Action(org.eclipse.jface.action.Action) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction)

Example 2 with RefreshAction

use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.

the class Dot1xStatusView method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refresh();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Also used : RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 3 with RefreshAction

use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.

the class RepositoryManager method createActions.

/**
 * Create actions
 */
private void createActions() {
    final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refreshRepositoryList();
        }
    };
    actionShowFilter = new Action("Show &filter", Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            enableFilter(!filterEnabled);
            actionShowFilter.setChecked(filterEnabled);
        }
    };
    actionShowFilter.setChecked(filterEnabled);
    // $NON-NLS-1$
    actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.market.commands.showFilter");
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
    actionAddRepository = new Action("&Add repository...", SharedIcons.ADD_OBJECT) {

        @Override
        public void run() {
            addRepository();
        }
    };
    actionDelete = new Action("&Delete", SharedIcons.DELETE_OBJECT) {

        @Override
        public void run() {
            deleteRepository();
        }
    };
    actionMark = new Action("&Mark for installation") {

        @Override
        public void run() {
            markForInstallation(true);
        }
    };
    // $NON-NLS-1$
    actionMark.setActionDefinitionId("org.netxms.ui.eclipse.market.commands.mark");
    handlerService.activateHandler(actionMark.getActionDefinitionId(), new ActionHandler(actionMark));
    actionUnmark = new Action("&Unmark for installation") {

        @Override
        public void run() {
            markForInstallation(false);
        }
    };
    // $NON-NLS-1$
    actionUnmark.setActionDefinitionId("org.netxms.ui.eclipse.market.commands.unmark");
    handlerService.activateHandler(actionUnmark.getActionDefinitionId(), new ActionHandler(actionUnmark));
    actionInstall = new Action("&Install", Activator.getImageDescriptor("icons/install.gif")) {

        @Override
        public void run() {
            install();
        }
    };
    // $NON-NLS-1$
    actionInstall.setActionDefinitionId("org.netxms.ui.eclipse.market.commands.install");
    handlerService.activateHandler(actionInstall.getActionDefinitionId(), new ActionHandler(actionInstall));
}
Also used : Action(org.eclipse.jface.action.Action) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) IHandlerService(org.eclipse.ui.handlers.IHandlerService) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ActionHandler(org.eclipse.jface.commands.ActionHandler)

Example 4 with RefreshAction

use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.

the class TunnelManager method createActions.

/**
 * Create actions
 */
private void createActions() {
    actionRefresh = new RefreshAction(this) {

        @Override
        public void run() {
            refresh();
        }
    };
    actionCreateNode = new Action("&Create node and bind...") {

        @Override
        public void run() {
            createNode();
        }
    };
    actionBind = new Action("&Bind to...") {

        @Override
        public void run() {
            bindTunnel();
        }
    };
    actionUnbind = new Action("&Unbind") {

        @Override
        public void run() {
            unbindTunnel();
        }
    };
    actionShowFilter = new Action("&Show filter") {

        /*
          * (non-Javadoc)
          * 
          * @see org.eclipse.jface.action.Action#run()
          */
        @Override
        public void run() {
            enableFilter(actionShowFilter.isChecked());
        }
    };
    actionShowFilter.setImageDescriptor(SharedIcons.FILTER);
    actionShowFilter.setChecked(initShowfilter);
    // $NON-NLS-1$
    actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.agentmanager.commands.show_filter");
    final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
Also used : Action(org.eclipse.jface.action.Action) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) IHandlerService(org.eclipse.ui.handlers.IHandlerService) ActionHandler(org.eclipse.jface.commands.ActionHandler)

Example 5 with RefreshAction

use of org.netxms.ui.eclipse.actions.RefreshAction in project netxms by netxms.

the class LastValues method createActions.

/**
 * Create actions
 */
private void createActions() {
    final IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
    actionRefresh = new RefreshAction() {

        @Override
        public void run() {
            dataView.refresh();
        }
    };
    actionAutoUpdate = new Action(Messages.get().LastValues_AutoRefresh, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            dataView.setAutoRefreshEnabled(actionAutoUpdate.isChecked());
        }
    };
    actionAutoUpdate.setChecked(dataView.isAutoRefreshEnabled());
    actionShowFilter = new Action(Messages.get().LastValues_ShowFilter, Action.AS_CHECK_BOX) {

        @Override
        public void run() {
            dataView.enableFilter(!dataView.isFilterEnabled());
            actionShowFilter.setChecked(dataView.isFilterEnabled());
        }
    };
    actionShowFilter.setImageDescriptor(SharedIcons.FILTER);
    actionShowFilter.setChecked(initShowFilter);
    // $NON-NLS-1$
    actionShowFilter.setActionDefinitionId("org.netxms.ui.eclipse.datacollection.commands.show_dci_filter");
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
Also used : Action(org.eclipse.jface.action.Action) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) IHandlerService(org.eclipse.ui.handlers.IHandlerService) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ActionHandler(org.eclipse.jface.commands.ActionHandler)

Aggregations

RefreshAction (org.netxms.ui.eclipse.actions.RefreshAction)55 Action (org.eclipse.jface.action.Action)44 IHandlerService (org.eclipse.ui.handlers.IHandlerService)25 ActionHandler (org.eclipse.jface.commands.ActionHandler)23 ExportToCsvAction (org.netxms.ui.eclipse.actions.ExportToCsvAction)17 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)4 ActionHandler (org.eclipse.ui.commands.ActionHandler)2 PropertyDialogAction (org.eclipse.ui.dialogs.PropertyDialogAction)2 IOException (java.io.IOException)1 Iterator (java.util.Iterator)1 Point (org.eclipse.draw2d.geometry.Point)1 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 SWTException (org.eclipse.swt.SWTException)1 PropertyDialog (org.eclipse.ui.internal.dialogs.PropertyDialog)1 LibraryImage (org.netxms.client.LibraryImage)1 NXCException (org.netxms.client.NXCException)1 ServerAction (org.netxms.client.ServerAction)1 GraphSettings (org.netxms.client.datacollection.GraphSettings)1 MapLayoutAlgorithm (org.netxms.client.maps.MapLayoutAlgorithm)1