/** * Notifies this action that the given text selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(ITextSelection selection) { selectionChanged((ISelection)selection); }
/** * Notifies this action that the given text selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(ITextSelection selection) { selectionChanged((ISelection)selection); }
/** * Notifies this action that the given text selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(ITextSelection selection) { selectionChanged((ISelection)selection); }
/** * Note: This method is for internal use only. Clients should not call this method. * * @param selection the selection * * @noreference This method is not intended to be referenced by clients. */ public void selectionChanged(JavaTextSelection selection) { selectionChanged((ITextSelection)selection); }
/** * Notifies this action that the given structured selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(IStructuredSelection selection) { selectionChanged((ISelection)selection); }
private void dispatchSelectionChanged(ISelection selection) { if (selection instanceof IStructuredSelection) { selectionChanged((IStructuredSelection)selection); } else if (selection instanceof JavaTextSelection) { selectionChanged((JavaTextSelection)selection); } else if (selection instanceof ITextSelection) { selectionChanged((ITextSelection)selection); } else { selectionChanged(selection); } }
/** * Notifies this action that the given structured selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(IStructuredSelection selection) { selectionChanged((ISelection)selection); }
private void dispatchSelectionChanged(ISelection selection) { if (selection instanceof IStructuredSelection) { selectionChanged((IStructuredSelection)selection); } else if (selection instanceof JavaTextSelection) { selectionChanged((JavaTextSelection)selection); } else if (selection instanceof ITextSelection) { selectionChanged((ITextSelection)selection); } else { selectionChanged(selection); } }
/** * Note: This method is for internal use only. Clients should not call this method. * * @param selection the selection * * @noreference This method is not intended to be referenced by clients. */ public void selectionChanged(JavaTextSelection selection) { selectionChanged((ITextSelection)selection); }
/** * Notifies this action that the given structured selection has changed. This default * implementation calls <code>selectionChanged(ISelection selection)</code>. * * @param selection the new selection */ public void selectionChanged(IStructuredSelection selection) { selectionChanged((ISelection)selection); }
/** * Note: This method is for internal use only. Clients should not call this method. * * @param selection the selection */ public void selectionChanged(JavaTextSelection selection) { selectionChanged((ITextSelection)selection); }
private void dispatchSelectionChanged(ISelection selection) { if (selection instanceof IStructuredSelection) { selectionChanged((IStructuredSelection)selection); } else if (selection instanceof JavaTextSelection) { selectionChanged((JavaTextSelection)selection); } else if (selection instanceof ITextSelection) { selectionChanged((ITextSelection)selection); } else { selectionChanged(selection); } }
/** * @see SelectionDispatchAction#selectionChanged(ISelection) */ public void selectionChanged(ISelection selection) { if (selection instanceof IStructuredSelection) setEnabledFromSelection((IStructuredSelection) selection); else super.selectionChanged(selection); }
/** * @see SelectionDispatchAction#selectionChanged(ISelection) */ public void selectionChanged(ISelection selection) { if (selection instanceof IStructuredSelection) setEnabledFromSelection((IStructuredSelection) selection); else super.selectionChanged(selection); }
public final boolean activate(final Refactoring ref, final Shell parent, final int saveMode) throws CoreException { final RefactoringStatus status= ref.checkInitialConditions(new NullProgressMonitor()); if (status.hasFatalError()) { final RefactoringStatusEntry entry= status.getEntryMatchingSeverity(RefactoringStatus.FATAL); if (entry.getCode() == RefactoringStatusCodes.OVERRIDES_ANOTHER_METHOD || entry.getCode() == RefactoringStatusCodes.METHOD_DECLARED_IN_INTERFACE) { String message= entry.getMessage(); final Object element= entry.getData(); message= message + RefactoringMessages.RefactoringErrorDialogUtil_okToPerformQuestion; if (element != null && MessageDialog.openQuestion(shell, RefactoringMessages.OpenRefactoringWizardAction_refactoring, message)) { final IStructuredSelection selection= new StructuredSelection(element); // TODO: should not hijack this // ModifiyParametersAction. // The action is set up on an editor, but we use it // as if it were set up on a ViewPart. boolean wasEnabled= action.isEnabled(); action.selectionChanged(selection); if (action.isEnabled()) { action.run(selection); } else { MessageDialog.openInformation(shell, ActionMessages.ModifyParameterAction_problem_title, ActionMessages.ModifyParameterAction_problem_message); } action.setEnabled(wasEnabled); } return false; } } return super.activate(ref, parent, saveMode); } };
action.selectionChanged(selection); if (action.isEnabled()) { action.run(selection);
action.selectionChanged(selection); if (action.isEnabled()) { action.run(selection);