Пример #1
0
 /** Basically just replaces "renamed" with "created" in all messages. */
 private static RefactoringStatus convertRenameToCreateStatus(RefactoringStatus renameStatus) {
   RefactoringStatus result = new RefactoringStatus();
   for (RefactoringStatusEntry entry : renameStatus.getEntries()) {
     String msg = entry.getMessage();
     msg = RenameAnalyzeUtil.convertRenameMessageToCreateMessage(msg);
     result.addEntry(
         entry.getSeverity(), msg, entry.getContext(), entry.getPluginId(), entry.getCode());
   }
   return result;
 }
Пример #2
0
 private void searchForOverrides(
     SearchEngine engine,
     DartElement element,
     SearchScope scope,
     SearchFilter filter,
     SearchResultCollector listener,
     IProgressMonitor monitor)
     throws CoreException {
   switch (element.getElementType()) {
     case DartElement.CLASS_TYPE_ALIAS:
     case DartElement.FUNCTION_TYPE_ALIAS:
     case DartElement.FUNCTION:
     case DartElement.FIELD:
     case DartElement.IMPORT:
     case DartElement.TYPE:
     case DartElement.TYPE_PARAMETER:
     case DartElement.VARIABLE:
       {
         break;
       }
     case DartElement.METHOD:
       {
         MemberDeclarationsReferences memberInfo;
         memberInfo = RenameAnalyzeUtil.findDeclarationsReferences((Method) element, monitor);
         for (TypeMember member : memberInfo.declarations) {
           SearchMatch match =
               new SearchMatch(MatchQuality.EXACT, member, member.getSourceRange());
           listener.matchFound(match);
         }
         break;
       }
     default:
       throw new UnsupportedOperationException(
           "unsupported search type: " + element.getClass()); // $NON-NLS-1$
   }
 }