Quickfix for NO_BACKING_FIELD_CUSTOM_ACCESSORS

This commit is contained in:
Michał Sapalski
2013-02-18 11:42:38 +01:00
committed by Nikolay Krasko
parent d1a443d952
commit 102f49b251
4 changed files with 20 additions and 0 deletions
@@ -121,6 +121,7 @@ public class QuickFixes {
JetIntentionActionFactory changeToPropertyNameFactory = ChangeToPropertyNameFix.createFactory();
factories.put(NO_BACKING_FIELD_ABSTRACT_PROPERTY, changeToPropertyNameFactory);
factories.put(NO_BACKING_FIELD_CUSTOM_ACCESSORS, changeToPropertyNameFactory);
JetIntentionActionFactory unresolvedReferenceFactory = ImportClassAndFunFix.createFactory();
factories.put(UNRESOLVED_REFERENCE, unresolvedReferenceFactory);
@@ -0,0 +1,7 @@
// "Change '$foo' to 'foo'" "true"
class A {
val foo : Int
get() = 5
val bar : Int
get() = <caret>foo
}
@@ -0,0 +1,7 @@
// "Change '$foo' to 'foo'" "true"
class A {
val foo : Int
get() = 5
val bar : Int
get() = $<caret>foo
}
@@ -835,6 +835,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/quickfix/variables/changeToPropertyName"), Pattern.compile("^before(\\w+)\\.kt$"), true);
}
@TestMetadata("beforeCustomAccessors.kt")
public void testCustomAccessors() throws Exception {
doTest("idea/testData/quickfix/variables/changeToPropertyName/beforeCustomAccessors.kt");
}
}
public static Test innerSuite() {