Search in sources :

Example 1 with JSLocalVariable

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

the class ActionScriptResolveTest method testResolveIt.

public void testResolveIt() throws Exception {
    String fileText = "package {\n" + "\n" + "public class Test {\n" + "  public function Test() {\n" + "    var describeType:XML = describe<ref>Type(Test);\n" + "  }\n" + "}\n" + "function describeType(x) {}";
    JSReferenceExpression ref = (JSReferenceExpression) configureByFileText(fileText, "sample.js2");
    assertTrue(ref.resolve() instanceof JSLocalVariable);
}
Also used : JSReferenceExpression(com.intellij.lang.javascript.psi.JSReferenceExpression) JSLocalVariable(com.intellij.lang.javascript.psi.JSLocalVariable)

Aggregations

JSLocalVariable (com.intellij.lang.javascript.psi.JSLocalVariable)1 JSReferenceExpression (com.intellij.lang.javascript.psi.JSReferenceExpression)1