-
Notifications
You must be signed in to change notification settings - Fork 2
Setting Up the Development Environment
Mohsen Vakilian edited this page Jan 29, 2014
·
20 revisions
- Install JDK 8
-
Install the Checker Framework from source.
cd ~/hg
hg clone https://code.google.com/p/jsr308-langtools/ jsr308-langtools
hg clone https://code.google.com/p/checker-framework/ checker-framework
hg clone https://code.google.com/p/annotation-tools/ annotation-tools
export JAVA_HOME=${JAVA_HOME:-$(dirname $(dirname $(dirname $(readlink -f $(/usr/bin/which java)))))}
cd ~/hg/jsr308-langtools/make
ant clean-and-build-all-tools
export PATH=$HOME/hg/jsr308-langtools/dist/bin:${PATH}
cd ~/hg/annotation-tools
ant
cd ~/hg/checker-framework/checkers
ant
ant all-tests
- Clone the Eclipse plug-ins for inferring type qualifiers.
cd ~/git/type-qualifier-inference
git clone [email protected]:reprogrammer/universal-type-qualifier-inference.git
cd ~/git/type-qualifier-inference/universal-type-qualifier-inference
- Clone the Java 8 branch of Eclipse JDT Core and UI plug-ins.
mkdir ~/git/type-qualifier-inference/eclipse-for-java-8
cd ~/git/type-qualifier-inference/eclipse-for-java-8
git clone git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git
git clone git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
cd ~/git/type-qualifier-inference/eclipse-for-java-8/eclipse.jdt.core
git checkout -b BETA_JAVA8 origin/BETA_JAVA8
cd ~/git/type-qualifier-inference/eclipse-for-java-8/eclipse.jdt.ui
git checkout -b BETA_JAVA8 origin/BETA_JAVA8
- Install Eclipse Kepler.
- Change the JDK compliance level of the Eclipse workspace to 1.7.
- Set the Eclipse Java formatter to
~/hg/checker-framework/checkers/eclipse/checker-framework-formatter.xml
. - Import the Eclipse projects from the following folders into Eclipse.
~/hg/checker-framework/eclipse
~/hg/checker-framework/checkers
~/hg/checker-framework/javaparser
~/hg/checker-framework/dataflow
~/hg/checker-framework/javacutils
~/hg/jsr308-langtools
-
~/git/type-qualifier-inference/eclipse-for-java-8
excluding projects with names containing the words "test", "examples", "compiler", "astview", "jeview", "annotation", and "junit". ~/git/type-qualifier-inference/universal-type-qualifier-inference
- If Eclipse reports problems in file
MANIFEST.MF
ofchecker-framework-eclipse-plugin
, do the following.- Copy the JAR files listed in attribute
Bundle-ClassPath
from~/hg/checker-framework/checkers/binary
to~/hg/checker-framework/eclipse/checker-framework-eclipse-plugin
. - Add the JAR files that you copied to the build path of the enclosing Eclipse project.
- In attribute
Export-Package
, changecheckers.basic
tocheckers.basetype
.
- Copy the JAR files listed in attribute
- Your workspace should look like the screenshot below after importing the above projects.
- Create an Eclipse launch configuration as shown below to run the inference tool.
- To use Java 8 syntax in an Eclipse project, create a folder called
.settings
in the project. Then, add a file to this folder with nameorg.eclipse.jdt.core.prefs
and the following contents:
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8