Search in sources :

Example 36 with RefreshAction

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

the class PersistentStorageView method createActions.

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

        @Override
        public void run() {
            refresh();
        }
    };
    actionCreate = new Action("Create new", SharedIcons.ADD_OBJECT) {

        @Override
        public void run() {
            createValue();
        }
    };
    // $NON-NLS-1$
    actionCreate.setActionDefinitionId("org.netxms.ui.eclipse.serverconfig.commands.new_task");
    handlerService.activateHandler(actionCreate.getActionDefinitionId(), new ActionHandler(actionCreate));
    actionEdit = new Action("Set", SharedIcons.EDIT) {

        @Override
        public void run() {
            editValue();
        }
    };
    // $NON-NLS-1$
    actionEdit.setActionDefinitionId("org.netxms.ui.eclipse.serverconfig.commands.edit_task");
    handlerService.activateHandler(actionEdit.getActionDefinitionId(), new ActionHandler(actionEdit));
    actionDelete = new Action("Delete", SharedIcons.DELETE_OBJECT) {

        @Override
        public void run() {
            deleteValue();
        }
    };
}
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 37 with RefreshAction

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

the class ServerConfigurationEditor method createActions.

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

        @Override
        public void run() {
            refresh();
        }
    };
    actionAdd = new Action(Messages.get().ServerConfigurationEditor_ActionCreate, SharedIcons.ADD_OBJECT) {

        @Override
        public void run() {
            addVariable();
        }
    };
    // $NON-NLS-1$
    actionAdd.setActionDefinitionId("org.netxms.ui.eclipse.serverconfig.commands.add_config_variable");
    handlerService.activateHandler(actionAdd.getActionDefinitionId(), new ActionHandler(actionAdd));
    actionEdit = new Action(Messages.get().ServerConfigurationEditor_ActionEdit, SharedIcons.EDIT) {

        @Override
        public void run() {
            editVariable();
        }
    };
    actionEdit.setEnabled(false);
    actionDelete = new Action(Messages.get().ServerConfigurationEditor_ActionDelete, SharedIcons.DELETE_OBJECT) {

        @Override
        public void run() {
            deleteVariables();
        }
    };
    actionDelete.setEnabled(false);
    actionShowFilter = new Action("Show filter", 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.serverconfig.commands.show_filter");
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
    actionDefaultValue = new Action("Set default value") {

        @Override
        public void run() {
            setDefaultValue();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) Action(org.eclipse.jface.action.Action) IHandlerService(org.eclipse.ui.handlers.IHandlerService) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) ActionHandler(org.eclipse.jface.commands.ActionHandler) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction)

Example 38 with RefreshAction

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

the class SwitchForwardingDatabaseView method createActions.

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

        @Override
        public void run() {
            refresh();
        }
    };
    actionExportToCsv = new ExportToCsvAction(this, viewer, true);
    actionExportAllToCsv = new ExportToCsvAction(this, viewer, false);
    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.topology.commands.show_filter");
    handlerService.activateHandler(actionShowFilter.getActionDefinitionId(), new ActionHandler(actionShowFilter));
}
Also used : ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) 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) ExportToCsvAction(org.netxms.ui.eclipse.actions.ExportToCsvAction) ActionHandler(org.eclipse.jface.commands.ActionHandler)

Example 39 with RefreshAction

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

the class RoutingTableView 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 40 with RefreshAction

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

the class UserManagementView method makeActions.

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

        @Override
        public void run() {
            viewer.setInput(session.getUserDatabaseObjects());
        }
    };
    actionAddUser = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().UserManagementView_CreateNewUser, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/user_add.png")) {

        @Override
        public void run() {
            addUser();
        }
    };
    actionAddGroup = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().UserManagementView_CreateNewGroup, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/group_add.png")) {

        @Override
        public void run() {
            addGroup();
        }
    };
    actionEditUser = new PropertyDialogAction(getSite(), viewer);
    actionEditUser.setText(Messages.get().UserManagementView_Properties);
    actionEditUser.setImageDescriptor(SharedIcons.EDIT);
    actionEditUser.setEnabled(false);
    actionDeleteUser = new Action(Messages.get().UserManagementView_Delete, SharedIcons.DELETE_OBJECT) {

        @Override
        public void run() {
            deleteUser();
        }
    };
    actionDeleteUser.setEnabled(false);
    actionChangePassword = new // $NON-NLS-1$
    Action(// $NON-NLS-1$
    Messages.get().UserManagementView_ChangePassword, // $NON-NLS-1$
    Activator.getImageDescriptor("icons/change_password.png")) {

        @Override
        public void run() {
            changePassword();
        }
    };
    actionChangePassword.setEnabled(false);
    actionEnable = new Action(Messages.get().UserManagementView_Enable) {

        @Override
        public void run() {
            enableUser();
        }
    };
    actionDisable = new Action(Messages.get().UserManagementView_Disable) {

        @Override
        public void run() {
            disableUser();
        }
    };
    actionDetachUserFromLDAP = new Action(Messages.get().UserManagementView_DetachFromLDAP) {

        @Override
        public void run() {
            detachLDAPUser();
        }
    };
}
Also used : Action(org.eclipse.jface.action.Action) PropertyDialogAction(org.eclipse.ui.dialogs.PropertyDialogAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) RefreshAction(org.netxms.ui.eclipse.actions.RefreshAction) PropertyDialogAction(org.eclipse.ui.dialogs.PropertyDialogAction)

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