Search in sources :

Example 16 with IASNode

use of org.apache.flex.compiler.tree.as.IASNode in project vscode-nextgenas by BowlerHatLLC.

the class ActionScriptTextDocumentService method getContainingNodeIncludingStart.

private IASNode getContainingNodeIncludingStart(IASNode node, int offset) {
    if (!containsWithStart(node, offset)) {
        return null;
    }
    for (int i = 0, count = node.getChildCount(); i < count; i++) {
        IASNode child = node.getChild(i);
        IASNode result = getContainingNodeIncludingStart(child, offset);
        if (result != null) {
            return result;
        }
    }
    return node;
}
Also used : IASNode(org.apache.flex.compiler.tree.as.IASNode)

Aggregations

IASNode (org.apache.flex.compiler.tree.as.IASNode)16 IMXMLTagData (org.apache.flex.compiler.mxml.IMXMLTagData)8 IIdentifierNode (org.apache.flex.compiler.tree.as.IIdentifierNode)5 ICompilationUnit (org.apache.flex.compiler.units.ICompilationUnit)5 IDefinition (org.apache.flex.compiler.definitions.IDefinition)4 FileNotFoundException (java.io.FileNotFoundException)3 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 ConcurrentModificationException (java.util.ConcurrentModificationException)3 HashMap (java.util.HashMap)3 SWCCompilationUnit (org.apache.flex.compiler.internal.units.SWCCompilationUnit)3 CompletionList (org.eclipse.lsp4j.CompletionList)3 URI (java.net.URI)2 ISourceLocation (org.apache.flex.compiler.common.ISourceLocation)2 IClassDefinition (org.apache.flex.compiler.definitions.IClassDefinition)2 IEventDefinition (org.apache.flex.compiler.definitions.IEventDefinition)2 MXMLData (org.apache.flex.compiler.internal.mxml.MXMLData)2 IMXMLDataManager (org.apache.flex.compiler.mxml.IMXMLDataManager)2 IMXMLTagAttributeData (org.apache.flex.compiler.mxml.IMXMLTagAttributeData)2 IExpressionNode (org.apache.flex.compiler.tree.as.IExpressionNode)2