diff --git a/java/structuralsearch-java/src/com/intellij/structuralsearch/JavaPredefinedConfigurations.java b/java/structuralsearch-java/src/com/intellij/structuralsearch/JavaPredefinedConfigurations.java index 4642bd837a88..23b5239089f5 100644 --- a/java/structuralsearch-java/src/com/intellij/structuralsearch/JavaPredefinedConfigurations.java +++ b/java/structuralsearch-java/src/com/intellij/structuralsearch/JavaPredefinedConfigurations.java @@ -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 ), diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/JavaPredefinedConfigurationsTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/JavaPredefinedConfigurationsTest.java index 403908b03da4..60a7e8c77f94 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/JavaPredefinedConfigurationsTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/JavaPredefinedConfigurationsTest.java @@ -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() {