Striking out deprecated functions in parameter info.

This commit is contained in:
Evgeny Gerashchenko
2013-12-24 22:46:22 +04:00
parent 56d7f2a2d5
commit c616b4baa0
3 changed files with 16 additions and 1 deletions
@@ -41,6 +41,7 @@ import org.jetbrains.jet.lang.resolve.name.Name;
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.types.JetType;
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import org.jetbrains.jet.lexer.JetTokens;
import org.jetbrains.jet.plugin.codeInsight.TipsManager;
import org.jetbrains.jet.plugin.project.AnalyzerFacadeWithCache;
@@ -220,7 +221,7 @@ public class JetFunctionParameterInfoHandler implements ParameterInfoHandlerWith
int boldStartOffset = -1;
int boldEndOffset = -1;
boolean isGrey = false;
boolean isDeprecated = false; //todo: add deprecation check
boolean isDeprecated = KotlinBuiltIns.getInstance().isDeprecated(functionDescriptor);
boolean[] usedIndexes = new boolean[valueParameters.size()];
Arrays.fill(usedIndexes, false);
@@ -0,0 +1,10 @@
deprecated("") fun f(x: Int) = 2
fun f(x: Int, y: Boolean) = 3
fun d(x: Int) {
f(<caret>1)
}
/*
Text: (<highlight>x: Int</highlight>), Disabled: false, Strikeout: true, Green: true
Text: (<highlight>x: Int</highlight>, y: Boolean), Disabled: false, Strikeout: false, Green: false
*/
@@ -79,6 +79,10 @@ public class JetFunctionParameterInfoTest extends LightCodeInsightFixtureTestCas
doTest();
}
public void testDeprecated() {
doTest();
}
@Override
protected void setUp() throws Exception {
super.setUp();