Skip to content

Commit 76157e1

Browse files
author
mgricken
committed
Working on new language level support.
git-svn-id: file:///tmp/test-svn/trunk@5236 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent ef93e6c commit 76157e1

File tree

143 files changed

+1165
-749
lines changed

Some content is hidden

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

143 files changed

+1165
-749
lines changed

drjava/lib/forms-1.2.1.jar

100755100644
File mode changed.

drjava/lib/javalanglevels-base.jar

-43.4 KB
Binary file not shown.

drjava/lib/looks-2.2.2.jar

100755100644
File mode changed.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import edu.rice.cs.util.Log;
5757
import edu.rice.cs.util.UnexpectedException;
5858
import edu.rice.cs.util.FileOps;
59+
import edu.rice.cs.drjava.model.DrJavaFileUtils;
5960

6061
import static edu.rice.cs.plt.debug.DebugUtil.debug;
6162

@@ -499,7 +500,7 @@ static void displayUsage() {
499500
* accidentally used.
500501
*/
501502
static void setPropertiesFile(String fileName) {
502-
if (! fileName.endsWith(".java")) _propertiesFile = new File(fileName);
503+
if (!DrJavaFileUtils.isSourceFile(fileName)) _propertiesFile = new File(fileName);
503504
}
504505

505506
/** Initializes the configuration object with the current notion of the properties file.

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,7 @@
7171
/** Main class for DrJava.
7272
* @version $Id$
7373
*/
74-
public class DrJavaRoot {
75-
76-
/* Constants for language levels */
77-
public static final int FULL_JAVA = 0;
78-
public static final int ELEMENTARY_LEVEL = 1;
79-
public static final int INTERMEDIATE_LEVEL = 2;
80-
public static final int ADVANCED_LEVEL = 3;
81-
public static final String[] LANGUAGE_LEVEL_EXTENSIONS = new String[] {"java", "dj0", "dj1", "dj2"};
82-
74+
public class DrJavaRoot {
8375
/** Class to probe to see if the debugger is available */
8476
public static final String TEST_DEBUGGER_CLASS = "com.sun.jdi.Bootstrap";
8577

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

100755100644
File mode changed.

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

100755100644
File mode changed.

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,34 @@ public interface OptionConstants {
9090

9191
/** The extension for stand-alone DrJava external process file. */
9292
public static final String EXTPROCESS_FILE_EXTENSION = ".djapp";
93+
94+
/** The extension for a Java source file */
95+
public static final String JAVA_FILE_EXTENSION = ".java";
96+
97+
/** The extension for a language level source file */
98+
public static final String DJ_FILE_EXTENSION = ".dj";
99+
100+
/** The old extension for an elementary language level source file */
101+
public static final String OLD_DJ0_FILE_EXTENSION = ".dj0";
102+
103+
/** The old extension for an intermediate language level source file */
104+
public static final String OLD_DJ1_FILE_EXTENSION = ".dj1";
105+
106+
/** The old extension for an advanced language level source file */
107+
public static final String OLD_DJ2_FILE_EXTENSION = ".dj2";
108+
109+
/* Constants for language levels */
110+
public static final int FULL_JAVA = 0;
111+
public static final int ELEMENTARY_LEVEL = 1;
112+
public static final int INTERMEDIATE_LEVEL = 2;
113+
public static final int ADVANCED_LEVEL = 3;
114+
public static final int FUNCTIONAL_JAVA_LEVEL = 4;
115+
public static final String[] LANGUAGE_LEVEL_EXTENSIONS = new String[] {
116+
JAVA_FILE_EXTENSION, // = .java, do not include the dot
117+
OLD_DJ0_FILE_EXTENSION, // = .dj0
118+
OLD_DJ1_FILE_EXTENSION, // = .dj1
119+
OLD_DJ2_FILE_EXTENSION, // = .dj2
120+
DJ_FILE_EXTENSION }; // = .dj
93121

94122
/** The configuration XML file that DrJava looks for inside a .djapp file */
95123
public static final String EXTPROCESS_FILE_NAME_INSIDE_JAR = "process" + EXTPROCESS_FILE_EXTENSION;

0 commit comments

Comments
 (0)