fix analysis of Java sources being overwritten

This commit is contained in:
Mark Harrah 2011-04-26 21:19:56 -04:00
parent 08c9d37053
commit 9dec02ee51
3 changed files with 4 additions and 5 deletions

View File

@ -166,7 +166,7 @@ object ClassToAPI
pkg match
{
// translate all primitives?
case None => new api.Projection(EmptyPrefix, cls)
case None => new api.Projection(Empty, cls)
case Some(p) =>
new api.Projection(new api.Singleton(pathFromString(p)), cls)
}
@ -202,8 +202,6 @@ object ClassToAPI
}
val Empty = new api.EmptyType
val EmptyPath = new api.Path(Array())
val EmptyPrefix = new api.Singleton(EmptyPath)
val ThisRef = new api.This
val Public = new api.Public

View File

@ -37,7 +37,8 @@ final class API(val global: Global, val callback: xsbti.AnalysisCallback) extend
val stop = System.currentTimeMillis
println("API phase took : " + ((stop - start)/1000.0) + " s")
}
def processUnit(unit: CompilationUnit)
def processUnit(unit: CompilationUnit) = if(!unit.isJava) processScalaUnit(unit)
def processScalaUnit(unit: CompilationUnit)
{
val sourceFile = unit.source.file.file
println("Traversing " + sourceFile)

View File

@ -30,7 +30,7 @@ final class Analyzer(val global: Global, val callback: AnalysisCallback) extends
{
val outputDirectory = new File(global.settings.outdir.value)
for(unit <- currentRun.units)
for(unit <- currentRun.units if !unit.isJava)
{
// build dependencies structure
val sourceFile = unit.source.file.file