summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-05-02 14:10:00 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-05-02 14:10:00 +0200
commitfc4602a1415066f897530b6995299de1f3d9830f (patch)
treece2f14cc7767d19b6bf80c81a7d931d4f7c92ddd
parentca9003e453873c496c72c431f0e5f9f3eaf31511 (diff)
parentf93fbef8ecbcf1f09cd18632bd209dbf641f7c96 (diff)
downloadscala-fc4602a1415066f897530b6995299de1f3d9830f.tar.gz
scala-fc4602a1415066f897530b6995299de1f3d9830f.tar.bz2
scala-fc4602a1415066f897530b6995299de1f3d9830f.zip
Merge pull request #3708 from lrytz/intellij
IntelliJ project files
-rwxr-xr-xbuild.xml3
-rw-r--r--src/intellij/README10
-rw-r--r--src/intellij/actors.iml.SAMPLE3
-rw-r--r--src/intellij/compiler.iml.SAMPLE7
-rw-r--r--src/intellij/interactive.iml.SAMPLE4
-rw-r--r--src/intellij/library.iml.SAMPLE5
-rw-r--r--src/intellij/manual.iml.SAMPLE5
-rw-r--r--src/intellij/partest-extras.iml.SAMPLE27
-rw-r--r--src/intellij/partest-javaagent.iml.SAMPLE13
-rw-r--r--src/intellij/reflect.iml.SAMPLE6
-rw-r--r--src/intellij/repl.iml.SAMPLE4
-rw-r--r--src/intellij/scala-lang.ipr.SAMPLE72
-rw-r--r--src/intellij/scaladoc.iml.SAMPLE9
-rw-r--r--src/intellij/scalap.iml.SAMPLE3
-rwxr-xr-xsrc/intellij/setup.sh15
-rw-r--r--src/intellij/test-junit.iml.SAMPLE30
-rw-r--r--src/intellij/test.iml.SAMPLE22
-rwxr-xr-xsrc/intellij/update.sh22
18 files changed, 188 insertions, 72 deletions
diff --git a/build.xml b/build.xml
index 95ce2fe4e2..a66c138cbe 100755
--- a/build.xml
+++ b/build.xml
@@ -368,12 +368,13 @@ TODO:
<typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
<echo message="Using Scala ${starr.version} for STARR."/>
- <artifact:dependencies pathId="starr.compiler.path">
+ <artifact:dependencies pathId="starr.compiler.path" filesetId="starr.fileset">
<artifact:remoteRepository refid="extra-repo"/>
<dependency groupId="org.scala-lang" artifactId="scala-library" version="${starr.version}"/>
<dependency groupId="org.scala-lang" artifactId="scala-reflect" version="${starr.version}"/>
<dependency groupId="org.scala-lang" artifactId="scala-compiler" version="${starr.version}"/>
</artifact:dependencies>
+ <copy-deps project="starr"/>
<property name="maven-deps-done" value="yep!"/>
</then></if>
diff --git a/src/intellij/README b/src/intellij/README
index ade87749cd..a39691f4f0 100644
--- a/src/intellij/README
+++ b/src/intellij/README
@@ -1,8 +1,12 @@
Use the latest IntelliJ IDEA release and install the Scala plugin from within the IDE.
+Compilation withing IDEA is performed in "-Dlocker.skip=1" mode: the sources are built
+directly using the STARR compiler.
+
The following steps are required to use IntelliJ IDEA on Scala trunk
- - compile "locker" using "ant locker.done". This will also download some JARs from
- Maven to ./build/deps, which are included in IntelliJ's classpath.
+ - Run "ant init". This will download some JARs from to ./build/deps, which are
+ included in IntelliJ's classpath.
- Run src/intellij/setup.sh
- Open ./src/intellij/scala-lang.ipr in IntelliJ
- - File, Project Settings, Project, SDK. Create an SDK entry named "1.6" containing the java 1.6 SDK
+ - File, Project Settings, Project, SDK. Create an SDK entry named "1.6" containing the
+ java 1.6 SDK
diff --git a/src/intellij/actors.iml.SAMPLE b/src/intellij/actors.iml.SAMPLE
index 896c4966ff..b15af8b110 100644
--- a/src/intellij/actors.iml.SAMPLE
+++ b/src/intellij/actors.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
diff --git a/src/intellij/compiler.iml.SAMPLE b/src/intellij/compiler.iml.SAMPLE
index 9fb9cd55eb..50253000ab 100644
--- a/src/intellij/compiler.iml.SAMPLE
+++ b/src/intellij/compiler.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -19,8 +20,8 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
- <orderEntry type="module" module-name="asm" exported="" />
- <orderEntry type="library" exported="" name="ant" level="project" />
+ <orderEntry type="module" module-name="asm" />
+ <orderEntry type="library" name="ant" level="project" />
</component>
</module>
diff --git a/src/intellij/interactive.iml.SAMPLE b/src/intellij/interactive.iml.SAMPLE
index c6c8ebb606..83178021d3 100644
--- a/src/intellij/interactive.iml.SAMPLE
+++ b/src/intellij/interactive.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -23,3 +24,4 @@
<orderEntry type="module" module-name="scaladoc" />
</component>
</module>
+
diff --git a/src/intellij/library.iml.SAMPLE b/src/intellij/library.iml.SAMPLE
index cac53dff15..137ce6eb9c 100644
--- a/src/intellij/library.iml.SAMPLE
+++ b/src/intellij/library.iml.SAMPLE
@@ -4,8 +4,9 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
- <option name="compilerOptions" value="-sourcepath $BASE_DIR$/src/library" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="compilerOptions" value="-sourcepath $MODULE_DIR$/../library" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
diff --git a/src/intellij/manual.iml.SAMPLE b/src/intellij/manual.iml.SAMPLE
index 3295a4a877..8babde73ea 100644
--- a/src/intellij/manual.iml.SAMPLE
+++ b/src/intellij/manual.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -18,8 +19,8 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="xml" />
<orderEntry type="library" name="ant" level="project" />
+ <orderEntry type="library" name="scaladoc-deps" level="project" />
</component>
</module>
diff --git a/src/intellij/partest-extras.iml.SAMPLE b/src/intellij/partest-extras.iml.SAMPLE
new file mode 100644
index 0000000000..c2ada43493
--- /dev/null
+++ b/src/intellij/partest-extras.iml.SAMPLE
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="scala" name="Scala">
+ <configuration>
+ <option name="compilerLibraryLevel" value="Project" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../partest-extras">
+ <sourceFolder url="file://$MODULE_DIR$/../partest-extras" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="asm" />
+ <orderEntry type="module" module-name="library" />
+ <orderEntry type="module" module-name="reflect" />
+ <orderEntry type="module" module-name="compiler" />
+ <orderEntry type="module" module-name="repl" />
+ <orderEntry type="library" name="partest" level="project" />
+ </component>
+</module>
+
diff --git a/src/intellij/partest-javaagent.iml.SAMPLE b/src/intellij/partest-javaagent.iml.SAMPLE
new file mode 100644
index 0000000000..e47e0f6349
--- /dev/null
+++ b/src/intellij/partest-javaagent.iml.SAMPLE
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../partest-javaagent">
+ <sourceFolder url="file://$MODULE_DIR$/../partest-javaagent" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="asm" />
+ </component>
+</module>
+
diff --git a/src/intellij/reflect.iml.SAMPLE b/src/intellij/reflect.iml.SAMPLE
index 7d10522826..d206304896 100644
--- a/src/intellij/reflect.iml.SAMPLE
+++ b/src/intellij/reflect.iml.SAMPLE
@@ -4,8 +4,9 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
- <option name="compilerOptions" value="-sourcepath $BASE_DIR$/src/reflect" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="compilerOptions" value="-sourcepath $MODULE_DIR$/../reflect" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -19,7 +20,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
- <orderEntry type="library" name="jline" level="project" />
</component>
</module>
diff --git a/src/intellij/repl.iml.SAMPLE b/src/intellij/repl.iml.SAMPLE
index fc78ffe8c2..83791f4f6e 100644
--- a/src/intellij/repl.iml.SAMPLE
+++ b/src/intellij/repl.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -23,3 +24,4 @@
<orderEntry type="library" name="repl-deps" level="project" />
</component>
</module>
+
diff --git a/src/intellij/scala-lang.ipr.SAMPLE b/src/intellij/scala-lang.ipr.SAMPLE
index a0765b3e99..c0614c946c 100644
--- a/src/intellij/scala-lang.ipr.SAMPLE
+++ b/src/intellij/scala-lang.ipr.SAMPLE
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="AntConfiguration">
- <defaultAnt bundledAnt="true" />
- </component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions>
@@ -21,11 +18,13 @@
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
- <annotationProcessing enabled="false" useClasspath="true" />
- </component>
- <component name="CopyrightManager" default="">
- <module2copyright />
+ <annotationProcessing>
+ <profile default="true" name="Default" enabled="false">
+ <processorPath useClasspath="true" />
+ </profile>
+ </annotationProcessing>
</component>
+ <component name="CopyrightManager" default="" />
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
@@ -41,11 +40,16 @@
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
+ <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
+ <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
+ <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
+ </inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
+ <inspection_tool class="UnitMethodIsParameterless" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</profiles>
<option name="PROJECT_PROFILE" value="Project Default" />
@@ -53,7 +57,7 @@
<version value="1.0" />
</component>
<component name="JavacSettings">
- <option name="ADDITIONAL_OPTIONS_STRING" value="-source 1.5 -target 1.5" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="-source 1.6 -target 1.6" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
@@ -205,12 +209,15 @@
<module fileurl="file://$PROJECT_DIR$/interactive.iml" filepath="$PROJECT_DIR$/interactive.iml" />
<module fileurl="file://$PROJECT_DIR$/library.iml" filepath="$PROJECT_DIR$/library.iml" />
<module fileurl="file://$PROJECT_DIR$/manual.iml" filepath="$PROJECT_DIR$/manual.iml" />
+ <module fileurl="file://$PROJECT_DIR$/partest-extras.iml" filepath="$PROJECT_DIR$/partest-extras.iml" />
+ <module fileurl="file://$PROJECT_DIR$/partest-javaagent.iml" filepath="$PROJECT_DIR$/partest-javaagent.iml" />
<module fileurl="file://$PROJECT_DIR$/reflect.iml" filepath="$PROJECT_DIR$/reflect.iml" />
<module fileurl="file://$PROJECT_DIR$/repl.iml" filepath="$PROJECT_DIR$/repl.iml" />
<module fileurl="file://$PROJECT_DIR$/scala.iml" filepath="$PROJECT_DIR$/scala.iml" />
<module fileurl="file://$PROJECT_DIR$/scaladoc.iml" filepath="$PROJECT_DIR$/scaladoc.iml" />
<module fileurl="file://$PROJECT_DIR$/scalap.iml" filepath="$PROJECT_DIR$/scalap.iml" />
<module fileurl="file://$PROJECT_DIR$/test.iml" filepath="$PROJECT_DIR$/test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/test-junit.iml" filepath="$PROJECT_DIR$/test-junit.iml" />
</modules>
</component>
<component name="ProjectResources">
@@ -234,45 +241,46 @@
<JAVADOC />
<SOURCES />
</library>
- <library name="compiler-locker">
- <CLASSES>
- <root url="file://$PROJECT_DIR$/../../build/locker/classes/library" />
- <root url="file://$PROJECT_DIR$/../../build/locker/classes/compiler" />
- <root url="file://$PROJECT_DIR$/../../build/locker/classes/reflect" />
- <root url="file://$PROJECT_DIR$/../../build/asm/classes" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
<library name="junit">
<CLASSES>
<root url="file://$PROJECT_DIR$/../../build/deps/junit" />
</CLASSES>
<JAVADOC />
- <SOURCES>
- <root url="file://$PROJECT_DIR$/../../build/deps/junit" />
- </SOURCES>
+ <SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" type="SOURCES" />
</library>
- <library name="partest-deps">
+ <library name="partest">
<CLASSES>
<root url="file://$PROJECT_DIR$/../../build/deps/partest" />
</CLASSES>
<JAVADOC />
- <SOURCES>
- <root url="file://$PROJECT_DIR$/../../build/deps/junit" />
- </SOURCES>
+ <SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/../../build/deps/partest" recursive="false" />
- <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/junit" recursive="false" type="SOURCES" />
</library>
<library name="repl-deps">
- <CLASSES>
+ <CLASSES>
<root url="file://$PROJECT_DIR$/../../build/deps/repl" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/../../build/deps/repl" recursive="false" />
- </library>
+ </library>
+ <library name="scaladoc-deps">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/scaladoc" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/scaladoc" recursive="false" />
+ </library>
+ <library name="starr">
+ <CLASSES>
+ <root url="file://$PROJECT_DIR$/../../build/deps/starr" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ <jarDirectory url="file://$PROJECT_DIR$/../../build/deps/starr" recursive="false" />
+ </library>
</component>
</project>
+
diff --git a/src/intellij/scaladoc.iml.SAMPLE b/src/intellij/scaladoc.iml.SAMPLE
index 07bea5bf5d..8f9a0d8344 100644
--- a/src/intellij/scaladoc.iml.SAMPLE
+++ b/src/intellij/scaladoc.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
@@ -20,8 +21,8 @@
<orderEntry type="module" module-name="library" />
<orderEntry type="module" module-name="reflect" />
<orderEntry type="module" module-name="compiler" />
- <orderEntry type="module" module-name="xml" />
- <orderEntry type="module" module-name="parser-combinators" />
- <orderEntry type="module" module-name="partest" />
+ <orderEntry type="library" name="partest" level="project" />
+ <orderEntry type="library" name="scaladoc-deps" level="project" />
</component>
</module>
+
diff --git a/src/intellij/scalap.iml.SAMPLE b/src/intellij/scalap.iml.SAMPLE
index 77eea7c38f..27ae451369 100644
--- a/src/intellij/scalap.iml.SAMPLE
+++ b/src/intellij/scalap.iml.SAMPLE
@@ -4,7 +4,8 @@
<facet type="scala" name="Scala">
<configuration>
<option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="compiler-locker" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
<option name="maximumHeapSize" value="1536" />
<option name="vmOptions" value="-Xms1536m -Xss1m -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=256m -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -XX:+UseParallelGC" />
</configuration>
diff --git a/src/intellij/setup.sh b/src/intellij/setup.sh
index bd324ba5bd..ec303778ed 100755
--- a/src/intellij/setup.sh
+++ b/src/intellij/setup.sh
@@ -5,19 +5,10 @@
set -e
export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
-export BASE="$( cd "$( dirname "$0" )"/../.. && pwd )"
echo "About to delete .ipr and .iml files and replace with the .SAMPLE files. Press enter to continue or CTRL-C to cancel."
read
-(rm -f *.ipr *.iml 2>/dev/null)
-for f in $(ls "$SCRIPT_DIR"/*.SAMPLE); do
- NEW_FILE=`echo $f | perl -pe 's/.SAMPLE//'`;
-
- cp $f $NEW_FILE
-
- # IntelliJ doesn't process the "compilerOptions" setting for variable
- # replacement. If it did, we would just use "$PROJECT_DIR$". Instead,
- # we do this replacement ourselves.
- perl -pi -e 's/\$BASE_DIR\$/$ENV{"BASE"}/g' $NEW_FILE
- echo "Created $NEW_FILE"
+for f in "$SCRIPT_DIR"/*.SAMPLE; do
+ g=${f%.SAMPLE}
+ cp $f $g
done
diff --git a/src/intellij/test-junit.iml.SAMPLE b/src/intellij/test-junit.iml.SAMPLE
new file mode 100644
index 0000000000..bb51c30a4f
--- /dev/null
+++ b/src/intellij/test-junit.iml.SAMPLE
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="scala" name="Scala">
+ <configuration>
+ <option name="compilerLibraryLevel" value="Project" />
+ <option name="compilerLibraryName" value="starr" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$/../../test/junit">
+ <sourceFolder url="file://$MODULE_DIR$/../../test/junit" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="actors" />
+ <orderEntry type="module" module-name="asm" />
+ <orderEntry type="module" module-name="compiler" />
+ <orderEntry type="module" module-name="library" />
+ <orderEntry type="module" module-name="reflect" />
+ <orderEntry type="module" module-name="repl" />
+ <orderEntry type="module" module-name="partest-extras" />
+ <orderEntry type="module" module-name="forkjoin" />
+ <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="library" name="scaladoc-deps" level="project" />
+ </component>
+</module>
+
diff --git a/src/intellij/test.iml.SAMPLE b/src/intellij/test.iml.SAMPLE
index 423be2062c..cb4a8568a1 100644
--- a/src/intellij/test.iml.SAMPLE
+++ b/src/intellij/test.iml.SAMPLE
@@ -1,21 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="scala" name="Scala">
+ <configuration>
+ <option name="compilerLibraryLevel" value="Project" />
+ <option name="compilerLibraryName" value="starr" />
+ <option name="languageLevel" value="Scala 2.11" />
+ </configuration>
+ </facet>
+ </component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
- <content url="file://$MODULE_DIR$/../../test" />
+ <content url="file://$MODULE_DIR$/../../test">
+ <excludeFolder url="file://$MODULE_DIR$/../../test/junit" />
+ </content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="library" />
- <orderEntry type="module" module-name="xml" />
- <orderEntry type="module" module-name="parser-combinators" />
<orderEntry type="module" module-name="reflect" />
<orderEntry type="module" module-name="compiler" />
+ <orderEntry type="module" module-name="repl" />
<orderEntry type="module" module-name="actors" />
- <orderEntry type="module" module-name="swing" />
- <orderEntry type="module" module-name="partest" />
<orderEntry type="module" module-name="asm" />
<orderEntry type="module" module-name="forkjoin" />
- <orderEntry type="library" name="junit" level="project" />
+ <orderEntry type="module" module-name="partest-extras" />
+ <orderEntry type="library" name="scaladoc-deps" level="project" />
+ <orderEntry type="library" name="partest" level="project" />
</component>
</module>
diff --git a/src/intellij/update.sh b/src/intellij/update.sh
new file mode 100755
index 0000000000..eb6fea782f
--- /dev/null
+++ b/src/intellij/update.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+#
+# Updates the .SAMPLE files with the current project files.
+#
+
+set -e
+export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
+
+echo "About to create overwrite the .ipr.SAMPLE and .iml.SAMPLE files with the current project files. Press enter to continue or CTRL-C to cancel."
+read
+
+for f in "$SCRIPT_DIR"/*.{iml,ipr}; do
+ cp $f $f.SAMPLE
+done
+
+for f in "$SCRIPT_DIR"/*.SAMPLE; do
+ g=${f%.SAMPLE}
+ if [[ ! -f $g ]]; then
+ echo "Stale sample file, deleting $f"
+ rm $f
+ fi
+done