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
3366d029
Commit
3366d029
authored
6 years ago
by
Daniil Ovchinnikov
Browse files
Options
Download
Email Patches
Plain Diff
[groovy] make place in BaseGroovyResolveResult non-null
parent
f74d3725
Branches unavailable
Tags unavailable
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/BaseGroovyResolveResult.kt
+3
-4
...ns/plugins/groovy/lang/resolve/BaseGroovyResolveResult.kt
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/ClassResolveResult.kt
+2
-2
...tbrains/plugins/groovy/lang/resolve/ClassResolveResult.kt
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/processors/ClassProcessor.kt
+1
-1
.../plugins/groovy/lang/resolve/processors/ClassProcessor.kt
with
6 additions
and
7 deletions
+6
-7
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/BaseGroovyResolveResult.kt
+
3
-
4
View file @
3366d029
...
...
@@ -10,13 +10,13 @@ import org.jetbrains.plugins.groovy.lang.resolve.processors.ClassHint
open
class
BaseGroovyResolveResult
<
out
T
:
PsiElement
>(
element
:
T
,
private
val
place
:
PsiElement
?
,
private
val
place
:
PsiElement
,
private
val
resolveContext
:
PsiElement
?
=
null
,
private
val
substitutor
:
PsiSubstitutor
=
PsiSubstitutor
.
EMPTY
,
private
val
spreadState
:
SpreadState
?
=
null
)
:
ElementResolveResult
<
T
>(
element
)
{
constructor
(
element
:
T
,
place
:
PsiElement
?
,
state
:
ResolveState
)
:
this
(
constructor
(
element
:
T
,
place
:
PsiElement
,
state
:
ResolveState
)
:
this
(
element
,
place
,
resolveContext
=
state
[
ClassHint
.
RESOLVE_CONTEXT
],
...
...
@@ -25,7 +25,7 @@ open class BaseGroovyResolveResult<out T : PsiElement>(
)
private
val
accessible
by
lazy
(
LazyThreadSafetyMode
.
PUBLICATION
)
{
element
!
is
PsiMember
||
place
==
null
||
PsiUtil
.
isAccessible
(
place
,
element
)
element
!
is
PsiMember
||
PsiUtil
.
isAccessible
(
place
,
element
)
}
override
fun
isAccessible
():
Boolean
=
accessible
...
...
@@ -33,7 +33,6 @@ open class BaseGroovyResolveResult<out T : PsiElement>(
private
val
staticsOk
by
lazy
(
LazyThreadSafetyMode
.
PUBLICATION
)
{
resolveContext
is
GrImportStatement
||
element
!
is
PsiModifierListOwner
||
place
==
null
||
GrStaticChecker
.
isStaticsOK
(
element
,
place
,
resolveContext
,
false
)
}
...
...
This diff is collapsed.
Click to expand it.
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/ClassResolveResult.kt
+
2
-
2
View file @
3366d029
// Copyright 2000-201
7
JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-201
8
JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package
org.jetbrains.plugins.groovy.lang.resolve
import
com.intellij.psi.PsiClass
...
...
@@ -7,7 +7,7 @@ import com.intellij.psi.PsiSubstitutor
class
ClassResolveResult
(
element
:
PsiClass
,
place
:
PsiElement
?
,
place
:
PsiElement
,
resolveContext
:
PsiElement
?,
substitutor
:
PsiSubstitutor
)
:
BaseGroovyResolveResult
<
PsiClass
>(
element
,
place
,
resolveContext
,
substitutor
)
This diff is collapsed.
Click to expand it.
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/resolve/processors/ClassProcessor.kt
+
1
-
1
View file @
3366d029
...
...
@@ -9,7 +9,7 @@ import org.jetbrains.plugins.groovy.lang.resolve.imports.importedNameKey
internal
open
class
ClassProcessor
(
private
val
name
:
String
,
private
val
place
:
PsiElement
?
,
private
val
place
:
PsiElement
,
private
val
typeArguments
:
Array
<
out
PsiType
>
=
PsiType
.
EMPTY_ARRAY
,
annotationResolve
:
Boolean
=
false
)
:
FindFirstProcessor
<
ClassResolveResult
>()
{
...
...
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
Menu
Projects
Groups
Snippets
Help