Search in sources :

Example 1 with ES6Decorator

use of com.intellij.lang.javascript.psi.ecma6.ES6Decorator in project intellij-plugins by JetBrains.

the class AngularJS2IndexingHandler method determineModuleName.

private static String determineModuleName(@NotNull JSCallExpression callExpression) {
    if (!(callExpression.getParent() instanceof ES6Decorator))
        return null;
    final ES6Decorator decorator = (ES6Decorator) callExpression.getParent();
    final PsiElement owner = decorator.getOwner();
    if (owner instanceof JSClass)
        return ((JSClass) owner).getName();
    return null;
}
Also used : ES6Decorator(com.intellij.lang.javascript.psi.ecma6.ES6Decorator) JSClass(com.intellij.lang.javascript.psi.ecmal4.JSClass) PsiElement(com.intellij.psi.PsiElement)

Aggregations

ES6Decorator (com.intellij.lang.javascript.psi.ecma6.ES6Decorator)1 JSClass (com.intellij.lang.javascript.psi.ecmal4.JSClass)1 PsiElement (com.intellij.psi.PsiElement)1