Handle compact constructor in regular class: quick-fix to add () (IDEA-228460)

GitOrigin-RevId: c019e19e8023c0209f6e5ed54f8a486689bb0e0a
This commit is contained in:
Tagir Valeev
2019-12-18 11:37:51 +00:00
committed by intellij-monorepo-bot
parent e29a0e3102
commit 662cb5deae
11 changed files with 123 additions and 8 deletions
@@ -0,0 +1,5 @@
class NotRecord {
public <error descr="Parameter list expected">NotRecord</error> {
}
}
@@ -0,0 +1,6 @@
// "Insert '()'" "true"
class NotRecord {
public NotRecord() {
}
}
@@ -0,0 +1,6 @@
// "Insert '()'" "true"
class NotRecord {
public <caret>NotRecord {
}
}
@@ -27,6 +27,9 @@ public class LightRecordsHighlightingTest extends LightJavaCodeInsightFixtureTes
public void testRecordConstructors() {
doTest();
}
public void testRecordCompactConstructors() {
doTest();
}
private void doTest() {
myFixture.configureByFile(getTestName(false) + ".java");
@@ -0,0 +1,14 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInsight.daemon.quickFix;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
public class AddParameterListTest extends LightQuickFixParameterizedTestCase {
@Override
protected String getBasePath() {
return "/codeInsight/daemonCodeAnalyzer/quickFix/addParameterList";
}
}