diff --git a/idea/testData/navigation/implementations/ClassImplementatorsWithDeclaration.kt b/idea/testData/navigation/implementations/ClassImplementatorsWithDeclaration.kt index 1d0279d8167..af72de405dd 100644 --- a/idea/testData/navigation/implementations/ClassImplementatorsWithDeclaration.kt +++ b/idea/testData/navigation/implementations/ClassImplementatorsWithDeclaration.kt @@ -6,6 +6,6 @@ open class TestOther : Test() class TestOtherMore : TestOther() -// REF: Test -// REF: TestOther -// REF: TestOtherMore +// REF: (testing).Test +// REF: (testing).TestOther +// REF: (testing).TestOtherMore diff --git a/idea/testData/navigation/implementations/ClassNavigation.kt b/idea/testData/navigation/implementations/ClassNavigation.kt index fd85a5a0eb9..cdafd29e3fb 100644 --- a/idea/testData/navigation/implementations/ClassNavigation.kt +++ b/idea/testData/navigation/implementations/ClassNavigation.kt @@ -6,5 +6,5 @@ open class TestOther : Test() class TestOtherMore : TestOther() -// REF: TestOtherMore -// REF: TestOther +// REF: (testing).TestOther +// REF: (testing).TestOtherMore diff --git a/idea/tests/org/jetbrains/jet/plugin/navigation/JetGotoImplementationTest.java b/idea/tests/org/jetbrains/jet/plugin/navigation/JetGotoImplementationTest.java index e9cc658e048..3ba202f21e2 100644 --- a/idea/tests/org/jetbrains/jet/plugin/navigation/JetGotoImplementationTest.java +++ b/idea/tests/org/jetbrains/jet/plugin/navigation/JetGotoImplementationTest.java @@ -27,7 +27,9 @@ import com.intellij.openapi.projectRoots.Sdk; import com.intellij.psi.PsiElement; import com.intellij.testFramework.LightCodeInsightTestCase; import org.jetbrains.annotations.Nullable; +import org.jetbrains.jet.asJava.JetLightClass; import org.jetbrains.jet.plugin.PluginTestCaseBase; +import org.jetbrains.jet.plugin.presentation.JetLightClassListCellRenderer; import org.jetbrains.jet.testing.InTextDirectivesUtils; import java.io.File; @@ -65,17 +67,24 @@ public class JetGotoImplementationTest extends LightCodeInsightTestCase { InTextDirectivesUtils.findListWithPrefix("// REF:", getEditor().getDocument().getText())); Collections.sort(expectedReferences); - GotoTargetHandler.GotoData elements = new GotoImplementationHandler().getSourceAndTargetElements(getEditor(), getFile()); + final GotoTargetHandler.GotoData gotoData = new GotoImplementationHandler().getSourceAndTargetElements(getEditor(), getFile()); - if (elements != null) { - List psiElements = Lists.transform(Arrays.asList(elements.targets), new Function() { + if (gotoData != null) { + List psiElements = Lists.transform(Arrays.asList(gotoData.targets), new Function() { @Override public String apply(@Nullable PsiElement element) { assertNotNull(element); + if (element instanceof JetLightClass) { + JetLightClass jetLightClass = (JetLightClass) element; + JetLightClassListCellRenderer renderer = new JetLightClassListCellRenderer(); + return JetLightClassListCellRenderer.getContainerTextStatic(jetLightClass) + "." + + renderer.getElementText(jetLightClass); + } + assertTrue(element instanceof NavigationItem); ItemPresentation presentation = ((NavigationItem)element).getPresentation(); assertNotNull(presentation); - return presentation.getPresentableText(); + return presentation.getLocationString() + "." + presentation.getPresentableText(); } });