@Override public boolean process(SymbolCollectingProcessor.ResultWithContext result) { final PsiElement context = result.getFileContext(); myProcessor.handleEvent(JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT, context); final PsiNamedElement element = result.getElement(); if(element instanceof PsiClass && context instanceof PsiImportStatement) { final PsiClass containingClass = ((PsiClass) element).getContainingClass(); if(containingClass != null && containingClass.hasTypeParameters()) { return myProcessor.execute(element, myState.put(PsiSubstitutor.KEY, createRawSubstitutor(containingClass))); } } return myProcessor.execute(element, myState); }
@Override public Result<MostlySingularMultiMap<String, SymbolCollectingProcessor.ResultWithContext>> compute() { SymbolCollectingProcessor p = new SymbolCollectingProcessor(); myFile.processDeclarationsNoGuess(p, ResolveState.initial(), myFile, myFile); MostlySingularMultiMap<String, SymbolCollectingProcessor.ResultWithContext> results = p.getResults(); return Result.create(results, PsiModificationTracker.MODIFICATION_COUNT, myFile); }
@Override public boolean process(SymbolCollectingProcessor.ResultWithContext result) { final PsiElement context = result.getFileContext(); myProcessor.handleEvent(JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT, context); final PsiNamedElement element = result.getElement(); if (element instanceof PsiClass && context instanceof PsiImportStatement) { final PsiClass containingClass = ((PsiClass)element).getContainingClass(); if (containingClass != null && containingClass.hasTypeParameters()) { return myProcessor.execute(element, myState.put(PsiSubstitutor.KEY, createRawSubstitutor(containingClass))); } } return myProcessor.execute(element, myState); }
@Override public Result<MostlySingularMultiMap<String, SymbolCollectingProcessor.ResultWithContext>> compute() { SymbolCollectingProcessor p = new SymbolCollectingProcessor(); myFile.processDeclarationsNoGuess(p, ResolveState.initial(), myFile, myFile); MostlySingularMultiMap<String, SymbolCollectingProcessor.ResultWithContext> results = p.getResults(); return Result.create(results, PsiModificationTracker.JAVA_STRUCTURE_MODIFICATION_COUNT); }
@Override public boolean process(SymbolCollectingProcessor.ResultWithContext result) { myProcessor.handleEvent(JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT, result.getFileContext()); return myProcessor.execute(result.getElement(), myState); }