/** * Notifies this action that the given selection has changed. This default * implementation sets the action's enablement state to <code>false</code>. * * @param selection the new selection */ public void selectionChanged(ISelection selection) { setEnabled(false); }
/** * Notifies this action that the given selection has changed. This default * implementation sets the action's enablement state to <code>false</code>. * * @param selection the new selection */ public void selectionChanged(ISelection selection) { setEnabled(false); }
/** * Notifies this action that the given selection has changed. This default * implementation sets the action's enablement state to <code>false</code>. * * @param selection the new selection */ public void selectionChanged(ISelection selection) { setEnabled(false); }
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); } };
MessageDialog.openInformation(shell, ActionMessages.ModifyParameterAction_problem_title, ActionMessages.ModifyParameterAction_problem_message); action.setEnabled(wasEnabled);
MessageDialog.openInformation(shell, ActionMessages.ModifyParameterAction_problem_title, ActionMessages.ModifyParameterAction_problem_message); action.setEnabled(wasEnabled);