Ejemplo n.º 1
0
 /**
  * Note: This method is for internal use only. Clients should not call this method.
  *
  * @param selection the java text selection
  * @noreference This method is not intended to be referenced by clients.
  */
 @Override
 public void selectionChanged(JavaTextSelection selection) {
   try {
     setEnabled(RefactoringAvailabilityTester.isGeneralizeTypeAvailable(selection));
   } catch (JavaModelException e) {
     setEnabled(false);
   }
 }
Ejemplo n.º 2
0
 @Override
 public void selectionChanged(IStructuredSelection selection) {
   try {
     setEnabled(RefactoringAvailabilityTester.isGeneralizeTypeAvailable(selection));
   } catch (JavaModelException e) {
     if (JavaModelUtil.isExceptionToBeLogged(e)) JavaPlugin.log(e);
     setEnabled(false);
   }
 }