mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IDEA-61333
This commit is contained in:
@@ -304,11 +304,11 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava
|
||||
}
|
||||
}
|
||||
|
||||
if(classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.PACKAGE)){
|
||||
final PsiPackage rootPackage = JavaPsiFacade.getInstance(getProject()).findPackage("");
|
||||
processor.handleEvent(JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT, rootPackage);
|
||||
if(rootPackage != null) rootPackage.processDeclarations(processor, state, null, place);
|
||||
}
|
||||
//if(classHint == null || classHint.shouldProcess(ElementClassHint.DeclarationKind.PACKAGE)){
|
||||
// final PsiPackage rootPackage = JavaPsiFacade.getInstance(getProject()).findPackage("");
|
||||
// processor.handleEvent(JavaScopeProcessorEvent.SET_CURRENT_FILE_CONTEXT, rootPackage);
|
||||
// if(rootPackage != null) rootPackage.processDeclarations(processor, state, null, place);
|
||||
//}
|
||||
|
||||
final PsiImportList importList = getImportList();
|
||||
final PsiImportStaticStatement[] importStaticStatements = importList.getImportStaticStatements();
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package x;
|
||||
|
||||
class InvalidUse {
|
||||
<error descr="Cannot resolve symbol 'Test'">Test</error> t = null;
|
||||
}
|
||||
@@ -79,6 +79,7 @@ public class AdvHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
public void testAlreadyImportedClass() throws Exception { doTest(BASE_PATH+"/alreadyImportedClass/pack/AlreadyImportedClass.java", BASE_PATH+"/alreadyImportedClass", false, false); }
|
||||
public void testImportDefaultPackage() throws Exception { doTest(BASE_PATH+"/importDefaultPackage/x/Usage.java", BASE_PATH+"/importDefaultPackage", false, false); }
|
||||
public void testImportDefaultPackage2() throws Exception { doTest(BASE_PATH+"/importDefaultPackage/x/ImportOnDemandUsage.java", BASE_PATH+"/importDefaultPackage", false, false); }
|
||||
public void testImportDefaultPackageInvalid() throws Exception { doTest(BASE_PATH+"/importDefaultPackage/x/InvalidUse.java", BASE_PATH+"/importDefaultPackage", false, false); }
|
||||
|
||||
public void testScopeBased() throws Exception {
|
||||
NamedScope xScope = new NamedScope("xxx", new PatternPackageSet("x..*", PatternPackageSet.SCOPE_SOURCE, null));
|
||||
|
||||
Reference in New Issue
Block a user