public String getSQLStatements() { if(explainAsRoutineObject()) { return _procSql; } else { return super.getSQLStatements(); } }
private void runDelegate() { super.run(); }
/** * Constructor * * @param targetEditor the editor in which this action will be applied */ public ExplainSQLActionDelegate(SQLEditor targetEditor) { setText(Messages.getString("ExplainSQLActionDelegate.action_title")); //$NON-NLS-1$ setToolTipText(Messages.getString("ExplainSQLActionDelegate.action_tooltip")); //$NON-NLS-1$ setImageDescriptor(Images.DESC_EXPLAIN_SQL); setActionDefinitionId(ISQLEditorActionConstants.EXPLAIN_SQL_ACTION_ID); setActiveEditor(targetEditor); targetEditor.getSelectionProvider().addSelectionChangedListener(this); update(); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IHelpContextIds.GET_EXECUTION_PLAN_ACTION); }
/** * Updates the action when selection changes * * @param event */ public void selectionChanged(SelectionChangedEvent event) { if (event.getSelection() instanceof ITextSelection) { update(); } } }
public void update() { setEnabled(_sqlEditor != null && (_sqlEditor.isConnected()) && super.canBeEnabled()); }
&& super.canBeEnabled()); setEnabled(_sqlEditor != null && (_sqlEditor.isConnected()) && super.canBeEnabled());