mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-64708 - IAE: InjectedSelfElementInfo.<init>
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ public class ImplicitVariableElementInfoFactory implements SmartPointerElementIn
|
||||
}
|
||||
|
||||
private static class ImplicitVariableInfo extends HardElementInfo {
|
||||
public ImplicitVariableInfo(@NotNull ImplicitVariable var, @NotNull Project project) {
|
||||
private ImplicitVariableInfo(@NotNull ImplicitVariable var, @NotNull Project project) {
|
||||
super(project, var);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ public class ImportListElementInfoFactory implements SmartPointerElementInfoFact
|
||||
}
|
||||
|
||||
private static class ImportListInfo extends FileElementInfo {
|
||||
public ImportListInfo(@NotNull PsiJavaFile file) {
|
||||
private ImportListInfo(@NotNull PsiJavaFile file) {
|
||||
super(file);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -146,11 +146,12 @@ class SmartPsiElementPointerImpl<E extends PsiElement> implements SmartPointerEx
|
||||
}
|
||||
|
||||
FileViewProvider viewProvider = containingFile.getViewProvider();
|
||||
if (viewProvider instanceof FreeThreadedFileViewProvider) {
|
||||
TextRange elementRange = element.getTextRange();
|
||||
if (viewProvider instanceof FreeThreadedFileViewProvider && elementRange != null) {
|
||||
PsiLanguageInjectionHost hostContext = InjectedLanguageManager.getInstance(containingFile.getProject()).getInjectionHost(containingFile);
|
||||
if (hostContext != null) {
|
||||
SmartPsiElementPointer<PsiLanguageInjectionHost> hostPointer = SmartPointerManager.getInstance(project).createSmartPsiElementPointer(hostContext);
|
||||
return new InjectedSelfElementInfo(project, element, element.getTextRange(), containingFile, hostPointer);
|
||||
return new InjectedSelfElementInfo(project, element, elementRange, containingFile, hostPointer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +164,6 @@ class SmartPsiElementPointerImpl<E extends PsiElement> implements SmartPointerEx
|
||||
return new FileElementInfo((PsiFile)element);
|
||||
}
|
||||
|
||||
TextRange elementRange = element.getTextRange();
|
||||
if (elementRange == null) {
|
||||
return new HardElementInfo(project, element);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user