mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[intellij sh] IDEA-243154 Fix find usages by introducing targetElementEvaluator
GitOrigin-RevId: e1ebbec904dcdf9ff3a750a141082efca315c60f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b778858554
commit
041cb4ff42
@@ -27,6 +27,8 @@ Adds support for working with shell script files
|
||||
<resolveScopeProvider id="shResolveScopeProvider" implementation="com.intellij.sh.psi.impl.ShResolveScopeProvider"/>
|
||||
<lang.elementManipulator id="shLiteralManipulator" forClass="com.intellij.sh.psi.ShLiteral"
|
||||
implementationClass="com.intellij.sh.psi.manipulator.ShLiteralManipulator" />
|
||||
<targetElementEvaluator id="shTargetElementEvaluator" language="Shell Script"
|
||||
implementationClass="com.intellij.sh.codeInsight.ShTargetElementEvaluator"/>
|
||||
<editor.backspaceModeOverride id="shBackspaceModeOverride" language="Shell Script" implementationClass="com.intellij.sh.ShBackspaceModeOverride"/>
|
||||
|
||||
<lang.psiStructureViewFactory id="shStructureViewFactory" language="Shell Script" implementationClass="com.intellij.sh.ShStructureViewFactory"/>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright 2000-2020 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.sh.codeInsight;
|
||||
|
||||
import com.intellij.codeInsight.TargetElementEvaluatorEx2;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.sh.psi.ShFunctionDefinition;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShTargetElementEvaluator extends TargetElementEvaluatorEx2 {
|
||||
@Override
|
||||
public boolean isAcceptableNamedParent(@NotNull PsiElement parent) {
|
||||
return parent instanceof ShFunctionDefinition;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user