- A Concurrent Affair - https://www.concurrentaffair.org -

Simplified Language Levels

The second DrJava project [1] I’m working on is a simplified Language Level facility [2]. As stated before, this is mainly Corky’s work, but I’m helping to integrate it into DrJava.

In revisions 5225 [3]5227 [4], the Java Language Levels were changed. Once these changes are integrated into the trunk, there will only be one Language Level called dj (or “Functional Java”), which was created by combining and modifying dj0 and dj1. The dj2 Language Level has been eliminated and the Language Level converter merely copies the unmodified text from a dj2 file to a java file.

The new Language Level facility can still compile dj0 and dj1 files as dj files. Compiling dj2 files is currently broken.

Here is what we need to do to properly support the new Java Language Level facility:

  1. Change all file dialogs to open *.java, *.dj0, *.dj1, *.d2 and the new *.dj files.
  2. When a *.dj0 or *.dj1 file is opened, the user should be asked if he or she wants to rename the file to *.dj.
  3. When a *.dj2 file is opened, the user should be asked if he or she wants to rename the file to *.java.
  4. The diagram and explanation of the Language Levels [5] in the documentation needs to be updated.
  5. The Language Levels menu needs to be changed to just “Full Java” and “Simplified Java” or something like that.
  6. Since *.dj2 files do not have the line number table anymore, they open the *.java file now. This needs to be fixed:
    1. In JUnit and the debugger, we are missing the line number conversion table. I suggest when a dj2 file is processed and the generated java file doesn’t have a conversion table at the top, we create an identity relation
      (i.e. it maps a line number to itself). Then we can still treat dj2 files as Language Level files.
    2. Compiler errors in dj2 files aren’t caught by the Language Level converter anymore, so javac compiles the generated java file. Errors in dj2 files are therefore reported in the java file, which is opened. We need additional code here that replaces the java file in the error message with the corresponding dj2 file from which it was generated.

We will wait until the semester at Rice is over, though until we make a new release. We don’t want our students in COMP 211 [6] run into problems because DrJava suddenly behaves differently than before. I have also disabled building weekly jars [7] for the same reason.

[8] [9]Share [10]