Skip to content

Commit

Permalink
typo in classpath method.
Browse files Browse the repository at this point in the history
  • Loading branch information
vigdorchik committed Nov 29, 2010
1 parent e003cb6 commit 950a668
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ScalaProject(val underlying : IProject) {
val settings = new Settings
settings.printtypes.tryToSet(Nil)
settings.verbose.tryToSetFromPropertyValue("true")
settings.XlogImplicits.tryToSetFromPropertyValue("true")
initialize(settings)
new ScalaPresentationCompiler(ScalaProject.this, settings)
}
Expand Down Expand Up @@ -107,20 +108,19 @@ class ScalaProject(val underlying : IProject) {
def classpath(javaProject : IJavaProject, exportedOnly : Boolean) : Unit = {
val cpes = javaProject.getResolvedClasspath(true)

// A slightly confusing code to avoid adding our own output to classpath.
for (cpe <- cpes if (!exportedOnly || cpe.isExported)) cpe.getEntryKind match {
case IClasspathEntry.CPE_PROJECT =>
val depProject = plugin.workspaceRoot.getProject(cpe.getPath.lastSegment)
if (JavaProject.hasJavaNature(depProject)) {
val depJava = JavaCore.create(depProject)
for (cpe <- depJava.getResolvedClasspath(true) if cpe.getEntryKind == IClasspathEntry.CPE_SOURCE) {
for (cpe <- depJava.getResolvedClasspath(true) if cpe.getEntryKind == IClasspathEntry.CPE_SOURCE) {
val specificOutputLocation = cpe.getOutputLocation
val outputLocation = if (specificOutputLocation != null) specificOutputLocation else javaProject.getOutputLocation
val outputLocation = if (specificOutputLocation != null) specificOutputLocation else depJava.getOutputLocation
if (outputLocation != null) {
val absPath = plugin.workspaceRoot.findMember(outputLocation)
if (absPath != null) path += absPath.getLocation
}
}
}
classpath(depJava, true)
}
case IClasspathEntry.CPE_LIBRARY =>
Expand Down

0 comments on commit 950a668

Please sign in to comment.