Show
Ignore:
Timestamp:
01/05/09 12:04:20 (11 months ago)
Author:
dr2chase
Message:

Feeding generated APIs to static analysis, not yet working

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/src/com/sun/fortress/repository/GraphRepository.java

    r3288 r3289  
    460460                @Override 
    461461                public Boolean apply(GraphNode g){ 
    462                     return g instanceof ApiGraphNode && staleOrDependsOnStale.get(g); 
     462                    return g instanceof ApiGraphNode && (staleOrDependsOnStale.get(g) || 
     463                            // TODO need to fix the whole date-stamp thing for APIs. 
     464                            foreignJava.definesApi(((ApiGraphNode)g).getName()) 
     465                            ); 
    463466                } 
    464467            }; 
     
    628631        try{ 
    629632            APIName api_name = node.getName(); 
    630             File fdot = findFile(api_name, ProjectProperties.API_SOURCE_SUFFIX); 
    631             CompilationUnit api = Parser.parseFileConvertExn(fdot); 
    632             if (api instanceof Api) { 
    633                 return (Api) api; 
     633            if (foreignJava.definesApi(api_name)) { 
     634                return (Api) foreignJava.fakeApi(api_name).ast(); 
    634635            } else { 
    635                 throw StaticError.make("Unexpected parse of API " + api_name, ""); 
     636                File fdot = findFile(api_name, ProjectProperties.API_SOURCE_SUFFIX); 
     637                CompilationUnit api = Parser.parseFileConvertExn(fdot); 
     638                if (api instanceof Api) { 
     639                    return (Api) api; 
     640                } else { 
     641                    throw StaticError.make("Unexpected parse of API " + api_name, ""); 
     642                } 
    636643            } 
    637644        } catch ( FileNotFoundException e ){