Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
2b62316d
Commit
2b62316d
authored
6 years ago
by
Dmitry Avdeev
1
Browse files
Options
Download
Email Patches
Plain Diff
EA-101625 - SOE: FileReference.getContexts
parent
eb976569
Branches unavailable
Tags unavailable
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/analysis-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReference.java
+7
-1
...ource/resolve/reference/impl/providers/FileReference.java
with
7 additions
and
1 deletion
+7
-1
platform/analysis-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReference.java
+
7
-
1
View file @
2b62316d
...
...
@@ -14,6 +14,7 @@ import com.intellij.openapi.fileTypes.FileType;
import
com.intellij.openapi.fileTypes.FileTypeRegistry
;
import
com.intellij.openapi.fileTypes.UnknownFileType
;
import
com.intellij.openapi.project.Project
;
import
com.intellij.openapi.util.RecursionManager
;
import
com.intellij.openapi.util.SystemInfo
;
import
com.intellij.openapi.util.TextRange
;
import
com.intellij.openapi.util.io.FileUtil
;
...
...
@@ -128,7 +129,12 @@ public class FileReference implements PsiFileReference, FileReferenceOwner, PsiP
if
(
referenceText
.
isEmpty
()
&&
myIndex
==
0
)
{
return
new
ResolveResult
[]{
new
PsiElementResolveResult
(
containingFile
)};
}
final
Collection
<
PsiFileSystemItem
>
contexts
=
getContexts
();
final
Collection
<
PsiFileSystemItem
>
contexts
=
RecursionManager
.
doPreventingRecursion
(
this
,
false
,
()
->
getContexts
());
if
(
contexts
==
null
)
{
LOG
.
error
(
"Recursion occurred for "
+
getClass
()
+
" on "
+
getElement
().
getText
());
return
ResolveResult
.
EMPTY_ARRAY
;
}
final
Collection
<
ResolveResult
>
result
=
new
THashSet
<>();
for
(
final
PsiFileSystemItem
context
:
contexts
)
{
innerResolveInContext
(
referenceText
,
context
,
result
,
caseSensitive
);
...
...
This diff is collapsed.
Click to expand it.
小 白蛋
@baidan
mentioned in commit
3cb292d8
·
2 years ago
mentioned in commit
3cb292d8
mentioned in commit 3cb292d8744e6d7ee4ae7c48a7bbe7d217610be6
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help