/** * Returns the Action service * */ public ActionService getActionService() { return new ActionService(); }
public static boolean showAction(String dbType, String actionId) { SQLDevToolsConfiguration f = null; f = getConfigurationByDBDefName(dbType); if (f != null) { return f.getActionService().supportsAction(actionId); } return false; }
protected void fillContextMenu(IMenuManager menu) { super.fillContextMenu(menu); // TODO add debug action menu.add(new Separator()); // 2006-07-20 // Fix 380668-1 Users are confused by 'Execute' and 'Run' context menu // in the editor. // Keep Execute All, but will only be enabled when youre editing a SQL // file. Disabled at all other times. menu.remove(ISQLEditorActionConstants.EXECUTE_SQL_ACTION_ID); SQLDevToolsConfiguration config = SQLToolsFacade .getConfigurationByVendorIdentifier(getConnectionInfo() .getDatabaseVendorDefinitionId()); ActionService actionService = config.getActionService(); if (actionService.supportsAction(ISQLEditorActionConstants.RUN_ACTION_ID)) { // Run addAction(menu, ISQLEditorActionConstants.GROUP_SQLEDITOR_EXECUTE, ISQLEditorActionConstants.RUN_ACTION_ID); } if (actionService.supportsAction(ISQLEditorActionConstants.DEBUG_ACTION_ID)) { // Debug addAction(menu, ISQLEditorActionConstants.GROUP_SQLEDITOR_EXECUTE, ISQLEditorActionConstants.DEBUG_ACTION_ID); } addAction(menu, ITextEditorActionConstants.GROUP_UNDO, ISQLEditorActionConstants.REFRESH_FROM_DATABASE_ACTION_ID); addAction(menu, ISQLEditorActionConstants.GROUP_SQLEDITOR_SAVE, ISQLEditorActionConstants.SAVE_TO_DATABASE_ACTION_ID); }
SQLEditorService editorService = config.getSQLEditorService(); if (actionServie.supportsAction(ISQLEditorActionConstants.EXECUTE_SQL_ACTION_ID)) if (actionServie.supportsAction(ISQLEditorActionConstants.EXECUTE_SELECTION_SQL_ACTION_ID)) if (planOption != null && (actionServie.supportsAction(ISQLEditorActionConstants.EXPLAIN_SQL_ACTION_ID)))