Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
290154bf
Commit
290154bf
authored
7 years ago
by
Anton Bragin
Browse files
Options
Download
Email Patches
Plain Diff
PY-28560 [WIP] Resolve by reference resolve providers extracted
parent
a55549dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java
+9
-4
...jetbrains/python/psi/impl/references/PyReferenceImpl.java
with
9 additions
and
4 deletions
+9
-4
python/src/com/jetbrains/python/psi/impl/references/PyReferenceImpl.java
+
9
-
4
View file @
290154bf
...
...
@@ -256,7 +256,12 @@ public class PyReferenceImpl implements PsiReferenceEx, PsiPolyVariantReference
final
ScopeOwner
roof
=
findResolveRoof
(
referencedName
,
realContext
);
PyResolveUtil
.
scopeCrawlUp
(
processor
,
myElement
,
referencedName
,
roof
);
return
getResultsFromProcessor
(
referencedName
,
processor
,
realContext
,
roof
);
final
List
<
RatedResolveResult
>
resultsFromProcessor
=
getResultsFromProcessor
(
referencedName
,
processor
,
realContext
,
roof
);
if
(!
resultsFromProcessor
.
isEmpty
())
{
return
resultsFromProcessor
;
}
return
resolveByReferenceResolveProviders
();
}
protected
final
List
<
RatedResolveResult
>
getResultsFromProcessor
(
@NotNull
String
referencedName
,
...
...
@@ -326,19 +331,19 @@ public class PyReferenceImpl implements PsiReferenceEx, PsiPolyVariantReference
if
(!
unreachableLocalDeclaration
)
{
if
(
referenceOwner
!=
null
)
{
ResolveResultList
outerScopeResults
=
resolveInOuterScopes
(
referencedName
,
referenceOwner
,
resolveRoof
,
typeEvalContext
);
final
ResolveResultList
outerScopeResults
=
resolveInOuterScopes
(
referencedName
,
referenceOwner
,
resolveRoof
,
typeEvalContext
);
if
(!
outerScopeResults
.
isEmpty
())
{
return
outerScopeResults
;
}
}
ResolveResultList
localScopeResults
=
getLocalDeclarationResults
(
processor
,
realContext
,
typeEvalContext
,
referenceOwner
);
final
ResolveResultList
localScopeResults
=
getLocalDeclarationResults
(
processor
,
realContext
,
typeEvalContext
,
referenceOwner
);
if
(!
localScopeResults
.
isEmpty
())
{
return
localScopeResults
;
}
}
return
resolveByReferenceResolveProviders
();
return
Collections
.
emptyList
();
}
@NotNull
...
...
This diff is collapsed.
Click to expand it.
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