mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: remove unnecessary profile method
GitOrigin-RevId: 64cf62260e366c9e6b58d3c7067a4aec3f1b92d1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bd9a24ab61
commit
2e0a90a168
-9
@@ -195,15 +195,6 @@ public final class JavaStructuralSearchProfile extends StructuralSearchProfile {
|
||||
return targetNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull PsiElement extendMatchOnePsiFile(@NotNull PsiElement file) {
|
||||
if (file instanceof PsiIdentifier) {
|
||||
// Searching in previous results
|
||||
file = file.getParent();
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiElement getPresentableElement(@NotNull PsiElement element) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 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-2021 JetBrains s.r.o. and contributors. 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.dupLocator.iterators.NodeIterator;
|
||||
@@ -547,9 +547,7 @@ public class Matcher {
|
||||
ReadAction.nonBlocking(
|
||||
() -> {
|
||||
if (!file.isValid()) return;
|
||||
final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByPsiElement(file);
|
||||
if (profile == null) return;
|
||||
match(profile.extendMatchOnePsiFile(file));
|
||||
match(file);
|
||||
}
|
||||
).inSmartMode(project).executeSynchronously();
|
||||
}
|
||||
|
||||
+1
-6
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 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-2021 JetBrains s.r.o. and contributors. 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.codeInsight.template.TemplateContextType;
|
||||
@@ -286,11 +286,6 @@ public abstract class StructuralSearchProfile {
|
||||
return node;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PsiElement extendMatchOnePsiFile(@NotNull PsiElement file) {
|
||||
return file;
|
||||
}
|
||||
|
||||
public LanguageFileType getDefaultFileType(@Nullable LanguageFileType fileType) {
|
||||
return fileType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user