diff --git a/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java b/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java new file mode 100644 index 00000000000..13896fdb420 --- /dev/null +++ b/idea/src/org/jetbrains/jet/plugin/highlighter/DeprecatedAnnotationVisitor.java @@ -0,0 +1,261 @@ +/* + * Copyright 2010-2012 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.highlighter; + +import com.intellij.lang.annotation.AnnotationHolder; +import com.intellij.openapi.editor.colors.CodeInsightColors; +import com.intellij.psi.CommonClassNames; +import com.intellij.psi.PsiElement; +import com.intellij.psi.tree.IElementType; +import com.intellij.psi.tree.TokenSet; +import com.intellij.psi.util.PsiTreeUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.JetNodeTypes; +import org.jetbrains.jet.lang.descriptors.*; +import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor; +import org.jetbrains.jet.lang.psi.*; +import org.jetbrains.jet.lang.resolve.BindingContext; +import org.jetbrains.jet.lang.resolve.DescriptorUtils; +import org.jetbrains.jet.lang.resolve.calls.ResolvedCall; +import org.jetbrains.jet.lang.resolve.calls.VariableAsFunctionResolvedCall; +import org.jetbrains.jet.lang.types.TypeUtils; +import org.jetbrains.jet.lexer.JetTokens; +import org.jetbrains.jet.resolve.DescriptorRenderer; + +import java.util.List; + + +public class DeprecatedAnnotationVisitor extends AfterAnalysisHighlightingVisitor { + + private static final TokenSet PROPERTY_SET_OPERATIONS = + TokenSet.create(JetTokens.EQ, JetTokens.PLUSEQ, JetTokens.MINUSEQ, JetTokens.MULTEQ, + JetTokens.DIVEQ, JetTokens.PERCEQ, JetTokens.PLUSPLUS, JetTokens.MINUSMINUS); + + protected DeprecatedAnnotationVisitor(AnnotationHolder holder, BindingContext bindingContext) { + super(holder, bindingContext); + } + + @Override + public void visitSuperExpression(JetSuperExpression expression) { + // Deprecated for super expression. Unnecessary to mark it as Deprecated + } + + @Override + public void visitReferenceExpression(JetReferenceExpression expression) { + super.visitReferenceExpression(expression); + ResolvedCall resolvedCall = bindingContext.get(BindingContext.RESOLVED_CALL, expression); + if (resolvedCall != null && resolvedCall instanceof VariableAsFunctionResolvedCall) { + // Deprecated for invoke() + JetCallExpression parent = PsiTreeUtil.getParentOfType(expression, JetCallExpression.class); + if (parent != null && isDeprecated(resolvedCall.getResultingDescriptor().getAnnotations())) { + reportAnnotation(parent, resolvedCall.getResultingDescriptor(), true); + } + } + if (expression.getNode().getElementType() == JetNodeTypes.OPERATION_REFERENCE) { + // Deprecated for operations (mark as warning) + checkDeprecatedForOperations(expression); + } + else { + checkDeprecatedForReferenceExpression(expression); + } + } + + private void checkDeprecatedForReferenceExpression(@NotNull JetReferenceExpression expression) { + DeclarationDescriptor target = bindingContext.get(BindingContext.REFERENCE_TARGET, expression); + if (target != null) { + if (target instanceof ConstructorDescriptor) { + checkConstructorDescriptor(expression, target); + } + else if (target instanceof ClassDescriptor) { + checkClassDescriptor(expression, (ClassDescriptor) target); + } + else if (target instanceof PropertyDescriptor) { + checkPropertyDescriptor(expression, (PropertyDescriptor) target); + } + else if (target instanceof FunctionDescriptor) { + checkFunctionDescriptor(expression, target); + } + } + } + + private void checkFunctionDescriptor(JetExpression expression, DeclarationDescriptor target) { + // Deprecated for Function + if (isDeprecated(target.getAnnotations())) { + reportAnnotation(expression, target, expression instanceof JetArrayAccessExpression); + } + } + + private void checkConstructorDescriptor(@NotNull JetExpression expression, @NotNull DeclarationDescriptor target) { + // Deprecated for Class and for Constructor + DeclarationDescriptor containingDeclaration = target.getContainingDeclaration(); + if (containingDeclaration != null) { + if (isDeprecated(containingDeclaration.getAnnotations()) || isDeprecated(target.getAnnotations())) { + reportAnnotation(expression, containingDeclaration); + } + } + } + + private void checkClassDescriptor(@NotNull JetExpression expression, @NotNull ClassDescriptor target) { + // Deprecated for Class, for ClassObject (if reference isn't in UserType or in ModifierList (trait)) + if (isDeprecated(target.getAnnotations())) { + reportAnnotation(expression, target); + } + else if (PsiTreeUtil.getParentOfType(expression, JetUserType.class) == null && + PsiTreeUtil.getParentOfType(expression, JetModifierList.class) == null) { + ClassDescriptor classObjectDescriptor = target.getClassObjectDescriptor(); + if (classObjectDescriptor != null && isDeprecated(classObjectDescriptor.getAnnotations())) { + reportAnnotation(expression, classObjectDescriptor); + } + } + } + + private void checkPropertyDescriptor( + @NotNull JetExpression expression, + @NotNull PropertyDescriptor propertyDescriptor + ) { + // Deprecated for Property + if (isDeprecated(propertyDescriptor.getAnnotations())) { + reportAnnotation(expression, propertyDescriptor, propertyDescriptor.isVar()); + return; + } + + // Deprecated for Getter (val, var), Setter (var) + if (!propertyDescriptor.isVar()) { + checkPropertyGetter(propertyDescriptor, expression); + } + else { + IElementType operation = null; + JetBinaryExpression binaryExpression = PsiTreeUtil.getParentOfType(expression, JetBinaryExpression.class); + if (binaryExpression != null) { + JetExpression left = binaryExpression.getLeft(); + if (left == expression) { + operation = binaryExpression.getOperationToken(); + } + else { + JetReferenceExpression[] jetReferenceExpressions = PsiTreeUtil.getChildrenOfType(left, JetReferenceExpression.class); + if (jetReferenceExpressions != null) { + for (JetReferenceExpression expr : jetReferenceExpressions) { + if (expr == expression) { + operation = binaryExpression.getOperationToken(); + break; + } + } + } + } + } + else { + JetUnaryExpression unaryExpression = PsiTreeUtil.getParentOfType(expression, JetUnaryExpression.class); + if (unaryExpression != null) { + operation = unaryExpression.getOperationReference().getReferencedNameElementType(); + } + } + + if (operation != null && PROPERTY_SET_OPERATIONS.contains(operation)) { + checkPropertySetter(propertyDescriptor, expression); + } + else { + checkPropertyGetter(propertyDescriptor, expression); + } + } + } + + private void checkPropertySetter(@NotNull PropertyDescriptor descriptor, @NotNull JetExpression expression) { + PropertySetterDescriptor setter = descriptor.getSetter(); + if (setter != null) { + checkPropertyAccessor(setter, expression, true); + } + } + + private void checkPropertyGetter(@NotNull PropertyDescriptor descriptor, @NotNull JetExpression expression) { + PropertyGetterDescriptor getter = descriptor.getGetter(); + if (getter != null) { + checkPropertyAccessor(getter, expression, descriptor.isVar()); + } + } + + private void checkPropertyAccessor( + @NotNull PropertyAccessorDescriptor accessor, + @NotNull JetExpression expression, boolean isVar + ) { + if (isDeprecated(accessor.getAnnotations())) { + reportAnnotation(expression, accessor, isVar); + } + } + + private void checkDeprecatedForOperations(@NotNull JetReferenceExpression expression) { + DeclarationDescriptor target = bindingContext.get(BindingContext.REFERENCE_TARGET, expression); + if (target != null) { + if (isDeprecated(target.getAnnotations())) { + reportAnnotation(expression, target, true); + } + } + } + + private void reportAnnotation(@NotNull PsiElement element, @NotNull DeclarationDescriptor descriptor) { + reportAnnotation(element, descriptor, false); + } + + private void reportAnnotation(@NotNull PsiElement element, @NotNull DeclarationDescriptor descriptor, boolean isWarning) { + if (isWarning) { + holder.createInfoAnnotation(element, "'" + renderName(descriptor) + "' is deprecated") + .setTextAttributes(CodeInsightColors.WARNINGS_ATTRIBUTES); + } + else { + holder.createInfoAnnotation(element, "'" + renderName(descriptor) + "' is deprecated") + .setTextAttributes(CodeInsightColors.DEPRECATED_ATTRIBUTES); + } + } + + private static boolean isDeprecated(List list) { + for (AnnotationDescriptor annotation : list) { + ClassDescriptor descriptor = TypeUtils.getClassDescriptor(annotation.getType()); + if (descriptor != null) { + if (DescriptorUtils.getFQName(descriptor).getFqName().equals(CommonClassNames.JAVA_LANG_DEPRECATED)) { + return true; + } + } + } + return false; + } + + private static String renderName(DeclarationDescriptor descriptor) { + if (descriptor instanceof ClassDescriptor) { + return DescriptorUtils.getFQName(descriptor).getFqName(); + } + else if (descriptor instanceof ConstructorDescriptor) { + DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration(); + assert containingDeclaration != null; + return "constructor for " + containingDeclaration.getName(); + } + else if (descriptor instanceof PropertyGetterDescriptor) { + return "getter for " + ((PropertyGetterDescriptor) descriptor).getCorrespondingProperty().getName(); + } + else if (descriptor instanceof PropertySetterDescriptor) { + return "setter for " + ((PropertySetterDescriptor) descriptor).getCorrespondingProperty().getName(); + } + else if (descriptor instanceof PropertyDescriptor) { + if (((PropertyDescriptor) descriptor).isVar()) { + return "var " + descriptor.getName(); + } + return "val " + descriptor.getName(); + } + else if (descriptor instanceof FunctionDescriptor) { + return "fun " + descriptor.getName() + DescriptorRenderer.TEXT.renderFunctionParameters((FunctionDescriptor) descriptor); + } + return DescriptorRenderer.TEXT.render(descriptor); + } +} diff --git a/idea/src/org/jetbrains/jet/plugin/highlighter/JetPsiChecker.java b/idea/src/org/jetbrains/jet/plugin/highlighter/JetPsiChecker.java index ef5788f5662..ca0f0a278ca 100644 --- a/idea/src/org/jetbrains/jet/plugin/highlighter/JetPsiChecker.java +++ b/idea/src/org/jetbrains/jet/plugin/highlighter/JetPsiChecker.java @@ -96,6 +96,7 @@ public class JetPsiChecker implements Annotator { new FunctionsHighlightingVisitor(holder, bindingContext), new VariablesHighlightingVisitor(holder, bindingContext), new TypeKindHighlightingVisitor(holder, bindingContext), + new DeprecatedAnnotationVisitor(holder, bindingContext), }; } diff --git a/idea/testData/highlighter/deprecated/Class.kt b/idea/testData/highlighter/deprecated/Class.kt new file mode 100644 index 00000000000..a6eb2ee529d --- /dev/null +++ b/idea/testData/highlighter/deprecated/Class.kt @@ -0,0 +1,15 @@ +package test + +import java.util.ArrayList + +Deprecated open class MyClass {} + +fun test() { + val a : MyClass? = null + val b = MyClass() + val c = ArrayList<MyClass>() +} + +class Test(): MyClass() {} + +class Test2(param: MyClass) {} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/ClassObject.kt b/idea/testData/highlighter/deprecated/ClassObject.kt new file mode 100644 index 00000000000..c59c82e5590 --- /dev/null +++ b/idea/testData/highlighter/deprecated/ClassObject.kt @@ -0,0 +1,19 @@ +fun test() { + MyClass.test + MyClass() + val a: MyClass? = null + val b: MyTrait? = null + MyTrait.test +} + +class MyClass(): MyTrait { + Deprecated class object { + val test: String = "" + } +} + +trait MyTrait { + Deprecated class object { + val test: String = "" + } +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Function.kt b/idea/testData/highlighter/deprecated/Function.kt new file mode 100644 index 00000000000..9311475e5b9 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Function.kt @@ -0,0 +1,18 @@ +fun test() { + test1() + MyClass().test2() + MyClass.test3() + + test4(1, 2) +} + +Deprecated fun test1() { } +Deprecated fun test4(x: Int, y: Int) { } + +class MyClass() { + Deprecated fun test2() {} + + class object { + Deprecated fun test3() {} + } +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Get.kt b/idea/testData/highlighter/deprecated/Get.kt new file mode 100644 index 00000000000..5a7a9b66c82 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Get.kt @@ -0,0 +1,10 @@ +class MyClass {} + +Deprecated fun MyClass.get(i: MyClass): MyClass { return MyClass() } + +fun test() { + val x1 = MyClass() + val x2 = MyClass() + + x1[x2] +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Getter.kt b/idea/testData/highlighter/deprecated/Getter.kt new file mode 100644 index 00000000000..44a4a2dea8f --- /dev/null +++ b/idea/testData/highlighter/deprecated/Getter.kt @@ -0,0 +1,19 @@ +fun test() { + val c = MyClass() + c.test1 + c.test2 + c.test2 = "" + + c.test3 +} + +class MyClass() { + public val test1: String = "" + [Deprecated] get + + public var test2: String = "" + [Deprecated] get + + Deprecated public val test3: String = "" + [Deprecated] get +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Inc.kt b/idea/testData/highlighter/deprecated/Inc.kt new file mode 100644 index 00000000000..01d05529059 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Inc.kt @@ -0,0 +1,8 @@ +class MyClass {} + +Deprecated fun MyClass.inc(): MyClass { return MyClass() } + +fun test() { + var x3 = MyClass() + x3++ +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Invoke.kt b/idea/testData/highlighter/deprecated/Invoke.kt new file mode 100644 index 00000000000..57df6a96f8a --- /dev/null +++ b/idea/testData/highlighter/deprecated/Invoke.kt @@ -0,0 +1,9 @@ +class MyRunnable() {} + +Deprecated fun MyRunnable.invoke() { +} + +fun test() { + val m = MyRunnable() + m() +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Operation.kt b/idea/testData/highlighter/deprecated/Operation.kt new file mode 100644 index 00000000000..ba79ef2f511 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Operation.kt @@ -0,0 +1,36 @@ +class MyClass {} + +Deprecated fun MyClass.minus(i: MyClass) { } +Deprecated fun MyClass.div(i: MyClass) { } +Deprecated fun MyClass.times(i: MyClass) { } + +Deprecated fun MyClass.not() { } +Deprecated fun MyClass.plus() { } + +Deprecated fun MyClass.contains(i: MyClass): Boolean { return false } + +Deprecated fun MyClass.plusAssign(i: MyClass) { } + +Deprecated fun MyClass.equals(i: Any?): Boolean { return false } +Deprecated fun MyClass.compareTo(i: MyClass): Int { return 0 } + +fun test() { + val x1 = MyClass() + val x2 = MyClass() + + x1 - x2 + x1 / x2 + x1 * x2 + + !x1 + +x1 + + x1 in x2 + x1 !in x2 + + x1 += x2 + + x1 == x2 + x1 != x2 + x1 > x2 +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Property.kt b/idea/testData/highlighter/deprecated/Property.kt new file mode 100644 index 00000000000..0dc1c4a66a1 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Property.kt @@ -0,0 +1,22 @@ +fun test() { + test1 + MyClass().test2 + MyClass.test3 + + test4 + MyClass().test5 + MyClass.test6 +} + +Deprecated val test1: String = "" +Deprecated var test4: String = "" + +class MyClass() { + Deprecated val test2: String = "" + Deprecated var test5: String = "" + + class object { + Deprecated val test3: String = "" + Deprecated var test6: String = "" + } +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/RangeTo.kt b/idea/testData/highlighter/deprecated/RangeTo.kt new file mode 100644 index 00000000000..7b8c19247a9 --- /dev/null +++ b/idea/testData/highlighter/deprecated/RangeTo.kt @@ -0,0 +1,15 @@ +class MyClass { } + +Deprecated fun MyClass.rangeTo(i: MyClass): IntIterator { + throw Exception() +} + +fun test() { + val x1 = MyClass() + val x2 = MyClass() + + for (i in x1..x2) { + + } +} + diff --git a/idea/testData/highlighter/deprecated/Setter.kt b/idea/testData/highlighter/deprecated/Setter.kt new file mode 100644 index 00000000000..0c8d9b52701 --- /dev/null +++ b/idea/testData/highlighter/deprecated/Setter.kt @@ -0,0 +1,26 @@ +fun test() { + MyClass().test1 + MyClass().test1 = 0 + + MyClass().test1++ + MyClass().test1-- + + ++MyClass().test1 + --MyClass().test1 + + MyClass().test1 += 1 + MyClass().test1 -= 1 + MyClass().test1 /= 1 + MyClass().test1 *= 1 + + test2 + test2 = 10 +} + +class MyClass() { + public var test1: Int = 0 + [Deprecated] set +} + +public var test2: Int = 0 + [Deprecated] set \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/SuperCall.kt b/idea/testData/highlighter/deprecated/SuperCall.kt new file mode 100644 index 00000000000..55e7cc3d4d5 --- /dev/null +++ b/idea/testData/highlighter/deprecated/SuperCall.kt @@ -0,0 +1,9 @@ +class MyClass(): Base() { + fun test2() { + super.test1() + } +} + +open class Base() { + fun test1() {} +} \ No newline at end of file diff --git a/idea/testData/highlighter/deprecated/Trait.kt b/idea/testData/highlighter/deprecated/Trait.kt new file mode 100644 index 00000000000..f4f4362ac1f --- /dev/null +++ b/idea/testData/highlighter/deprecated/Trait.kt @@ -0,0 +1,10 @@ +Deprecated trait MyTrait { } + +fun test() { + val a: MyTrait? = null + val b: List<MyTrait>? = null +} + +class Test(): MyTrait { } + +class Test2(param: MyTrait) {} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/highlighter/AbstractDeprecatedHighlightingTest.java b/idea/tests/org/jetbrains/jet/plugin/highlighter/AbstractDeprecatedHighlightingTest.java new file mode 100644 index 00000000000..f636b1ecc99 --- /dev/null +++ b/idea/tests/org/jetbrains/jet/plugin/highlighter/AbstractDeprecatedHighlightingTest.java @@ -0,0 +1,46 @@ +package org.jetbrains.jet.plugin.highlighter; + +import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase; +import com.intellij.openapi.projectRoots.Sdk; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jet.plugin.PluginTestCaseBase; +import org.jetbrains.jet.test.generator.SimpleTestClassModel; +import org.jetbrains.jet.test.generator.TestGenerator; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; + +public abstract class AbstractDeprecatedHighlightingTest extends LightDaemonAnalyzerTestCase { + + @Override + protected Sdk getProjectJDK() { + return PluginTestCaseBase.jdkFromIdeaHome(); + } + + protected void doTest(String filePath) throws Exception { + doTest(getTestName(false) + ".kt", false, true); + } + + @NotNull + @Override + protected String getTestDataPath() { + return PluginTestCaseBase.getTestDataPathBase() + "/highlighter/deprecated/"; + } + + public static void main(String[] args) throws IOException { + String aPackage = "org.jetbrains.jet.plugin.highlighter"; + Class thisClass = AbstractDeprecatedHighlightingTest.class; + new TestGenerator( + "idea/tests/", + aPackage, + "DeprecatedHighlightingTestGenerated", + thisClass, + Arrays.asList( + new SimpleTestClassModel(new File("idea/testData/highlighter/deprecated"), true, "kt", "doTest") + ), + thisClass + ).generateAndSave(); + } + +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/highlighter/DeprecatedHighlightingTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/highlighter/DeprecatedHighlightingTestGenerated.java new file mode 100644 index 00000000000..fabadf12349 --- /dev/null +++ b/idea/tests/org/jetbrains/jet/plugin/highlighter/DeprecatedHighlightingTestGenerated.java @@ -0,0 +1,101 @@ +/* + * Copyright 2010-2012 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.highlighter; + +import junit.framework.Assert; +import junit.framework.Test; +import junit.framework.TestSuite; + +import java.io.File; +import org.jetbrains.jet.JetTestUtils; +import org.jetbrains.jet.test.InnerTestClasses; +import org.jetbrains.jet.test.TestMetadata; + +import org.jetbrains.jet.plugin.highlighter.AbstractDeprecatedHighlightingTest; + +/** This class is generated by {@link org.jetbrains.jet.plugin.highlighter.AbstractDeprecatedHighlightingTest}. DO NOT MODIFY MANUALLY */ +@TestMetadata("idea/testData/highlighter/deprecated") +public class DeprecatedHighlightingTestGenerated extends AbstractDeprecatedHighlightingTest { + public void testAllFilesPresentInDeprecated() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.plugin.highlighter.AbstractDeprecatedHighlightingTest", new File("idea/testData/highlighter/deprecated"), "kt", true); + } + + @TestMetadata("Class.kt") + public void testClass() throws Exception { + doTest("idea/testData/highlighter/deprecated/Class.kt"); + } + + @TestMetadata("ClassObject.kt") + public void testClassObject() throws Exception { + doTest("idea/testData/highlighter/deprecated/ClassObject.kt"); + } + + @TestMetadata("Function.kt") + public void testFunction() throws Exception { + doTest("idea/testData/highlighter/deprecated/Function.kt"); + } + + @TestMetadata("Get.kt") + public void testGet() throws Exception { + doTest("idea/testData/highlighter/deprecated/Get.kt"); + } + + @TestMetadata("Getter.kt") + public void testGetter() throws Exception { + doTest("idea/testData/highlighter/deprecated/Getter.kt"); + } + + @TestMetadata("Inc.kt") + public void testInc() throws Exception { + doTest("idea/testData/highlighter/deprecated/Inc.kt"); + } + + @TestMetadata("Invoke.kt") + public void testInvoke() throws Exception { + doTest("idea/testData/highlighter/deprecated/Invoke.kt"); + } + + @TestMetadata("Operation.kt") + public void testOperation() throws Exception { + doTest("idea/testData/highlighter/deprecated/Operation.kt"); + } + + @TestMetadata("Property.kt") + public void testProperty() throws Exception { + doTest("idea/testData/highlighter/deprecated/Property.kt"); + } + + @TestMetadata("RangeTo.kt") + public void testRangeTo() throws Exception { + doTest("idea/testData/highlighter/deprecated/RangeTo.kt"); + } + + @TestMetadata("Setter.kt") + public void testSetter() throws Exception { + doTest("idea/testData/highlighter/deprecated/Setter.kt"); + } + + @TestMetadata("SuperCall.kt") + public void testSuperCall() throws Exception { + doTest("idea/testData/highlighter/deprecated/SuperCall.kt"); + } + + @TestMetadata("Trait.kt") + public void testTrait() throws Exception { + doTest("idea/testData/highlighter/deprecated/Trait.kt"); + } + +}