Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for code specific to 2.9 or 2.10 #198

Merged
merged 1 commit into from Sep 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions org.scala-ide.sdt.core/.classpath
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src"/>
<classpathentry kind="src" path="src-2.9"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_COMPILER_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Expand Down
17 changes: 17 additions & 0 deletions org.scala-ide.sdt.core/pom.xml
Expand Up @@ -83,6 +83,23 @@
</execution>
</executions>
</plugin>
<!-- added source folder containing the code specific to the scala version -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src-${scala.major.minor.version}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,17 @@
package scala.tools.eclipse

import scala.reflect.internal.Symbols

/**
* Trait used to keep 2.9-2.10 source compatibility
*/
trait SymbolsCompatibility { self: Symbols =>

/**
* This class as been removed in 2.10, but we need its real implementation in 2.9
*/
case class InvalidCompanions(sym1: Symbol, sym2: Symbol) extends Throwable {

}

}
@@ -0,0 +1,10 @@
package scala.tools.eclipse

import scala.tools.nsc.symtab.Symbols

/**
* Trait used to keep 2.9-2.10 source compatibility
*/
trait SymbolsCompatibility { self: Symbols =>

}
Expand Up @@ -41,7 +41,8 @@ class ScalaPresentationCompiler(project: ScalaProject, settings: Settings)
with JavaSig
with JVMUtils
with LocateSymbol
with HasLogger { self =>
with HasLogger
with SymbolsCompatibility { self =>

def presentationReporter = reporter.asInstanceOf[ScalaPresentationCompiler.PresentationReporter]
presentationReporter.compiler = this
Expand Down