Add presentation renderer for field declared in constructor
This commit is contained in:
@@ -219,6 +219,8 @@
|
||||
forClass="org.jetbrains.jet.lang.psi.JetClass"/>
|
||||
<itemPresentationProvider implementationClass="org.jetbrains.jet.plugin.presentation.JetPropertyPresenter"
|
||||
forClass="org.jetbrains.jet.lang.psi.JetProperty"/>
|
||||
<itemPresentationProvider implementationClass="org.jetbrains.jet.plugin.presentation.JetParameterPresenter"
|
||||
forClass="org.jetbrains.jet.lang.psi.JetParameter"/>
|
||||
<gotoTargetRendererProvider id="JetGotoTargetRenderProvider" implementation="org.jetbrains.jet.plugin.JetGotoTargetRenderProvider"
|
||||
order="first"/>
|
||||
<elementDescriptionProvider implementation="org.jetbrains.jet.plugin.findUsages.JetElementDescriptionProvider"/>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.presentation;
|
||||
|
||||
import com.intellij.navigation.ItemPresentation;
|
||||
import com.intellij.navigation.ItemPresentationProvider;
|
||||
import org.jetbrains.jet.lang.psi.JetParameter;
|
||||
|
||||
public class JetParameterPresenter implements ItemPresentationProvider<JetParameter> {
|
||||
@Override
|
||||
public ItemPresentation getPresentation(JetParameter item) {
|
||||
return new JetDefaultNamedDeclarationPresentation(item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package testing
|
||||
|
||||
open class Test(open var <caret>some: Int)
|
||||
|
||||
class OtherTestInConstructor(override var some: Int): Test(some)
|
||||
|
||||
class OtherTestInBody(some: Int, other: String): Test(some) {
|
||||
override var some: Int = some
|
||||
}
|
||||
|
||||
// REF: (testing.OtherTestInConstructor).some
|
||||
// REF: (testing.OtherTestInBody).some
|
||||
@@ -41,6 +41,10 @@ public class JetGotoImplementationTest extends LightCodeInsightTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testConstructorPropertyOverriddenNavigation() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
|
||||
Reference in New Issue
Block a user