SSR: make some methods public for easier extension (IDEA-162805)

This commit is contained in:
Bas Leijdekkers
2016-10-19 14:28:29 +02:00
parent 64e28a5e03
commit 163ca24685
6 changed files with 55 additions and 12 deletions
@@ -517,7 +517,7 @@ public class JavaStructuralSearchProfile extends StructuralSearchProfile {
}
@Override
Configuration[] getPredefinedTemplates() {
public Configuration[] getPredefinedTemplates() {
return JavaPredefinedConfigurations.createPredefinedTemplates();
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.dupLocator;
import com.intellij.dupLocator.util.NodeFilter;
@@ -85,11 +100,11 @@ public abstract class AbstractMatchingVisitor {
);
}
protected boolean isLeftLooseMatching() {
public boolean isLeftLooseMatching() {
return true;
}
protected boolean isRightLooseMatching() {
public boolean isRightLooseMatching() {
return true;
}
@@ -222,7 +222,7 @@ public abstract class StructuralSearchProfile {
return fileType;
}
Configuration[] getPredefinedTemplates() {
public Configuration[] getPredefinedTemplates() {
return Configuration.EMPTY_ARRAY;
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.structuralsearch;
import com.intellij.codeInsight.template.TemplateContextType;
@@ -197,7 +212,7 @@ public class XmlStructuralSearchProfile extends StructuralSearchProfile {
}
@Override
Configuration[] getPredefinedTemplates() {
public Configuration[] getPredefinedTemplates() {
return XmlPredefinedConfigurations.createPredefinedTemplates();
}
@@ -312,12 +312,12 @@ public class GlobalMatchingVisitor extends AbstractMatchingVisitor {
}
@Override
protected boolean isLeftLooseMatching() {
public boolean isLeftLooseMatching() {
return matchContext.getOptions().isLooseMatching();
}
@Override
protected boolean isRightLooseMatching() {
public boolean isRightLooseMatching() {
return false;
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.structuralsearch.impl.matcher.compiler;
import com.intellij.openapi.application.ApplicationManager;
@@ -6,11 +21,9 @@ import com.intellij.structuralsearch.MatchOptions;
import com.intellij.structuralsearch.impl.matcher.CompiledPattern;
/**
* Created by IntelliJ IDEA.
* User: maxim
* @author maxim
* Date: 17.11.2004
* Time: 19:26:37
* To change this template use File | Settings | File Templates.
*/
public class CompileContext {
private OptimizingSearchHelper searchHelper;
@@ -49,7 +62,7 @@ public class CompileContext {
this.pattern = pattern;
}
MatchOptions getOptions() {
public MatchOptions getOptions() {
return options;
}
@@ -57,7 +70,7 @@ public class CompileContext {
this.options = options;
}
Project getProject() {
public Project getProject() {
return project;
}