Skip to content

Commit bcbb9e0

Browse files
committed
Cleaned up unit testing and almost all issues with projects. The
problem of successfully parsing a project file (saved as <name>.drscala) may still be open. Essentially nothing concerning project files (except some simplification via reduced variants) is different in DrScala from DrJava. So the problem should be easy to fix. The following files were modified or deleted: modified: build.xml deleted: lib/dynamicjava-base.jar deleted: lib/javalanglevels-base.jar deleted: lib/tools6.jar modified: src/edu/rice/cs/drjava/DrScala.java modified: src/edu/rice/cs/drjava/Version.orig modified: src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java modified: src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java modified: src/edu/rice/cs/drjava/project/XMLProjectFileParser.java
1 parent 4e2c3f6 commit bcbb9e0

File tree

9 files changed

+5
-33
lines changed

9 files changed

+5
-33
lines changed

drjava/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@
15361536
<!-- Get a timestamp based on GMT, rather than local time -->
15371537
<tstamp>
15381538
<format property="DSTAMP" pattern="yyyyMMdd" timezone="GMT" />
1539-
<format property="TSTAMP" pattern="HHmm" timezone="GMT" />
1539+
<format property="TSTAMP" pattern="HH:mm:ss" timezone="GMT" />
15401540
<format property="TODAY" pattern="MMMM dd yyyy" timezone="GMT" />
15411541
</tstamp>
15421542
<property name="version-tag"

drjava/lib/dynamicjava-base.jar

-974 KB
Binary file not shown.

drjava/lib/javalanglevels-base.jar

-687 KB
Binary file not shown.

drjava/lib/tools6.jar

-6.43 MB
Binary file not shown.

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,6 @@ else if (arg.equals("-delete-after-restart")) {
423423
deleteAfterRestart.delete();
424424
}
425425

426-
else if (arg.equals("-jll")) {
427-
String[] argsForJLL = new String[args.length-argIndex];
428-
System.arraycopy(args, argIndex, argsForJLL, 0, argsForJLL.length);
429-
edu.rice.cs.javalanglevels.LanguageLevelConverter.main(argsForJLL);
430-
System.exit(0);
431-
}
432-
433426
else if (arg.equals("-help") || arg.equals("-?")) {
434427
displayUsage();
435428
return false;

drjava/src/edu/rice/cs/drjava/Version.orig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public abstract class Version {
5454
* This string will be automatically expanded upon "ant commit".
5555
* Do not edit it by hand!
5656
*/
57-
private static final String VERSION_STRING = "drjava-@DATE@-r@REVISION@";
57+
private static final String VERSION_STRING = "drscala-@DATE@-@TIME@";
5858

5959
/**
6060
* This string will be automatically expanded upon "ant commit".

drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@
5757
import edu.rice.cs.plt.io.IOUtil;
5858
import edu.rice.cs.plt.iter.IterUtil;
5959
import edu.rice.cs.plt.collect.CollectUtil;
60+
import edu.rice.cs.plt.tuple.Pair;
6061
import edu.rice.cs.util.FileOps;
6162
import edu.rice.cs.util.UnexpectedException;
6263
import edu.rice.cs.util.swing.Utilities;
63-
import edu.rice.cs.javalanglevels.*;
64-
import edu.rice.cs.javalanglevels.parser.*;
65-
import edu.rice.cs.javalanglevels.tree.*;
6664
import edu.rice.cs.util.swing.DirectoryChooser;
6765
import edu.rice.cs.util.swing.ScrollableListDialog;
6866

@@ -324,25 +322,6 @@ private void _doCompile(List<OpenDefinitionsDocument> docs) throws IOException {
324322
}
325323
}
326324

327-
/** Converts errors thrown by the language level visitors to CompilerErrors. */
328-
private LinkedList<DJError> _visitorErrors2CompilerErrors(LinkedList<Pair<String, JExpressionIF>> visitorErrors) {
329-
final LinkedList<DJError> errors = new LinkedList<DJError>();
330-
Iterator<Pair<String, JExpressionIF>> iter = visitorErrors.iterator();
331-
while (iter.hasNext()) {
332-
Pair<String, JExpressionIF> pair = iter.next();
333-
String message = pair.getFirst();
334-
// System.out.println("Got error message: " + message);
335-
JExpressionIF jexpr = pair.getSecond();
336-
337-
SourceInfo si;
338-
if (jexpr == null) si = SourceInfo.NO_INFO;
339-
else si = pair.getSecond().getSourceInfo();
340-
341-
errors.addLast(new DJError(si.getFile(), si.getStartLine()-1, si.getStartColumn()-1, message, false));
342-
}
343-
return errors;
344-
}
345-
346325
/** Compile the given files and update the model with any errors that result. Does not notify listeners.
347326
* All public compile methods delegate to this method so this method is the only one that uses synchronization to
348327
* prevent compiling and unit testing at the same time.

drjava/src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected ProjectFileParserFacade() { }
5050
// protected boolean _xmlProjectFile;
5151

5252
/** @param projFile the file to parse
53-
* @return the project file IR
53+
* @return the project file IR
5454
*/
5555
public ProjectFileIR parse(File projFile) throws IOException, FileNotFoundException, MalformedProjectFileException {
5656
FileReader fr = new FileReader(projFile);

drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public ProjectFileIR parse(File projFile) throws IOException, FileNotFoundExcept
106106
XMLConfig xcParent = new XMLConfig(projFile);
107107

108108
// create a sub-configuration so we don't have to prefix everything with "drjava/project/"
109-
_xc = new XMLConfig(xcParent, xcParent.getNodes("drjava/project").get(0));
109+
_xc = new XMLConfig(xcParent, xcParent.getNodes("drscala/project").get(0));
110110
LOG.log(_xc.toString());
111111
String s;
112112

0 commit comments

Comments
 (0)