KT-1651 Navigation to enum constants doesn't work for libraries with and without source code
#KT-1651 fixed
This commit is contained in:
@@ -63,7 +63,14 @@ public class JetClsNavigationPolicy implements ClsCustomNavigationPolicy {
|
||||
@Override
|
||||
@Nullable
|
||||
public PsiElement getNavigationElement(@NotNull ClsFieldImpl clsField) {
|
||||
return getJetDeclarationByClsElement(clsField);
|
||||
JetDeclaration jetDeclaration = getJetDeclarationByClsElement(clsField);
|
||||
if (jetDeclaration instanceof JetProperty) {
|
||||
JetDeclaration sourceProperty = JetSourceNavigationHelper.getSourceProperty((JetProperty) jetDeclaration);
|
||||
if (sourceProperty != null) {
|
||||
return sourceProperty;
|
||||
}
|
||||
}
|
||||
return jetDeclaration;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -4,4 +4,5 @@ val color: Color? = Color.RED
|
||||
val rgb = color?.rgb
|
||||
|
||||
// main.kt
|
||||
//public enum class <1><2>Color(val <3>rgb : Int) {
|
||||
//public enum class <1><2>Color(val <4>rgb : Int) {
|
||||
// <3>RED : Color(0xFF0000)
|
||||
Reference in New Issue
Block a user