Skip to content

Commit 594c158

Browse files
committed
This revision includes changes to build.xml and source files to support Java 8 as the underlying platform and to eliminate some minor vestiges of DrJava.
The following files have been added, deleted, or modified:
1 parent 3767087 commit 594c158

File tree

60 files changed

+742
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+742
-743
lines changed

drjava/build.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
<project name="drscala" default="help">
88

9-
<!-- <property name="readable-project-name" value="DrJava" /> -->
109
<property name="readable-project-name" value="DrScala" />
1110
<property name="src-working-dir" value="src/edu/rice/cs/drjava" />
1211
<property name="junit-jar-to-include" value="lib/buildlib/junit.jar" />
@@ -376,6 +375,16 @@
376375
</antcall>
377376
</target>
378377

378+
<target name="test-8" depends="compile, resolve-java7-exec, resolve-java8-tools" unless="skip-test"
379+
description="Run all tests under Java 8 (after compiling); use -Dtest-spec=... to filter">
380+
<echo message="ConcJUnit is currently incompatible with Java 7."/>
381+
<antcall target="iterate-tests">
382+
<param name="test-jvm" value="${java8-exec}" />
383+
<param name="test-tools" value="${java8-tools}" />
384+
<param name="test-force-disable-concjunit" value="true" />
385+
</antcall>
386+
</target>
387+
379388
<target name="test-7" depends="compile, resolve-java7-exec, resolve-java7-tools" unless="skip-test"
380389
description="Run all tests under Java 7 (after compiling); use -Dtest-spec=... to filter">
381390
<echo message="ConcJUnit is currently incompatible with Java 7."/>
@@ -671,22 +680,20 @@
671680
</target>
672681

673682
<target name="do-javadoc" depends="check-generate-dir-from-dir" unless="already-generated">
674-
<echo message="Generating javadocs" />
683+
<echo message="Generating javadocs for DrScala" />
675684
<delete dir="docs/javadoc" />
676685
<mkdir dir="docs/javadoc" />
677686
<javadoc sourcepath="src" packagenames="*" destdir="docs/javadoc" maxmemory="512M"
678687
access="private" Use="yes" Version="yes" Author="yes" Windowtitle="${readable-project-name} API (${version-tag})" linksource="${link-source}">
679688
<classpath>
680-
<pathelement location="${java5-tools}" />
689+
<pathelement location="${java8-tools}" />
681690
<fileset refid="libs" />
682691
<pathelement location="lib/buildlib/junit.jar" />
683692
<pathelement location="lib/buildlib/netbeans-memory-leak-utils.jar" />
684693
</classpath>
685-
<link href="http://java.sun.com/j2se/1.5/docs/api" />
686-
<link href="http://junit.org/junit/javadoc/3.8.1" />
694+
<link href="http://docs.oracle.com/javase/8/docs/api/" />
695+
<link href="http://junit.org/junit/javadoc/3.8.2" />
687696
<link href="http://drjava.org/javadoc/plt" />
688-
<link href="http://drjava.org/javadoc/javalanglevels" />
689-
<link href="http://drjava.org/javadoc/dynamicjava" />
690697
<!-- Additional external library APIs may be listed here -->
691698
</javadoc>
692699
</target>
@@ -695,6 +702,9 @@
695702
<target name="clover" depends="clean, setup-clover, test, report-clover"
696703
description="Generate a Clover test coverage report" />
697704

705+
<target name="clover-8" depends="clean, setup-clover, test-8, report-clover"
706+
description="Generate a Clover test coverage report under Java 8" />
707+
698708
<target name="clover-7" depends="clean, setup-clover, test-7, report-clover"
699709
description="Generate a Clover test coverage report under Java 7" />
700710

drjava/lib/plt.jar

15.3 KB
Binary file not shown.
-101 KB
Binary file not shown.
-63.4 KB
Binary file not shown.
38.9 KB
Binary file not shown.

drjava/src/edu/rice/cs/drjava/MainController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public class MainController {
5454
* Document Pane (register with DJWindow + DocumentList + Documents Menu + Debugger)
5555
* Tab Manager (register with DJWindow + View Menu, add Tabs)
5656
* Tabs (register with TM)
57-
* Interactions, Console, Compiler, JUnit, Javadoc, FindBugs, Find/Replace
57+
* Interactions, Console, Compiler, JUnit, Scaladoc, FindBugs, Find/Replace
5858
* Debugger (register with DJWindow [or maybe TM?])
5959
* ViewerWindow
60-
* Help, Javadoc HTML
60+
* Help, Scaladoc HTML
6161
* AboutWindow
6262
* PreferencesWindow (to be refactored in another pass)
6363
* Configuration

drjava/src/edu/rice/cs/drjava/config/ClassPathOption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
import edu.rice.cs.util.FileOps;
4343

44-
/** Generate vector options separately to appease javadoc.
44+
/** Generate vector options separately to appease scaladoc.
4545
* (It didn't like anonymous inner classes with generics in interfaces in Java 1.3.)
4646
*/
4747
class ClassPathOption {

drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ public static void main(String[] args) {
459459
}
460460
}
461461

462-
public static class JavadocCustomParamsListener implements OptionListener<String>, OptionConstants {
462+
public static class ScaladocCustomParamsListener implements OptionListener<String>, OptionConstants {
463463
protected JFrame _parent;
464-
public JavadocCustomParamsListener(JFrame parent) { _parent = parent; }
464+
public ScaladocCustomParamsListener(JFrame parent) { _parent = parent; }
465465
public void optionChanged(OptionEvent<String> oe) {
466-
sanitizeJavadocCustomParams(_parent, oe.value);
466+
sanitizeScaladocCustomParams(_parent, oe.value);
467467
}
468468
}
469469

470-
public static void sanitizeJavadocCustomParams(JFrame parent,
470+
public static void sanitizeScaladocCustomParams(JFrame parent,
471471
String value) {
472472
boolean containsPrivate = (value.indexOf("-private") >= 0);
473473
boolean containsProtected = (value.indexOf("-protected") >= 0);
@@ -481,16 +481,16 @@ public static void sanitizeJavadocCustomParams(JFrame parent,
481481
if (containsPrivate) { sb.append("-private "); }
482482
if (containsPackage) { sb.append("-package "); }
483483
String[] options = new String[] { "Copy to \"Access Level\" Setting",
484-
"Clean \"Custom Javadoc Parameters\"",
484+
"Clean \"Custom Scaladoc Parameters\"",
485485
"Ignore" };
486486
int result = JOptionPane.
487487
showOptionDialog(parent,
488488
"You seem to have specified " + sb.toString() + "as part of the\n" +
489-
"\"Custom Javadoc Parameters\" setting. The \"Access Level\"\n" +
489+
"\"Custom Scaladoc Parameters\" setting. The \"Access Level\"\n" +
490490
"setting should be used instead. Would you like to copy the\n" +
491491
"parameter into the \"Access Level\" setting, just clean up\n" +
492-
"\"Custom Javadoc Parameters\", or ignore this potential problem?",
493-
"Access Level Set in Custom Javadoc Parameters",
492+
"\"Custom Scaladoc Parameters\", or ignore this potential problem?",
493+
"Access Level Set in Custom Scaladoc Parameters",
494494
0,
495495
JOptionPane.QUESTION_MESSAGE,
496496
null,
@@ -499,18 +499,18 @@ public static void sanitizeJavadocCustomParams(JFrame parent,
499499
if (result!=2) {
500500
if (result == 0) {
501501
// copy
502-
if (containsPublic) { DrJava.getConfig().setSetting(JAVADOC_ACCESS_LEVEL, "public"); }
503-
else if (containsProtected) { DrJava.getConfig().setSetting(JAVADOC_ACCESS_LEVEL, "protected"); }
504-
else if (containsPrivate) { DrJava.getConfig().setSetting(JAVADOC_ACCESS_LEVEL, "private"); }
505-
else if (containsPackage) { DrJava.getConfig().setSetting(JAVADOC_ACCESS_LEVEL, "package"); }
502+
if (containsPublic) { DrJava.getConfig().setSetting(SCALADOC_ACCESS_LEVEL, "public"); }
503+
else if (containsProtected) { DrJava.getConfig().setSetting(SCALADOC_ACCESS_LEVEL, "protected"); }
504+
else if (containsPrivate) { DrJava.getConfig().setSetting(SCALADOC_ACCESS_LEVEL, "private"); }
505+
else if (containsPackage) { DrJava.getConfig().setSetting(SCALADOC_ACCESS_LEVEL, "package"); }
506506
}
507507
// clean up
508508
String[] params = value.split("(-private|-protected|-package|-public)");
509509
sb = new StringBuilder();
510510
for(int i = 0; i < params.length; i++) {
511511
if(!params[i].trim().equals("")) { sb.append(params[i].trim()); sb.append(' '); }
512512
}
513-
DrJava.getConfig().setSetting(JAVADOC_CUSTOM_PARAMS, sb.toString().trim());
513+
DrJava.getConfig().setSetting(SCALADOC_CUSTOM_PARAMS, sb.toString().trim());
514514
}
515515
}
516516
}

drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOptionTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public final class ForcedChoiceOptionTest extends DrJavaTestCase {
5151
public ForcedChoiceOptionTest(String name) { super(name); }
5252

5353
public void testGetName() {
54-
ForcedChoiceOption fco = new ForcedChoiceOption("javadoc_access", "protected", null);
54+
ForcedChoiceOption fco = new ForcedChoiceOption("scaladoc_access", "protected", null);
5555

56-
assertEquals("javadoc_access", fco.getName());
56+
assertEquals("scaladoc_access", fco.getName());
5757
}
5858

5959
public void testParse() {
@@ -63,7 +63,7 @@ public void testParse() {
6363
aList.add("protected");
6464
aList.add("package");
6565
aList.add("private");
66-
ForcedChoiceOption fco = new ForcedChoiceOption("javadoc_access", "protected", aList);
66+
ForcedChoiceOption fco = new ForcedChoiceOption("scaladoc_access", "protected", aList);
6767

6868
assertTrue("Parsing \"private\"", "private".equals(fco.parse("private")));
6969
try { fco.parse("Private"); fail(); }
@@ -77,7 +77,7 @@ public void testParse() {
7777
}
7878

7979
public void testFormat() {
80-
ForcedChoiceOption fco = new ForcedChoiceOption("javadoc_access",
80+
ForcedChoiceOption fco = new ForcedChoiceOption("scaladoc_access",
8181
"protected",
8282
null);
8383

0 commit comments

Comments
 (0)