mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
This commit is contained in:
+17
-7
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2015 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.dupLocator.iterators.NodeIterator;
|
||||
@@ -307,13 +322,8 @@ public class JavaCompilingVisitor extends JavaRecursiveElementWalkingVisitor {
|
||||
final PsiElement previousNonWhiteSpace = PsiTreeUtil.skipSiblingsBackward(psiDeclarationStatement, PsiWhiteSpace.class);
|
||||
|
||||
if (previousNonWhiteSpace instanceof PsiComment) {
|
||||
((DeclarationStatementHandler)handler)
|
||||
.setCommentHandler(myCompilingVisitor.getContext().getPattern().getHandler(previousNonWhiteSpace));
|
||||
|
||||
myCompilingVisitor.getContext().getPattern().setHandler(
|
||||
previousNonWhiteSpace,
|
||||
handler
|
||||
);
|
||||
((DeclarationStatementHandler)handler).setCommentHandler(myCompilingVisitor.getContext().getPattern().getHandler(previousNonWhiteSpace));
|
||||
myCompilingVisitor.getContext().getPattern().setHandler(previousNonWhiteSpace, handler);
|
||||
}
|
||||
|
||||
// detect typed symbol, it will have no variable
|
||||
|
||||
+19
-9
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2000-2015 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.daemon.quickFix.LightQuickFixTestCase;
|
||||
@@ -46,19 +61,18 @@ abstract class StructuralSearchTestCase extends LightQuickFixTestCase {
|
||||
String pattern,
|
||||
boolean filePattern,
|
||||
FileType patternFileType,
|
||||
Language patternLanugage,
|
||||
Language patternLanguage,
|
||||
FileType sourceFileType,
|
||||
String sourceExtension,
|
||||
boolean physicalSourceFile) {
|
||||
return findMatches(in, pattern, filePattern, patternFileType, patternLanugage, sourceFileType, sourceExtension, physicalSourceFile,
|
||||
true);
|
||||
return findMatches(in, pattern, filePattern, patternFileType, patternLanguage, sourceFileType, sourceExtension, physicalSourceFile, true);
|
||||
}
|
||||
|
||||
protected List<MatchResult> findMatches(String in,
|
||||
String pattern,
|
||||
boolean filePattern,
|
||||
FileType patternFileType,
|
||||
Language patternLanugage,
|
||||
Language patternLanguage,
|
||||
FileType sourceFileType,
|
||||
String sourceExtension,
|
||||
boolean physicalSourceFile,
|
||||
@@ -70,7 +84,7 @@ abstract class StructuralSearchTestCase extends LightQuickFixTestCase {
|
||||
}
|
||||
pattern = options.getSearchPattern();
|
||||
options.setFileType(patternFileType);
|
||||
options.setDialect(patternLanugage);
|
||||
options.setDialect(patternLanguage);
|
||||
|
||||
MatcherImpl.validate(getProject(), options);
|
||||
return testMatcher.testFindMatches(in, pattern, options, filePattern, sourceFileType, sourceExtension, physicalSourceFile);
|
||||
@@ -88,10 +102,6 @@ abstract class StructuralSearchTestCase extends LightQuickFixTestCase {
|
||||
return findMatchesCount(in,pattern,false);
|
||||
}
|
||||
|
||||
protected List<MatchResult> findMatches(String in, String pattern) {
|
||||
return findMatches(in,pattern,false, StdFileTypes.JAVA);
|
||||
}
|
||||
|
||||
protected String loadFile(String fileName) throws IOException {
|
||||
return FileUtilRt.loadFile(new File(getTestDataPath() + fileName), CharsetToolkit.UTF8, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user