mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: simpler predefined template
"classes with parameterless constructors"
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ class JavaPredefinedConfigurations {
|
||||
|
||||
createSearchTemplateInfo(
|
||||
SSRBundle.message("predefined.configuration.class.with.parameterless.constructors"),
|
||||
"class 'Class {\n '_Method{0,0}:[ script( \"__context__.constructor\" ) ]('_ParameterType '_Parameter+);\n}",
|
||||
"class 'Class {\n '_Method{0,0}('_ParameterType '_Parameter+);\n}",
|
||||
CLASS_TYPE
|
||||
),
|
||||
|
||||
|
||||
+21
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 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.
|
||||
// Copyright 2000-2018 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.structuralsearch;
|
||||
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
@@ -57,6 +57,26 @@ public class JavaPredefinedConfigurationsTest extends StructuralSearchTestCase {
|
||||
asList("X() {}",
|
||||
"X(int i) { System.out.println(i); }",
|
||||
"X(String... ss) {}")));
|
||||
testCases.put(SSRBundle.message("predefined.configuration.class.with.parameterless.constructors"),
|
||||
pair("class X {" +
|
||||
" X() {}" +
|
||||
"}" +
|
||||
"class Y {" +
|
||||
" Y() {}" +
|
||||
" Y(String name) {}" +
|
||||
"}" +
|
||||
"class Z {" +
|
||||
" Z(String name) {}" +
|
||||
"}" +
|
||||
"class A {" +
|
||||
" void x(String names) {}" +
|
||||
"}",
|
||||
asList("class X {" +
|
||||
" X() {}" +
|
||||
"}",
|
||||
"class A {" +
|
||||
" void x(String names) {}" +
|
||||
"}")));
|
||||
}
|
||||
|
||||
public void testPredefinedConfigurations() {
|
||||
|
||||
Reference in New Issue
Block a user