Show
Ignore:
Timestamp:
06/28/09 23:36:50 (15 months ago)
Author:
mb0 <mb0@…>
Children:
1567fcce2711ee19e98902f8ef734f1a7dd9731f
Parents:
25b5d220afcf17776b844086f439554f14dc63dc
git-author:
mb0 <mb0@…> (06/11/09 05:25:41)
git-committer:
mb0 <mb0@…> (06/28/09 23:36:50)
Message:

moved indexer initialization to axdoc and as3 plugin start
builder now saves the axroot and builds the caches on full build and clean
on as3 plugin start serialized source indexes will be loaded.
and some fixes as minor changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • org.axdt.as3/src/org/axdt/as3/imp/parser/AS3ParseController.java

    r25b5d22 r364575f  
    11package org.axdt.as3.imp.parser; 
    22 
    3 import java.util.HashSet; 
     3import java.util.Collections; 
    44import java.util.Iterator; 
    55 
    66import lpg.runtime.IAst; 
    7 import lpg.runtime.IToken; 
    87 
    98import org.axdt.as3.AS3Plugin; 
     
    116115                        ASTNode node = (ASTNode) fCurrentAst; 
    117116                        topLevelSymbolTable = resolveSymbolTable(node); 
     117                        buildIndex(node); 
    118118                        if (resolve) { 
    119                                 buildIndex(node); 
    120119                                resolveDeclarations(node); 
    121120                        } 
     
    127126        } 
    128127         
    129         protected void buildIndex(ASTNode root) { 
    130                 root.accept(new IndexingVisitor(this)); 
     128        public void buildIndex(Object object) { 
     129                if (object instanceof ASTNode) { 
     130                        ((ASTNode)object).accept(new IndexingVisitor(this)); 
     131                } 
    131132        } 
    132133         
    133         protected void resolveDeclarations(ASTNode root) { 
    134                 root.accept(new ResolvingVisitor(this)); 
     134        public void resolveDeclarations(Object object) { 
     135                if (object instanceof ASTNode) { 
     136                        ((ASTNode)object).accept(new ResolvingVisitor(this)); 
     137                } 
    135138        } 
    136139 
     
    151154                return null; 
    152155        } 
     156 
     157        @Override 
     158        @SuppressWarnings("unchecked") 
     159        public Iterator getTokenIterator(IRegion region) { 
     160                if (parser == null) return Collections.EMPTY_SET.iterator(); 
     161                return super.getTokenIterator(region); 
     162        } 
    153163}