mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: set loose matching to true by default
This commit is contained in:
+2
-1
@@ -2,7 +2,8 @@ public class Test {
|
||||
Object a = "a", b = "";
|
||||
|
||||
void mm() {
|
||||
Object c = a;Object d = b;
|
||||
Object c = a;
|
||||
Object d = b;
|
||||
String ololo = "intellij-idea";
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class Test {
|
||||
public static void test() {
|
||||
String n = new AnInterface<String,Void>() {
|
||||
String n = new AnInterface<String, Void>() {
|
||||
@Override
|
||||
public String invoke(Void v) {
|
||||
return null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Test {
|
||||
public static void test() {
|
||||
String n = new AnInterface2<String,Void>() {
|
||||
String n = new AnInterface2<String, Void>() {
|
||||
@Override
|
||||
public String invoke(Void v) {
|
||||
return null;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ class Test {
|
||||
System.out.println(a.incrementAndGet(0));
|
||||
a.getAndDecrement(0);
|
||||
if (a.decrementAndGet(0) == 0) {
|
||||
a.getAndAdd(0, ((2)));
|
||||
a.getAndAdd(0, (2));
|
||||
a.set(0, a.get(0) * 2);
|
||||
if (a.get(0) == 0) {
|
||||
System.out.println(a.get(0) + 7);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ class Test {
|
||||
System.out.println(++a[0]);
|
||||
a[0]--;
|
||||
if (--a[0] == 0) {
|
||||
a[0] += ((2));
|
||||
a[0] += 2;
|
||||
a[0] = a[0] * 2;
|
||||
if (a[0] == 0) {
|
||||
System.out.println(a[0] + 7);
|
||||
|
||||
@@ -42,6 +42,7 @@ public class MatchOptions implements JDOMExternalizable {
|
||||
|
||||
public MatchOptions() {
|
||||
variableConstraints = new LinkedHashMap<>();
|
||||
looseMatching = true;
|
||||
resultIsContextMatch = false;
|
||||
myFileType = null;
|
||||
myDialect = null;
|
||||
|
||||
@@ -86,7 +86,6 @@ public class Matcher {
|
||||
if (StringUtil.isQuotedString(constraint)) {
|
||||
// keep old configurations working, also useful for testing
|
||||
final MatchOptions myMatchOptions = new MatchOptions();
|
||||
myMatchOptions.setLooseMatching(true);
|
||||
myMatchOptions.setFileType(fileType);
|
||||
myMatchOptions.fillSearchCriteria(StringUtil.unquoteString(constraint));
|
||||
return new Matcher(project, myMatchOptions);
|
||||
|
||||
-1
@@ -751,7 +751,6 @@ public class SearchDialog extends DialogWrapper {
|
||||
options.setScope(
|
||||
searchWithinHierarchy && !myDoingOkAction ? GlobalSearchScope.projectScope(getProject()) : myScopeChooserCombo.getSelectedScope());
|
||||
}
|
||||
options.setLooseMatching(true);
|
||||
options.setRecursiveSearch(isRecursiveSearchEnabled() && recursiveMatching.isSelected());
|
||||
|
||||
ourFtSearchVariant = (FileType)fileTypes.getSelectedItem();
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ public class StructuralReplaceTest extends StructuralReplaceTestCase {
|
||||
super.setUp();
|
||||
final MatchOptions matchOptions = this.options.getMatchOptions();
|
||||
matchOptions.setFileType(StdFileTypes.JAVA);
|
||||
matchOptions.setLooseMatching(true);
|
||||
}
|
||||
|
||||
public void testReplaceInLiterals() {
|
||||
|
||||
-1
@@ -38,7 +38,6 @@ abstract class StructuralSearchTestCase extends LightQuickFixTestCase {
|
||||
|
||||
testMatcher = new Matcher(getProject());
|
||||
options = new MatchOptions();
|
||||
options.setLooseMatching(true);
|
||||
options.setRecursiveSearch(true);
|
||||
LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user