aboutsummaryrefslogtreecommitdiffstats
path: root/integration/intellij/src/main/java/ai/vespa/intellij/schema/SdRefactoringSupportProvider.java
blob: 88dbf6ce0ffc2f4c8b01a92c7a4ebaf80972abb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.intellij.schema;

import com.intellij.lang.refactoring.RefactoringSupportProvider;
import com.intellij.psi.PsiElement;
import ai.vespa.intellij.schema.psi.SdIdentifier;

/**
 * This class is used for the extension (in plugin.xml), to enable refactoring.
 *
 * @author Shahar Ariel
 */
public class SdRefactoringSupportProvider extends RefactoringSupportProvider {

    @Override
    public boolean isMemberInplaceRenameAvailable(PsiElement elementToRename, PsiElement context) {
        return (elementToRename instanceof SdIdentifier);
    }

}