[intellij sh] IDEA-243154 Fix find usages by introducing targetElementEvaluator

GitOrigin-RevId: e1ebbec904dcdf9ff3a750a141082efca315c60f
This commit is contained in:
Mikhail Mazurkevich
2020-06-17 17:32:33 +03:00
committed by intellij-monorepo-bot
parent b778858554
commit 041cb4ff42
2 changed files with 16 additions and 0 deletions
+2
View File
@@ -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;
}
}