Clover coverage report - DrJava Test Coverage (drjava-20120304-r5456)
Coverage timestamp: Sun Mar 4 2012 03:13:23 CST
file stats: LOC: 1,937   Methods: 17
NCLOC: 1,099   Classes: 13
 
 Source file Conditionals Statements Methods TOTAL
OptionConstants.java 57.1% 92.2% 100% 86.4%
coverage coverage
 1    /*BEGIN_COPYRIGHT_BLOCK
 2    *
 3    * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
 4    * All rights reserved.
 5    *
 6    * Redistribution and use in source and binary forms, with or without
 7    * modification, are permitted provided that the following conditions are met:
 8    * * Redistributions of source code must retain the above copyright
 9    * notice, this list of conditions and the following disclaimer.
 10    * * Redistributions in binary form must reproduce the above copyright
 11    * notice, this list of conditions and the following disclaimer in the
 12    * documentation and/or other materials provided with the distribution.
 13    * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
 14    * names of its contributors may be used to endorse or promote products
 15    * derived from this software without specific prior written permission.
 16    *
 17    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 18    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 19    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 20    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 21    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 22    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 23    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 24    * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 25    * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 26    * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 27    * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 28    *
 29    * This software is Open Source Initiative approved Open Source Software.
 30    * Open Source Initative Approved is a trademark of the Open Source Initiative.
 31    *
 32    * This file is part of DrJava. Download the current version of this project
 33    * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
 34    *
 35    * END_COPYRIGHT_BLOCK*/
 36   
 37    package edu.rice.cs.drjava.config;
 38   
 39    import java.io.File;
 40    import java.util.Vector;
 41    import java.util.ArrayList;
 42    import java.util.Arrays;
 43    import java.awt.Color;
 44    import java.awt.Font;
 45    import java.awt.Frame;
 46    import java.awt.Toolkit;
 47    import java.awt.event.KeyEvent;
 48    import javax.swing.KeyStroke;
 49    import javax.swing.LookAndFeel;
 50    import javax.swing.UIManager;
 51    import javax.swing.UIManager.LookAndFeelInfo;
 52   
 53    import edu.rice.cs.drjava.platform.PlatformFactory;
 54    import edu.rice.cs.plt.reflect.JavaVersion;
 55    import edu.rice.cs.util.FileOps;
 56   
 57    import static java.awt.Event.*;
 58   
 59   
 60    /** Defines the commonly used Option constants in DrJava config and project profiles.
 61    * @version $Id: OptionConstants.java 5436 2011-08-02 06:58:19Z mgricken $
 62    */
 63    public interface OptionConstants {
 64   
 65    // STATIC VARIABLES
 66   
 67    /* ---------- Resource Location and Classpath Options ---------- */
 68   
 69    /** A file path to a user's preferred browser. */
 70    public static final FileOption BROWSER_FILE = new FileOption("browser.file", FileOps.NULL_FILE);
 71   
 72    /** A String used to launch a user's preferred browser. It is tokenized and appended to the file path. */
 73    public static final StringOption BROWSER_STRING = new StringOption("browser.string", "");
 74   
 75    /** A Vector<String> storing the classes to automatically import. */
 76    public static final VectorOption<String> INTERACTIONS_AUTO_IMPORT_CLASSES =
 77    new VectorOption<String>("interactions.auto.import.classes", new StringOption("",""), new Vector<String>());
 78   
 79    /* The default rate at which the debugger steps into or over every line of code*/
 80    public static final NonNegativeIntegerOption AUTO_STEP_RATE = new NonNegativeIntegerOption("auto.step.rate", 1000);
 81   
 82    /** The extension for an old DrJava project file */
 83    public static final String OLD_PROJECT_FILE_EXTENSION = ".pjt";
 84   
 85    /** The extension for a DrJava project file */
 86    public static final String PROJECT_FILE_EXTENSION = ".drjava";
 87   
 88    /** The alternative extension for a DrJava project file */
 89    public static final String PROJECT_FILE_EXTENSION2 = ".xml";
 90   
 91    /** The extension for stand-alone DrJava external process file. */
 92    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
 121   
 122    /** The configuration XML file that DrJava looks for inside a .djapp file */
 123    public static final String EXTPROCESS_FILE_NAME_INSIDE_JAR = "process" + EXTPROCESS_FILE_EXTENSION;
 124   
 125    /** The extension for a text file */
 126    public static final String TEXT_FILE_EXTENSION = ".txt";
 127   
 128    /** tools.jar location, or NULL_FILE if not specified. */
 129    public static final FileOption JAVAC_LOCATION = new FileOption("javac.location", FileOps.NULL_FILE);
 130   
 131    /** Extra class path. */
 132    public static final VectorOption<File> EXTRA_CLASSPATH = new ClassPathOption().evaluate("extra.classpath");
 133   
 134    public static final VectorOption<String> EXTRA_COMPILERS =
 135    new VectorOption<String>("extra.compilers", new StringOption("",""), new Vector<String>());
 136   
 137    /** Whether to display all versions of the compilers (even if they have the same major version). */
 138    public static final BooleanOption DISPLAY_ALL_COMPILER_VERSIONS =
 139    new BooleanOption("all.compiler.versions", Boolean.FALSE);
 140   
 141   
 142    /* ---------- Color Options ---------- */
 143   
 144    public static final ColorOption DEFINITIONS_NORMAL_COLOR = new ColorOption("definitions.normal.color", Color.black);
 145    public static final ColorOption DEFINITIONS_KEYWORD_COLOR = new ColorOption("definitions.keyword.color", Color.blue);
 146    public static final ColorOption DEFINITIONS_TYPE_COLOR =
 147    new ColorOption("definitions.type.color", Color.blue.darker().darker());
 148    public static final ColorOption DEFINITIONS_COMMENT_COLOR =
 149    new ColorOption("definitions.comment.color", Color.green.darker().darker());
 150    public static final ColorOption DEFINITIONS_DOUBLE_QUOTED_COLOR =
 151    new ColorOption("definitions.double.quoted.color", Color.red.darker());
 152    public static final ColorOption DEFINITIONS_SINGLE_QUOTED_COLOR =
 153    new ColorOption("definitions.single.quoted.color", Color.magenta);
 154    public static final ColorOption DEFINITIONS_NUMBER_COLOR =
 155    new ColorOption("definitions.number.color", Color.cyan.darker());
 156    public static final ColorOption SYSTEM_OUT_COLOR = new ColorOption("system.out.color", Color.green.darker().darker());
 157    public static final ColorOption SYSTEM_ERR_COLOR = new ColorOption("system.err.color", Color.red);
 158    public static final ColorOption SYSTEM_IN_COLOR = new ColorOption("system.in.color", Color.magenta.darker().darker());
 159    public static final ColorOption INTERACTIONS_ERROR_COLOR =
 160    new ColorOption("interactions.error.color", Color.red.darker());
 161    public static final ColorOption DEBUG_MESSAGE_COLOR = new ColorOption("debug.message.color", Color.blue.darker());
 162   
 163    /** Color for background of definitions pane. */
 164    public static final ColorOption DEFINITIONS_BACKGROUND_COLOR =
 165    new ColorOption("definitions.background.color", Color.white);
 166   
 167    /** Color for background of line numbers in definitions pane. */
 168    public static final ColorOption DEFINITIONS_LINE_NUMBER_BACKGROUND_COLOR =
 169    new ColorOption("definitions.line.number.background.color",new Color(250, 250, 250));
 170   
 171    /** Color for background of line numbers in definitions pane. */
 172    public static final ColorOption DEFINITIONS_LINE_NUMBER_COLOR =
 173    new ColorOption("definitions.line.number.color", Color.black);
 174   
 175    /** Color for highlighting brace-matching. */
 176    public static final ColorOption DEFINITIONS_MATCH_COLOR =
 177    new ColorOption("definitions.match.color", new Color(190, 255, 230));
 178   
 179    /** Color for highlighting errors and test failures. */
 180    public static final ColorOption COMPILER_ERROR_COLOR = new ColorOption("compiler.error.color", Color.yellow);
 181   
 182    /** Color for highlighting bookmarks. */
 183    public static final ColorOption BOOKMARK_COLOR = new ColorOption("bookmark.color", Color.green);
 184   
 185    /** Color for highlighting find results. */
 186    public static final ColorOption FIND_RESULTS_COLOR1 =
 187    new ColorOption("find.results.color1", new Color(0xFF, 0x99, 0x33));
 188    public static final ColorOption FIND_RESULTS_COLOR2 =
 189    new ColorOption("find.results.color2", new Color(0x30, 0xC9, 0x96));
 190    public static final ColorOption FIND_RESULTS_COLOR3 =
 191    new ColorOption("find.results.color3", Color.ORANGE);
 192    public static final ColorOption FIND_RESULTS_COLOR4 =
 193    new ColorOption("find.results.color4", Color.MAGENTA);
 194    public static final ColorOption FIND_RESULTS_COLOR5 =
 195    new ColorOption("find.results.color5", new Color(0xCD, 0x5C, 0x5C));
 196    public static final ColorOption FIND_RESULTS_COLOR6 =
 197    new ColorOption("find.results.color6", Color.DARK_GRAY);
 198    public static final ColorOption FIND_RESULTS_COLOR7 =
 199    new ColorOption("find.results.color7", Color.GREEN);
 200    public static final ColorOption FIND_RESULTS_COLOR8 =
 201    new ColorOption("find.results.color8", Color.BLUE);
 202   
 203    public static final ColorOption[] FIND_RESULTS_COLORS = new ColorOption[] {
 204    FIND_RESULTS_COLOR1,
 205    FIND_RESULTS_COLOR2,
 206    FIND_RESULTS_COLOR3,
 207    FIND_RESULTS_COLOR4,
 208    FIND_RESULTS_COLOR5,
 209    FIND_RESULTS_COLOR6,
 210    FIND_RESULTS_COLOR7,
 211    FIND_RESULTS_COLOR8
 212    };
 213   
 214    /** Color for highlighting breakpoints. */
 215    public static final ColorOption DEBUG_BREAKPOINT_COLOR = new ColorOption("debug.breakpoint.color", Color.red);
 216   
 217    /** Color for highlighting disabled breakpoints. */
 218    public static final ColorOption DEBUG_BREAKPOINT_DISABLED_COLOR =
 219    new ColorOption("debug.breakpoint.disabled.color", new Color(128,0,0));
 220   
 221    /** Color for highlighting thread locations. */
 222    public static final ColorOption DEBUG_THREAD_COLOR = new ColorOption("debug.thread.color", new Color(100,255,255));
 223   
 224    /** Color for the background of the "DrJava Errors" button. */
 225    public static final ColorOption DRJAVA_ERRORS_BUTTON_COLOR = new ColorOption("drjava.errors.button.color", Color.red);
 226   
 227    /** Color for the line at the right margin. */
 228    public static final ColorOption RIGHT_MARGIN_COLOR = new ColorOption("right.margin.color", new Color(204,204,204));
 229   
 230    /* ---------- Font Options ---------- */
 231   
 232    /** Main (definitions document, tab contents) */
 233    public static final FontOption FONT_MAIN = new FontOption("font.main", DefaultFont.getDefaultMainFont());
 234   
 235    /** Class that allows the main font to be initialized properly. On Mac OS X, Monaco is the best monospaced font. */
 236    static class DefaultFont {
 237  117 public static Font getDefaultMainFont() {
 238  0 if (PlatformFactory.ONLY.isMacPlatform()) return Font.decode("Monaco-12");
 239  117 else return Font.decode("Monospaced-12");
 240    }
 241  117 public static Font getDefaultLineNumberFont() {
 242  0 if (PlatformFactory.ONLY.isMacPlatform()) return Font.decode("Monaco-12");
 243  117 else return Font.decode("Monospaced-12");
 244    }
 245  117 public static Font getDefaultDocListFont() {
 246  0 if (PlatformFactory.ONLY.isMacPlatform()) return Font.decode("Monaco-10");
 247  117 else return Font.decode("Monospaced-10");
 248    }
 249    }
 250   
 251    /** Line numbers */
 252    public static final FontOption FONT_LINE_NUMBERS =
 253    new FontOption("font.line.numbers", DefaultFont.getDefaultLineNumberFont());
 254   
 255    /** List of open documents */
 256    public static final FontOption FONT_DOCLIST = new FontOption("font.doclist", DefaultFont.getDefaultDocListFont());
 257   
 258    /** Toolbar buttons */
 259    public static final FontOption FONT_TOOLBAR = new FontOption("font.toolbar", Font.decode("dialog-10"));
 260   
 261    /** Whether to draw anti-aliased text. (Slightly slower.) */
 262    public static final BooleanOption TEXT_ANTIALIAS = new BooleanOption("text.antialias", Boolean.TRUE);
 263   
 264    /** Whether to draw the right margin. (Slightly slower.) */
 265    public static final BooleanOption DISPLAY_RIGHT_MARGIN = new BooleanOption("display.right.margin", Boolean.TRUE);
 266   
 267    /** After how many columns to draw the right margin. */
 268    public static final NonNegativeIntegerOption RIGHT_MARGIN_COLUMNS =
 269    new NonNegativeIntegerOption("right.margin.columns", 120);
 270   
 271   
 272    /* ---------- Other Display Options ---------- */
 273   
 274    /** Whether icons should be displayed on the toolbar buttons. */
 275    public static final BooleanOption TOOLBAR_ICONS_ENABLED =
 276    new BooleanOption("toolbar.icons.enabled", Boolean.TRUE);
 277   
 278    /** Whether text should be displayed on toolbar buttons. Note: only relevant if toolbar icons are enabled. */
 279    public static final BooleanOption TOOLBAR_TEXT_ENABLED = new BooleanOption("toolbar.text.enabled", Boolean.TRUE);
 280   
 281    /** Whether or not the toolbar should be displayed. */
 282    public static final BooleanOption TOOLBAR_ENABLED = new BooleanOption("toolbar.enabled", Boolean.TRUE);
 283   
 284    /** Whether the line-numbers should be displayed in a row header. */
 285    public static final BooleanOption LINEENUM_ENABLED = new BooleanOption("lineenum.enabled", Boolean.FALSE);
 286   
 287    /** Whether to save and restore window size and position at startUp/shutdown. */
 288    public static final BooleanOption WINDOW_STORE_POSITION = new BooleanOption("window.store.position", Boolean.TRUE);
 289   
 290    /** Whether a sample of the source code will be show when fast switching documents. */
 291    public static final BooleanOption SHOW_SOURCE_WHEN_SWITCHING =
 292    new BooleanOption("show.source.for.fast.switch", Boolean.TRUE);
 293   
 294    /** The current look and feel. */
 295    public static final ForcedChoiceOption LOOK_AND_FEEL =
 296    new ForcedChoiceOption("look.and.feel", LookAndFeels.getDefaultLookAndFeel(), LookAndFeels.getLookAndFeels());
 297   
 298    /** Class that allows the look and feels to be initialized properly. */
 299    static class LookAndFeels {
 300    private static String[][] _registerLAFs = {
 301    {"Plastic 3D", "com.jgoodies.looks.plastic.Plastic3DLookAndFeel"},
 302    {"Plastic XP", "com.jgoodies.looks.plastic.PlasticXPLookAndFeel"},
 303    {"Plastic Windows", "com.jgoodies.looks.windows.Plastic3DLookAndFeel"},
 304    {"Plastic", "com.jgoodies.looks.plastic.PlasticLookAndFeel"}
 305    };
 306   
 307    private static boolean _registered = false;
 308   
 309    /** Return the look-and-feel to use by default */
 310  117 public static String getDefaultLookAndFeel() {
 311  117 if (PlatformFactory.ONLY.isMacPlatform())
 312  0 return UIManager.getSystemLookAndFeelClassName(); // Mac: Let the system decide.
 313  117 else if (PlatformFactory.ONLY.isWindowsPlatform())
 314  0 return UIManager.getCrossPlatformLookAndFeelClassName(); // Windows: Metal, because the Windows LAF is ugly
 315    else {
 316  117 if (JavaVersion.CURRENT.supports(JavaVersion.JAVA_6)) {
 317    // Linux with Java 6: Let the system decide. Probably GTK, which is ok.
 318  117 return UIManager.getSystemLookAndFeelClassName();
 319    }
 320    else {
 321    // Linux with Java older than Java 6: Metal
 322  0 return UIManager.getCrossPlatformLookAndFeelClassName();
 323    }
 324    }
 325    }
 326   
 327    /** Need to ensure that a look-and-feel can be instantiated and is valid.
 328    * TODO: store the LookAndFeel object rather than its classname. This would be much nicer, as we could display a
 329    * useful name, and wouldn't have to reinstantiate it when it's installed.
 330    * @return the list of available look-and-feel classnames
 331    */
 332  117 public static ArrayList<String> getLookAndFeels() {
 333  117 if(!_registered && !PlatformFactory.ONLY.isMacPlatform()) {
 334  117 for(String[] newLaf : _registerLAFs) {
 335  468 try {
 336  468 Class.forName(newLaf[1]);
 337    } catch(ClassNotFoundException ex) {
 338  117 continue;
 339    }
 340  351 UIManager.installLookAndFeel(newLaf[0], newLaf[1]);
 341    }
 342    }
 343  117 ArrayList<String> lookAndFeels = new ArrayList<String>();
 344  117 LookAndFeelInfo[] lafis = UIManager.getInstalledLookAndFeels();
 345  117 if (lafis != null) {
 346  117 for (int i = 0; i < lafis.length; i++) {
 347  819 try {
 348  819 String currName = lafis[i].getClassName();
 349  819 LookAndFeel currLAF = (LookAndFeel) Class.forName(currName).newInstance();
 350  819 if (currLAF.isSupportedLookAndFeel()) lookAndFeels.add(currName);
 351    }
 352    // failed to load/instantiate class, or it is not supported; it is not a valid choice.
 353    catch (ClassNotFoundException e) { /* do nothing */ }
 354    catch (InstantiationException e) { /* do nothing */ }
 355    catch (IllegalAccessException e) { /* do nothing */ }
 356    }
 357    }
 358  117 return lookAndFeels;
 359    }
 360    }
 361   
 362    public static final ForcedChoiceOption PLASTIC_THEMES =
 363    new ForcedChoiceOption("plastic.theme", PlasticThemes.getDefaultTheme(), PlasticThemes.getThemes());
 364   
 365    /* TODO: This theme list is current as of JGoodies Looks 2.1.
 366    * We could automatically update this list by enumerating types in the
 367    * com.jgoodies.looks.themes package, and excluding abstract classes.
 368    */
 369    static class PlasticThemes {
 370  117 public static ArrayList<String> getThemes() {
 371  117 ArrayList<String> al = new ArrayList<String>();
 372  117 String[] themes = new String[] {
 373    "BrownSugar", "DarkStar",
 374    "SkyBlue", "SkyGreen", "SkyKrupp", "SkyPink", "SkyRed", "SkyYellow",
 375    "DesertBluer", "DesertBlue", "DesertGreen", "DesertRed", "DesertYellow",
 376    "ExperienceBlue", "ExperienceGreen", "LightGray", "Silver",
 377    "ExperienceRoyale"
 378    };
 379  117 for(String theme : themes) {
 380  2106 al.add(theme);
 381    }
 382  117 return al;
 383    }
 384   
 385  117 public static String getDefaultTheme() {
 386  117 return "DesertBlue";
 387    }
 388    }
 389   
 390    /* ---------- Key Binding Options ----------- */
 391    public static int MASK = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
 392   
 393    static class to {
 394  15444 public static Vector<KeyStroke> vector(KeyStroke... ks) {
 395  15444 Vector<KeyStroke> v = new Vector<KeyStroke>();
 396  11349 for(KeyStroke k: ks) { v.add(k); }
 397  15444 return v;
 398    }
 399    }
 400   
 401    /** The key binding for creating a new file */
 402    public static final VectorOption<KeyStroke> KEY_NEW_FILE =
 403    new VectorOption<KeyStroke>("key.new.file",
 404    new KeyStrokeOption("",null),
 405    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_N, MASK)));
 406   
 407    /** The key binding for creating a new java class file */
 408    public static final VectorOption<KeyStroke> KEY_NEW_CLASS_FILE =
 409    new VectorOption<KeyStroke>("key.new.javafile", new KeyStrokeOption("",null),
 410    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_N, MASK|SHIFT_MASK)));
 411   
 412    /** The key binding for opening an entire project. I is right next to O, so
 413    * it seemed logical that ctrl-I would open a project and ctrl-O open a file */
 414    public static final VectorOption<KeyStroke> KEY_OPEN_PROJECT =
 415    new VectorOption<KeyStroke>("key.open.project",
 416    new KeyStrokeOption("",null),
 417    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_I, MASK)));
 418   
 419    /** The key binding for creating a new project. */
 420    public static final VectorOption<KeyStroke> KEY_NEW_PROJECT =
 421    new VectorOption<KeyStroke>("key.new.project", new KeyStrokeOption("",null), to.vector());
 422   
 423    /** The key binding for saving a project. */
 424    public static final VectorOption<KeyStroke> KEY_SAVE_PROJECT =
 425    new VectorOption<KeyStroke>("key.save.project", new KeyStrokeOption("",null), to.vector());
 426   
 427    /** The key binding for saving a project as a different file. */
 428    public static final VectorOption<KeyStroke> KEY_SAVE_AS_PROJECT =
 429    new VectorOption<KeyStroke>("key.save.as.project", new KeyStrokeOption("",null), to.vector());
 430   
 431    /** The key binding for compiling a project. */
 432    public static final VectorOption<KeyStroke> KEY_COMPILE_PROJECT =
 433    new VectorOption<KeyStroke>("key.compile.project", new KeyStrokeOption("",null), to.vector());
 434   
 435    /** The key binding for testing a project. */
 436    public static final VectorOption<KeyStroke> KEY_JUNIT_PROJECT =
 437    new VectorOption<KeyStroke>("key.junit.project", new KeyStrokeOption("",null), to.vector());
 438   
 439    /** The key binding for running a project. */
 440    public static final VectorOption<KeyStroke> KEY_RUN_PROJECT =
 441    new VectorOption<KeyStroke>("key.run.project", new KeyStrokeOption("",null), to.vector());
 442   
 443    /** The key binding for cleaning a project. */
 444    public static final VectorOption<KeyStroke> KEY_CLEAN_PROJECT =
 445    new VectorOption<KeyStroke>("key.clean.project", new KeyStrokeOption("",null), to.vector());
 446   
 447    /** The key binding for refreshing a project. */
 448    public static final VectorOption<KeyStroke> KEY_AUTO_REFRESH_PROJECT =
 449    new VectorOption<KeyStroke>("key.auto.refresh.project", new KeyStrokeOption("",null), to.vector());
 450   
 451    /** The key binding for creating a jar of a project. */
 452    public static final VectorOption<KeyStroke> KEY_JAR_PROJECT =
 453    new VectorOption<KeyStroke>("key.jar.project", new KeyStrokeOption("",null), to.vector());
 454   
 455    /** The key binding for editing the project properties. */
 456    public static final VectorOption<KeyStroke> KEY_PROJECT_PROPERTIES =
 457    new VectorOption<KeyStroke>("key.project.properties", new KeyStrokeOption("",null),
 458    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_I, MASK|SHIFT_MASK)));
 459   
 460    /** The key binding for creating a new JUnit test case */
 461    public static final VectorOption<KeyStroke> KEY_NEW_TEST =
 462    new VectorOption<KeyStroke>("key.new.test", new KeyStrokeOption("",null), to.vector());
 463   
 464    /** The key binding for opening a folder */
 465    public static final VectorOption<KeyStroke> KEY_OPEN_FOLDER =
 466    new VectorOption<KeyStroke>("key.open.folder",
 467    new KeyStrokeOption("",null),
 468    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_O, MASK|SHIFT_MASK)));
 469   
 470    /** The key binding for opening a file. */
 471    public static final VectorOption<KeyStroke> KEY_OPEN_FILE =
 472    new VectorOption<KeyStroke>("key.open.file",
 473    new KeyStrokeOption("",null),
 474    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_O, MASK)));
 475   
 476    /** The key binding for saving a file. */
 477    public static final VectorOption<KeyStroke> KEY_SAVE_FILE =
 478    new VectorOption<KeyStroke>("key.save.file",
 479    new KeyStrokeOption("",null),
 480    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_S, MASK)));
 481   
 482    /** The key binding for saving a file as. */
 483    public static final VectorOption<KeyStroke> KEY_SAVE_FILE_AS =
 484    new VectorOption<KeyStroke>("key.save.file.as",
 485    new KeyStrokeOption("",null),
 486    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_S, MASK | SHIFT_MASK)));
 487   
 488    /** The key binding for saving a file copy */
 489    public static final VectorOption<KeyStroke> KEY_SAVE_FILE_COPY =
 490    new VectorOption<KeyStroke>("key.save.file.copy",
 491    new KeyStrokeOption("",null),
 492    to.vector());
 493   
 494    /** The key binding for saving all files. */
 495    public static final VectorOption<KeyStroke> KEY_SAVE_ALL_FILES =
 496    new VectorOption<KeyStroke>("key.save.all.files",
 497    new KeyStrokeOption("",null),
 498    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_S, MASK | ALT_MASK)));
 499   
 500    /** The key binding for exporting in the old project file format */
 501    public static final VectorOption<KeyStroke> KEY_EXPORT_OLD =
 502    new VectorOption<KeyStroke>("key.export.old", new KeyStrokeOption("",null), to.vector());
 503   
 504    /** The key binding for renaming a file. */
 505    public static final VectorOption<KeyStroke> KEY_RENAME_FILE =
 506    new VectorOption<KeyStroke>("key.rename.file",
 507    new KeyStrokeOption("",null),
 508    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_R, MASK)));
 509   
 510    /** The key binding for reverting a file. */
 511    public static final VectorOption<KeyStroke> KEY_REVERT_FILE =
 512    new VectorOption<KeyStroke>("key.revert.file",
 513    new KeyStrokeOption("",null),
 514    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_R, MASK|SHIFT_MASK)));
 515   
 516    /** The key binding for closing a file */
 517    public static final VectorOption<KeyStroke> KEY_CLOSE_FILE =
 518    new VectorOption<KeyStroke>("key.close.file",
 519    new KeyStrokeOption("",null),
 520    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_W, MASK)));
 521   
 522    /** The key binding for closing all files */
 523    public static final VectorOption<KeyStroke> KEY_CLOSE_ALL_FILES =
 524    new VectorOption<KeyStroke>("key.close.all.files",
 525    new KeyStrokeOption("",null),
 526    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_W, MASK|ALT_MASK)));
 527   
 528    public static final VectorOption<KeyStroke> KEY_CLOSE_PROJECT =
 529    new VectorOption<KeyStroke>("key.close.project",
 530    new KeyStrokeOption("",null),
 531    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_W, MASK|SHIFT_MASK)));
 532   
 533    /** The key binding for showing the print preview */
 534    public static final VectorOption<KeyStroke> KEY_PAGE_SETUP =
 535    new VectorOption<KeyStroke>("key.page.setup", new KeyStrokeOption("",null), to.vector());
 536   
 537    /** The key binding for showing the print preview. */
 538    public static final VectorOption<KeyStroke> KEY_PRINT_PREVIEW =
 539    new VectorOption<KeyStroke>("key.print.preview",
 540    new KeyStrokeOption("",null),
 541    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_P, MASK | SHIFT_MASK)));
 542   
 543    /** The key binding for printing a file */
 544    public static final VectorOption<KeyStroke> KEY_PRINT =
 545    new VectorOption<KeyStroke>("key.print",
 546    new KeyStrokeOption("",null),
 547    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_P, MASK)));
 548   
 549    /** The key binding for quitting */
 550    public static final VectorOption<KeyStroke> KEY_QUIT =
 551    new VectorOption<KeyStroke>("key.quit",
 552    new KeyStrokeOption("",null),
 553    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_Q, MASK)));
 554   
 555    /** The key binding for forced quitting */
 556    public static final VectorOption<KeyStroke> KEY_FORCE_QUIT =
 557    new VectorOption<KeyStroke>("key.force.quit", new KeyStrokeOption("",null), to.vector());
 558   
 559    /** The key binding for undo-ing */
 560    public static final VectorOption<KeyStroke> KEY_UNDO =
 561    new VectorOption<KeyStroke>("key.undo",
 562    new KeyStrokeOption("",null),
 563    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_Z, MASK)));
 564   
 565    /** The key binding for redo-ing */
 566    public static final VectorOption<KeyStroke> KEY_REDO =
 567    new VectorOption<KeyStroke>("key.redo",
 568    new KeyStrokeOption("",null),
 569    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_Z, MASK|SHIFT_MASK)));
 570   
 571    /** The key binding for cutting */
 572    public static final VectorOption<KeyStroke> KEY_CUT =
 573    new VectorOption<KeyStroke>("key.cut",
 574    new KeyStrokeOption("",null),
 575    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_X, MASK)));
 576   
 577    /** The key binding for copying */
 578    public static final VectorOption<KeyStroke> KEY_COPY =
 579    new VectorOption<KeyStroke>("key.copy",
 580    new KeyStrokeOption("",null),
 581    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_C, MASK)));
 582   
 583    /** The key binding for pasting */
 584    public static final VectorOption<KeyStroke> KEY_PASTE =
 585    new VectorOption<KeyStroke>("key.paste",
 586    new KeyStrokeOption("",null),
 587    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_V, MASK)));
 588   
 589    /** The key binding for pasting from history */
 590    public static final VectorOption<KeyStroke> KEY_PASTE_FROM_HISTORY =
 591    new VectorOption<KeyStroke>("key.paste.from.history",
 592    new KeyStrokeOption("",null),
 593    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_V , MASK|SHIFT_MASK)));
 594   
 595    /** The key binding for selecting all text */
 596    public static final VectorOption<KeyStroke> KEY_SELECT_ALL =
 597    new VectorOption<KeyStroke>("key.select.all",
 598    new KeyStrokeOption("",null),
 599    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_A, MASK)));
 600   
 601    /** The key binding for find and replace */
 602    public static final VectorOption<KeyStroke> KEY_FIND_NEXT =
 603    new VectorOption<KeyStroke>("key.find.next",
 604    new KeyStrokeOption("",null),
 605    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0)));
 606   
 607    /** The key binding for find previous (opposite direction) */
 608    public static final VectorOption<KeyStroke> KEY_FIND_PREV =
 609    new VectorOption<KeyStroke>("key.find.prev",
 610    new KeyStrokeOption("",null),
 611    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F3, SHIFT_MASK)));
 612   
 613    /** The key binding for find and replace */
 614    public static final VectorOption<KeyStroke> KEY_FIND_REPLACE =
 615    new VectorOption<KeyStroke>("key.find.replace",
 616    new KeyStrokeOption("",null),
 617    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F, MASK)));
 618   
 619    /** The key binding for goto line */
 620    public static final VectorOption<KeyStroke> KEY_GOTO_LINE =
 621    new VectorOption<KeyStroke>("key.goto.line",
 622    new KeyStrokeOption("",null),
 623    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_G, MASK)));
 624   
 625    /** The key binding for goto file. */
 626    public static final VectorOption<KeyStroke> KEY_GOTO_FILE =
 627    new VectorOption<KeyStroke>("key.goto.file",
 628    new KeyStrokeOption("",null),
 629    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_G, MASK|KeyEvent.SHIFT_MASK)));
 630   
 631    /** The key binding for goto this file. */
 632    public static final VectorOption<KeyStroke> KEY_GOTO_FILE_UNDER_CURSOR =
 633    new VectorOption<KeyStroke>("key.goto.file.under.cursor",
 634    new KeyStrokeOption("",null),
 635    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)));
 636   
 637    /** The key binding for open Javadoc. */
 638    public static final VectorOption<KeyStroke> KEY_OPEN_JAVADOC =
 639    new VectorOption<KeyStroke>("key.open.javadoc",
 640    new KeyStrokeOption("",null),
 641    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F6, KeyEvent.SHIFT_MASK)));
 642   
 643    /** The key binding for open Javadoc under cursor. */
 644    public static final VectorOption<KeyStroke> KEY_OPEN_JAVADOC_UNDER_CURSOR =
 645    new VectorOption<KeyStroke>("key.open.javadoc.under.cursor",
 646    new KeyStrokeOption("",null),
 647    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F6, MASK)));
 648   
 649    /** The key binding for complete file. */
 650    public static final VectorOption<KeyStroke> KEY_COMPLETE_FILE =
 651    new VectorOption<KeyStroke>("key.complete.file",
 652    new KeyStrokeOption("",null),
 653    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, MASK|KeyEvent.SHIFT_MASK)));
 654   
 655    // /** The key binding for indenting */
 656    // public static final VectorOption<KeyStroke> KEY_INDENT =
 657    // new VectorOption<KeyStroke>("key.indent",
 658    // new KeyStrokeOption("",null),
 659    // to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, MASK)));
 660   
 661    /** The key binding for commenting out lines */
 662    public static final VectorOption<KeyStroke> KEY_COMMENT_LINES =
 663    new VectorOption<KeyStroke>("key.comment.lines",
 664    new KeyStrokeOption("",null),
 665    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, MASK)));
 666   
 667    /** The key binding for un-commenting lines */
 668    public static final VectorOption<KeyStroke> KEY_UNCOMMENT_LINES =
 669    new VectorOption<KeyStroke>("key.uncomment.lines",
 670    new KeyStrokeOption("",null),
 671    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_SLASH, MASK|SHIFT_MASK)));
 672   
 673    /** The key binding for selecting previous document */
 674    public static final VectorOption<KeyStroke> KEY_PREVIOUS_DOCUMENT =
 675    new VectorOption<KeyStroke>("key.previous.document",
 676    new KeyStrokeOption("",null),
 677    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, MASK)));
 678   
 679    /** The key binding for selecting next document */
 680    public static final VectorOption<KeyStroke> KEY_NEXT_DOCUMENT =
 681    new VectorOption<KeyStroke>("key.next.document",
 682    new KeyStrokeOption("",null),
 683    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, MASK)));
 684   
 685    /** The key binding for changing the focus to the previous pane */
 686    public static final VectorOption<KeyStroke> KEY_PREVIOUS_PANE =
 687    new VectorOption<KeyStroke>("key.previous.pane",
 688    new KeyStrokeOption("",null),
 689    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, MASK)));
 690   
 691    /** The key binding for changing the focus to the next pane */
 692    public static final VectorOption<KeyStroke> KEY_NEXT_PANE =
 693    new VectorOption<KeyStroke>("key.next.pane",
 694    new KeyStrokeOption("",null),
 695    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, MASK)));
 696   
 697    /** The key binding for going to the opening brace. */
 698    public static final VectorOption<KeyStroke> KEY_OPENING_BRACE =
 699    new VectorOption<KeyStroke>("key.goto.opening.brace",
 700    new KeyStrokeOption("",null),
 701    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, MASK|SHIFT_MASK)));
 702   
 703    /** The key binding for going to the closing brace. */
 704    public static final VectorOption<KeyStroke> KEY_CLOSING_BRACE =
 705    new VectorOption<KeyStroke>("key.goto.closing.brace",
 706    new KeyStrokeOption("",null),
 707    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, MASK|SHIFT_MASK)));
 708   
 709    /** The key binding for jumping to the next location in the browser history */
 710    public static final VectorOption<KeyStroke> KEY_BROWSE_FORWARD =
 711    new VectorOption<KeyStroke>("key.browse.forward",
 712    new KeyStrokeOption("",null),
 713    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, ALT_MASK|SHIFT_MASK)));
 714   
 715    /** The key binding for jumping to the previous location in the browser history */
 716    public static final VectorOption<KeyStroke> KEY_BROWSE_BACK =
 717    new VectorOption<KeyStroke>("key.browse.back",
 718    new KeyStrokeOption("",null),
 719    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, ALT_MASK|SHIFT_MASK)));
 720   
 721    /** The key binding for going to the next region in the tabbed pane */
 722    public static final VectorOption<KeyStroke> KEY_TABBED_NEXT_REGION =
 723    new VectorOption<KeyStroke>("key.tabbed.next.region",
 724    new KeyStrokeOption("",null),
 725    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, ALT_MASK|SHIFT_MASK)));
 726   
 727    /** The key binding for going to the previous region in the tabbed pane */
 728    public static final VectorOption<KeyStroke> KEY_TABBED_PREV_REGION =
 729    new VectorOption<KeyStroke>("key.tabbed.prev.region",
 730    new KeyStrokeOption("",null),
 731    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_UP, ALT_MASK|SHIFT_MASK)));
 732   
 733    /** The key binding for openning the preferences dialog */
 734    public static final VectorOption<KeyStroke> KEY_PREFERENCES =
 735    new VectorOption<KeyStroke>("key.preferences",
 736    new KeyStrokeOption("",null),
 737    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_SEMICOLON, MASK)));
 738   
 739    /** The key binding for compiling current document */
 740    public static final VectorOption<KeyStroke> KEY_COMPILE =
 741    new VectorOption<KeyStroke>("key.compile",
 742    new KeyStrokeOption("",null),
 743    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F5, SHIFT_MASK)));
 744   
 745    /** The key binding for compiling all */
 746    public static final VectorOption<KeyStroke> KEY_COMPILE_ALL =
 747    new VectorOption<KeyStroke>("key.compile.all",
 748    new KeyStrokeOption("",null),
 749    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)));
 750   
 751    /** The key binding for running the main method of the current document */
 752    public static final VectorOption<KeyStroke> KEY_RUN =
 753    new VectorOption<KeyStroke>("key.run",
 754    new KeyStrokeOption("",null),
 755    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)));
 756   
 757    /** The key binding for running the current document as applet. */
 758    public static final VectorOption<KeyStroke> KEY_RUN_APPLET =
 759    new VectorOption<KeyStroke>("key.run.applet",
 760    new KeyStrokeOption("",null),
 761    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F2, SHIFT_MASK)));
 762   
 763    /** The key binding for testing the current document */
 764    public static final VectorOption<KeyStroke> KEY_TEST =
 765    new VectorOption<KeyStroke>("key.test",
 766    new KeyStrokeOption("",null),
 767    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_T, MASK|SHIFT_MASK)));
 768   
 769    /** The key binding for testing all open JUnit test cases. */
 770    public static final VectorOption<KeyStroke> KEY_TEST_ALL =
 771    new VectorOption<KeyStroke>("key.test.all",
 772    new KeyStrokeOption("",null),
 773    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_T, MASK)));
 774   
 775    /** The key binding for generating javadoc for all documents */
 776    public static final VectorOption<KeyStroke> KEY_JAVADOC_ALL =
 777    new VectorOption<KeyStroke>("key.javadoc.all",
 778    new KeyStrokeOption("",null),
 779    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_J, MASK)));
 780   
 781    /** The key binding for generating javadoc for the current document */
 782    public static final VectorOption<KeyStroke> KEY_JAVADOC_CURRENT =
 783    new VectorOption<KeyStroke>("key.javadoc.current",
 784    new KeyStrokeOption("",null),
 785    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_J, MASK | SHIFT_MASK)));
 786   
 787    /** The key binding for saving the interactions copy to a file. */
 788    public static final VectorOption<KeyStroke> KEY_SAVE_INTERACTIONS_COPY =
 789    new VectorOption<KeyStroke>("key.save.interactions.copy", new KeyStrokeOption("",null), to.vector());
 790   
 791    /** The key binding for executing an interactions history. */
 792    public static final VectorOption<KeyStroke> KEY_EXECUTE_HISTORY =
 793    new VectorOption<KeyStroke>("key.execute.history", new KeyStrokeOption("",null), to.vector());
 794   
 795    /** The key binding for loading an interactions history as a script. */
 796    public static final VectorOption<KeyStroke> KEY_LOAD_HISTORY_SCRIPT =
 797    new VectorOption<KeyStroke>("key.load.history.script", new KeyStrokeOption("",null), to.vector());
 798   
 799    /** The key binding for saving an interactions history. */
 800    public static final VectorOption<KeyStroke> KEY_SAVE_HISTORY =
 801    new VectorOption<KeyStroke>("key.save.history", new KeyStrokeOption("",null), to.vector());
 802   
 803    /** The key binding for clearing the interactions history. */
 804    public static final VectorOption<KeyStroke> KEY_CLEAR_HISTORY =
 805    new VectorOption<KeyStroke>("key.clear.history", new KeyStrokeOption("",null), to.vector());
 806   
 807    /** The key binding for resetting the interactions pane. */
 808    public static final VectorOption<KeyStroke> KEY_RESET_INTERACTIONS =
 809    new VectorOption<KeyStroke>("key.reset.interactions", new KeyStrokeOption("",null), to.vector());
 810   
 811    /** The key binding for viewing the interactions classpath. */
 812    public static final VectorOption<KeyStroke> KEY_VIEW_INTERACTIONS_CLASSPATH =
 813    new VectorOption<KeyStroke>("key.view.interactions.classpath", new KeyStrokeOption("",null), to.vector());
 814   
 815    /** The key binding for printing the interactions. */
 816    public static final VectorOption<KeyStroke> KEY_PRINT_INTERACTIONS =
 817    new VectorOption<KeyStroke>("key.view.print.interactions", new KeyStrokeOption("",null), to.vector());
 818   
 819    /** The key binding for lifting the current interaction to definitions. */
 820    public static final VectorOption<KeyStroke> KEY_LIFT_CURRENT_INTERACTION =
 821    new VectorOption<KeyStroke>("key.lift.current.interaction", new KeyStrokeOption("",null), to.vector());
 822   
 823    // /** The key binding to enter or leave multiline input mode. */
 824    // public static final VectorOption<KeyStroke> KEY_TOGGLE_MULTILINE_INTERACTION =
 825    // new VectorOption<KeyStroke>("key.toggle.multiline.interaction",
 826    // new KeyStrokeOption("",null),
 827    // to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_M, MASK)));
 828   
 829    /** The key binding for saving the console copy to a file. */
 830    public static final VectorOption<KeyStroke> KEY_SAVE_CONSOLE_COPY =
 831    new VectorOption<KeyStroke>("key.save.console.copy", new KeyStrokeOption("",null), to.vector());
 832   
 833    /** The key binding for clearing the console. */
 834    public static final VectorOption<KeyStroke> KEY_CLEAR_CONSOLE =
 835    new VectorOption<KeyStroke>("key.clear.console", new KeyStrokeOption("",null), to.vector());
 836   
 837    /** The key binding for printing the console. */
 838    public static final VectorOption<KeyStroke> KEY_PRINT_CONSOLE =
 839    new VectorOption<KeyStroke>("key.view.print.console", new KeyStrokeOption("",null), to.vector());
 840   
 841    /** The key binding for moving the cursor backwards */
 842    public static final VectorOption<KeyStroke> KEY_BACKWARD =
 843    new VectorOption<KeyStroke>("key.backward",
 844    new KeyStrokeOption("",null),
 845    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0)));
 846   
 847    /** The key binding for moving the cursor backwards with selection */
 848    public static final VectorOption<KeyStroke> KEY_BACKWARD_SELECT =
 849    new VectorOption<KeyStroke>("key.backward.select",
 850    new KeyStrokeOption("",null),
 851    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, SHIFT_MASK)));
 852   
 853    /** The key binding for moving the cursor to the beginning of the document
 854    */
 855    public static final VectorOption<KeyStroke> KEY_BEGIN_DOCUMENT =
 856    new VectorOption<KeyStroke>("key.begin.document",
 857    new KeyStrokeOption("",null),
 858    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, MASK)));
 859   
 860    /** The key binding for moving the cursor to the beginning of the document */
 861    public static final VectorOption<KeyStroke> KEY_BEGIN_DOCUMENT_SELECT =
 862    new VectorOption<KeyStroke>("key.begin.document.select",
 863    new KeyStrokeOption("",null),
 864    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, SHIFT_MASK|MASK)));
 865   
 866    /** The key binding for moving the cursor to the beginning of the current line. */
 867    public static final VectorOption<KeyStroke> KEY_BEGIN_LINE =
 868    new VectorOption<KeyStroke>("key.begin.line",
 869    new KeyStrokeOption("",null),
 870    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0)));
 871   
 872    /** The key binding for moving the cursor to the beginning of the current line. */
 873    public static final VectorOption<KeyStroke> KEY_BEGIN_LINE_SELECT =
 874    new VectorOption<KeyStroke>("key.begin.line.select",
 875    new KeyStrokeOption("",null),
 876    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, SHIFT_MASK)));
 877   
 878    // /** The key binding for moving the cursor to the beginning of the current paragraph.
 879    // * (Doesn't seem to do anything useful...)
 880    // */
 881    // public static final VectorOption<KeyStroke> KEY_BEGIN_PARAGRAPH =
 882    // new VectorOption<KeyStroke>("key.begin.paragraph", new KeyStrokeOption("",null), to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_UP, MASK)));
 883   
 884    /** The key binding for moving the cursor to the beginning of the previous word. */
 885    public static final VectorOption<KeyStroke> KEY_PREVIOUS_WORD =
 886    new VectorOption<KeyStroke>("key.previous.word",
 887    new KeyStrokeOption("",null),
 888    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, MASK)));
 889   
 890    /** The key binding for moving the cursor to the beginning of the previous word. */
 891    public static final VectorOption<KeyStroke> KEY_PREVIOUS_WORD_SELECT =
 892    new VectorOption<KeyStroke>("key.previous.word.select",
 893    new KeyStrokeOption("",null),
 894    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, SHIFT_MASK|MASK)));
 895   
 896    /** The key binding for deleting the next character. */
 897    public static final VectorOption<KeyStroke> KEY_DELETE_NEXT =
 898    new VectorOption<KeyStroke>("key.delete.next",
 899    new KeyStrokeOption("",null),
 900    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)));
 901   
 902    /** The key binding for deleting the previous character (with shift set). */
 903    public static final VectorOption<KeyStroke> KEY_DELETE_PREVIOUS =
 904    new VectorOption<KeyStroke>("key.delete.previous",
 905    new KeyStrokeOption("",null),
 906    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0)));
 907   
 908    /** The key binding for deleting the next character (with shift set). */
 909    public static final VectorOption<KeyStroke> KEY_SHIFT_DELETE_NEXT =
 910    new VectorOption<KeyStroke>("key.delete.next",
 911    new KeyStrokeOption("",null),
 912    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, SHIFT_MASK)));
 913   
 914    /** The key binding for deleting the previous character (with shift set). */
 915    public static final VectorOption<KeyStroke> KEY_SHIFT_DELETE_PREVIOUS =
 916    new VectorOption<KeyStroke>("key.delete.previous",
 917    new KeyStrokeOption("",null),
 918    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, SHIFT_MASK)));
 919   
 920    /** The key binding for moving the cursor down. */
 921    public static final VectorOption<KeyStroke> KEY_DOWN =
 922    new VectorOption<KeyStroke>("key.down",
 923    new KeyStrokeOption("",null),
 924    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0)));
 925   
 926    /** The key binding for moving the cursor down. */
 927    public static final VectorOption<KeyStroke> KEY_DOWN_SELECT =
 928    new VectorOption<KeyStroke>("key.down.select",
 929    new KeyStrokeOption("",null),
 930    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, SHIFT_MASK)));
 931   
 932    /** The key binding for moving the cursor up. */
 933    public static final VectorOption<KeyStroke> KEY_UP =
 934    new VectorOption<KeyStroke>("key.up",
 935    new KeyStrokeOption("",null),
 936    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0)));
 937   
 938    /** The key binding for moving the cursor up. */
 939    public static final VectorOption<KeyStroke> KEY_UP_SELECT =
 940    new VectorOption<KeyStroke>("key.up.select",
 941    new KeyStrokeOption("",null),
 942    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_UP, SHIFT_MASK)));
 943   
 944    /** The key binding for moving the cursor to the end of the document. */
 945    public static final VectorOption<KeyStroke> KEY_END_DOCUMENT =
 946    new VectorOption<KeyStroke>("key.end.document",
 947    new KeyStrokeOption("",null),
 948    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_END, MASK)));
 949   
 950    /** The key binding for moving the cursor to the end of the document. */
 951    public static final VectorOption<KeyStroke> KEY_END_DOCUMENT_SELECT =
 952    new VectorOption<KeyStroke>("key.end.document.select",
 953    new KeyStrokeOption("",null),
 954    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_END, SHIFT_MASK|MASK)));
 955   
 956    /** The key binding for moving the cursor to the end of the current line. */
 957    public static final VectorOption<KeyStroke> KEY_END_LINE =
 958    new VectorOption<KeyStroke>("key.end.line",
 959    new KeyStrokeOption("",null),
 960    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_END, 0)));
 961   
 962    /** The key binding for moving the cursor to the end of the current line. */
 963    public static final VectorOption<KeyStroke> KEY_END_LINE_SELECT =
 964    new VectorOption<KeyStroke>("key.end.line.select",
 965    new KeyStrokeOption("",null),
 966    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_END, SHIFT_MASK)));
 967   
 968    // /** The key binding for moving the cursor to the end of the current paragraph. */
 969    // public static final VectorOption<KeyStroke> KEY_END_PARAGRAPH =
 970    // new VectorOption<KeyStroke>("key.end.paragraph",
 971    // new KeyStrokeOption("",null),
 972    // to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, MASK)));
 973   
 974    /** The key binding for moving the cursor to the beginning of the next word. */
 975    public static final VectorOption<KeyStroke> KEY_NEXT_WORD =
 976    new VectorOption<KeyStroke>("key.next.word",
 977    new KeyStrokeOption("",null),
 978    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, MASK)));
 979   
 980    /** The key binding for moving the cursor to the beginning of the next word. */
 981    public static final VectorOption<KeyStroke> KEY_NEXT_WORD_SELECT =
 982    new VectorOption<KeyStroke>("key.next.word.select",
 983    new KeyStrokeOption("",null),
 984    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, SHIFT_MASK|MASK)));
 985   
 986    /** The key binding for moving the cursor forwards. */
 987    public static final VectorOption<KeyStroke> KEY_FORWARD =
 988    new VectorOption<KeyStroke>("key.forward",
 989    new KeyStrokeOption("",null),
 990    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0)));
 991   
 992    /** The key binding for moving the cursor forwards. */
 993    public static final VectorOption<KeyStroke> KEY_FORWARD_SELECT =
 994    new VectorOption<KeyStroke>("key.forward.select",
 995    new KeyStrokeOption("",null),
 996    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, SHIFT_MASK)));
 997   
 998    /** The key binding for page down. */
 999    public static final VectorOption<KeyStroke> KEY_PAGE_DOWN =
 1000    new VectorOption<KeyStroke>("key.page.down",
 1001    new KeyStrokeOption("",null),
 1002    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0)));
 1003   
 1004    /** The key binding for page up. */
 1005    public static final VectorOption<KeyStroke> KEY_PAGE_UP =
 1006    new VectorOption<KeyStroke>("key.page.up",
 1007    new KeyStrokeOption("",null),
 1008    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0)));
 1009   
 1010    // public static final VectorOption<KeyStroke> KEY_NEXT_RECENT_DOCUMENT = // Key code for '`'
 1011    // new VectorOption<KeyStroke>("key.next.recent.document",
 1012    // new KeyStrokeOption("",null),
 1013    // to.vector(KeyStroke.getKeyStroke(KeyEvent.BACK_QUOTE, CTRL_MASK)));
 1014   
 1015    // public static final VectorOption<KeyStroke> KEY_PREV_RECENT_DOCUMENT = // Key code for '~'
 1016    // new VectorOption<KeyStroke>("key.prev.recent.document",
 1017    // new KeyStrokeOption("",null),
 1018    // to.vector(KeyStroke.getKeyStroke(KeyEvent.BACK_QUOTE, SHIFT_MASK | CTRL_MASK)));
 1019   
 1020    /** The key binding for cutting a line. */
 1021    public static final VectorOption<KeyStroke> KEY_CUT_LINE =
 1022    new VectorOption<KeyStroke>("key.cut.line",
 1023    new KeyStrokeOption("",null),
 1024    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_K, MASK|ALT_MASK)));
 1025   
 1026    /** The key binding for clearing a line, emacs-style. */
 1027    public static final VectorOption<KeyStroke> KEY_CLEAR_LINE =
 1028    new VectorOption<KeyStroke>("key.clear.line",
 1029    new KeyStrokeOption("",null),
 1030    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_K, MASK)));
 1031   
 1032    /** The key binding for toggling debug mode. */
 1033    public static final VectorOption<KeyStroke> KEY_DEBUG_MODE_TOGGLE =
 1034    new VectorOption<KeyStroke>("key.debug.mode.toggle",
 1035    new KeyStrokeOption("",null),
 1036    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_D, MASK | SHIFT_MASK)));
 1037   
 1038    // /** The key binding for suspending the debugger. */
 1039    // public static final VectorOption<KeyStroke> KEY_DEBUG_SUSPEND =
 1040    // new VectorOption<KeyStroke>("key.debug.suspend",
 1041    // new KeyStrokeOption("",null),
 1042    // to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)));
 1043   
 1044    /** The key binding for resuming the debugger. */
 1045    public static final VectorOption<KeyStroke> KEY_DEBUG_RESUME =
 1046    new VectorOption<KeyStroke>("key.debug.resume",
 1047    new KeyStrokeOption("",null),
 1048    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0)));
 1049   
 1050    /** The key binding for automatically tracing through each line of a program*/
 1051    public static final VectorOption<KeyStroke> KEY_DEBUG_AUTOMATIC_TRACE =
 1052    new VectorOption<KeyStroke>("key.debug.automatic.trace",
 1053    new KeyStrokeOption("",null),
 1054    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0)));
 1055   
 1056    /** The key binding for stepping into in the debugger */
 1057    public static final VectorOption<KeyStroke> KEY_DEBUG_STEP_INTO =
 1058    new VectorOption<KeyStroke>("key.debug.step.into",
 1059    new KeyStrokeOption("",null),
 1060    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0)));
 1061   
 1062    /** The key binding for stepping over in the debugger. */
 1063    public static final VectorOption<KeyStroke> KEY_DEBUG_STEP_OVER =
 1064    new VectorOption<KeyStroke>("key.debug.step.over",
 1065    new KeyStrokeOption("",null),
 1066    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0)));
 1067   
 1068    /** The key binding for stepping out in the debugger. */
 1069    public static final VectorOption<KeyStroke> KEY_DEBUG_STEP_OUT =
 1070    new VectorOption<KeyStroke>("key.debug.step.out",
 1071    new KeyStrokeOption("",null),
 1072    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F12, SHIFT_MASK)));
 1073   
 1074    /** The key binding for toggling a breakpoint. */
 1075    public static final VectorOption<KeyStroke> KEY_DEBUG_BREAKPOINT_TOGGLE =
 1076    new VectorOption<KeyStroke>("key.debug.breakpoint.toggle",
 1077    new KeyStrokeOption("",null),
 1078    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_B, MASK)));
 1079   
 1080    /** The key binding for displaying the breakpoints panel. */
 1081    public static final VectorOption<KeyStroke> KEY_DEBUG_BREAKPOINT_PANEL =
 1082    new VectorOption<KeyStroke>("key.debug.breakpoint.panel",
 1083    new KeyStrokeOption("",null),
 1084    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_B, MASK | SHIFT_MASK)));
 1085   
 1086    /** The key binding for clearing all breakpoints. */
 1087    public static final VectorOption<KeyStroke> KEY_DEBUG_CLEAR_ALL_BREAKPOINTS =
 1088    new VectorOption<KeyStroke>("key.debug.clear.all.breakpoints",
 1089    new KeyStrokeOption("",null),
 1090    to.vector());
 1091   
 1092    /** The key binding for toggling a bookmark. */
 1093    public static final VectorOption<KeyStroke> KEY_BOOKMARKS_TOGGLE =
 1094    new VectorOption<KeyStroke>("key.bookmarks.toggle",
 1095    new KeyStrokeOption("",null),
 1096    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_M, MASK)));
 1097   
 1098    /** The key binding for displaying the bookmarks panel. */
 1099    public static final VectorOption<KeyStroke> KEY_BOOKMARKS_PANEL =
 1100    new VectorOption<KeyStroke>("key.bookmarks.panel",
 1101    new KeyStrokeOption("",null),
 1102    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_M, MASK | SHIFT_MASK)));
 1103   
 1104    /** The key binding for help. */
 1105    public static final VectorOption<KeyStroke> KEY_HELP =
 1106    new VectorOption<KeyStroke>("key.help",
 1107    new KeyStrokeOption("",null),
 1108    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)));
 1109   
 1110    /** The key binding for quickstart. Currently set to the null keystroke. */
 1111    public static final VectorOption<KeyStroke> KEY_QUICKSTART =
 1112    new VectorOption<KeyStroke>("key.quickstart", new KeyStrokeOption("",null), to.vector());
 1113   
 1114    /** The key binding for the about dialog */
 1115    public static final VectorOption<KeyStroke> KEY_ABOUT =
 1116    new VectorOption<KeyStroke>("key.about", new KeyStrokeOption("",null), to.vector());
 1117   
 1118    /** The key binding for the check new version dialog */
 1119    public static final VectorOption<KeyStroke> KEY_CHECK_NEW_VERSION =
 1120    new VectorOption<KeyStroke>("key.check.new.version", new KeyStrokeOption("",null), to.vector());
 1121   
 1122    /** The key binding for the DrJava survey dialog */
 1123    public static final VectorOption<KeyStroke> KEY_DRJAVA_SURVEY =
 1124    new VectorOption<KeyStroke>("key.drjava.survey", new KeyStrokeOption("",null), to.vector());
 1125   
 1126    /** The key binding for the "DrJava Errors" dialog */
 1127    public static final VectorOption<KeyStroke> KEY_DRJAVA_ERRORS =
 1128    new VectorOption<KeyStroke>("key.drjava.errors", new KeyStrokeOption("",null), to.vector());
 1129   
 1130    /** The key binding for following a file, like using "less" and F. */
 1131    public static final VectorOption<KeyStroke> KEY_FOLLOW_FILE =
 1132    new VectorOption<KeyStroke>("key.follow.file",
 1133    new KeyStrokeOption("",null),
 1134    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_L, MASK | SHIFT_MASK)));
 1135   
 1136    /** The key binding for executing an external process. */
 1137    public static final VectorOption<KeyStroke> KEY_EXEC_PROCESS =
 1138    new VectorOption<KeyStroke>("key.exec.process",
 1139    new KeyStrokeOption("",null),
 1140    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_X, MASK | SHIFT_MASK)));
 1141   
 1142    /** The key binding to detach/re-attach the tabbed panes. */
 1143    public static final VectorOption<KeyStroke> KEY_DETACH_TABBEDPANES =
 1144    new VectorOption<KeyStroke>("key.detach.tabbedpanes", new KeyStrokeOption("",null), to.vector());
 1145   
 1146    /** The key binding to detach/re-attach the debugger panel. */
 1147    public static final VectorOption<KeyStroke> KEY_DETACH_DEBUGGER =
 1148    new VectorOption<KeyStroke>("key.detach.debugger", new KeyStrokeOption("",null), to.vector());
 1149   
 1150    /** The key binging to close stream input in the ineractions panel. Ctrl-D on all systems.
 1151    * In the console on DOS/Windows, this was typically Ctrl-Z, but Ctrl-Z is now the
 1152    * default for Undo, even on Windows. */
 1153    public static final VectorOption<KeyStroke> KEY_CLOSE_SYSTEM_IN =
 1154    new VectorOption<KeyStroke>("key.close.system.in",
 1155    new KeyStrokeOption("",null),
 1156    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_D, CTRL_MASK)));
 1157   
 1158    /** Keystroke option for KeyStrokeOptionComponentTest. */
 1159    public static final KeyStrokeOption KEY_FOR_UNIT_TESTS_ONLY =
 1160    new KeyStrokeOption("key.for.unit.tests.only", KeyStroke.getKeyStroke(KeyEvent.VK_N, CTRL_MASK|SHIFT_MASK|MASK));
 1161   
 1162    /** The key binding for the GenerateCustomDrJavaJarFrame. */
 1163    public static final VectorOption<KeyStroke> KEY_GENERATE_CUSTOM_DRJAVA =
 1164    new VectorOption<KeyStroke>("key.generate.custom.drjava", new KeyStrokeOption("",null), to.vector());
 1165   
 1166    /** The key binding for starting a new, blank DrJava instance. */
 1167    public static final VectorOption<KeyStroke> KEY_NEW_DRJAVA_INSTANCE=
 1168    new VectorOption<KeyStroke>("key.new.drjava.instance", new KeyStrokeOption("",null),
 1169    to.vector(KeyStroke.getKeyStroke(KeyEvent.VK_F1, CTRL_MASK|SHIFT_MASK)));
 1170   
 1171    /* ---------- Find Replace Options ---------- */
 1172   
 1173    public static final BooleanOption FIND_MATCH_CASE =
 1174    new BooleanOption("find.replace.match.case", Boolean.TRUE);
 1175   
 1176    public static final BooleanOption FIND_SEARCH_BACKWARDS =
 1177    new BooleanOption("find.replace.search.backwards", Boolean.FALSE);
 1178   
 1179    public static final BooleanOption FIND_WHOLE_WORD =
 1180    new BooleanOption("find.replace.whole.word", Boolean.FALSE);
 1181   
 1182    public static final BooleanOption FIND_ALL_DOCUMENTS =
 1183    new BooleanOption("find.replace.all.documents", Boolean.FALSE);
 1184   
 1185    public static final BooleanOption FIND_ONLY_SELECTION =
 1186    new BooleanOption("find.replace.only.selection", Boolean.FALSE);
 1187   
 1188    public static final BooleanOption FIND_NO_COMMENTS_STRINGS =
 1189    new BooleanOption("find.replace.no.comments.strings", Boolean.FALSE);
 1190   
 1191    public static final BooleanOption FIND_NO_TEST_CASES =
 1192    new BooleanOption("find.replace.no.test.cases", Boolean.FALSE);
 1193   
 1194    /* ---------- Debugger Options ---------- */
 1195   
 1196    /** A classpath-structured vector of all paths to look for source files on while stepping in the debugger. */
 1197    public static final VectorOption<File> DEBUG_SOURCEPATH =
 1198    new ClassPathOption().evaluate("debug.sourcepath");
 1199   
 1200    /** Whether stepping should step through Java's source files. */
 1201    public static final BooleanOption DEBUG_STEP_JAVA = new BooleanOption("debug.step.java", Boolean.FALSE);
 1202   
 1203    /** Whether stepping should step through Dynamic Java's source files. */
 1204    public static final BooleanOption DEBUG_STEP_INTERPRETER =
 1205    new BooleanOption("debug.step.interpreter", Boolean.FALSE);
 1206   
 1207    /** Whether stepping should step through DrJava's source files. */
 1208    public static final BooleanOption DEBUG_STEP_DRJAVA =
 1209    new BooleanOption("debug.step.drjava", Boolean.FALSE);
 1210   
 1211    /** Which packages to exclude when stepping. */
 1212    public static final VectorOption<String> DEBUG_STEP_EXCLUDE =
 1213    new VectorOption<String>("debug.step.exclude", new StringOption("",null), new Vector<String>());
 1214   
 1215    /** Whether we want to automatically import packages after breakpoints or steps. */
 1216    public static final BooleanOption DEBUG_AUTO_IMPORT =
 1217    new BooleanOption("debug.auto.import", Boolean.TRUE);
 1218   
 1219    /** Whether we want to allow expressions and method calls in watches. */
 1220    public static final BooleanOption DEBUG_EXPRESSIONS_AND_METHODS_IN_WATCHES =
 1221    new BooleanOption("debug.expressions.and.methods.in.watches", Boolean.FALSE);
 1222   
 1223   
 1224    /* ---------- Javadoc Options ---------- */
 1225   
 1226    /** Possible options for Javadoc access levels. */
 1227    static final ArrayList<String> accessLevelChoices =
 1228    AccessLevelChoices.evaluate();
 1229    public static class AccessLevelChoices {
 1230    public static final String PUBLIC = "public";
 1231    public static final String PROTECTED = "protected";
 1232    public static final String PACKAGE = "package";
 1233    public static final String PRIVATE = "private";
 1234  117 public static ArrayList<String> evaluate() {
 1235  117 ArrayList<String> aList = new ArrayList<String>(4);
 1236  117 aList.add(PUBLIC);
 1237  117 aList.add(PROTECTED);
 1238  117 aList.add(PACKAGE);
 1239  117 aList.add(PRIVATE);
 1240  117 return aList;
 1241    }
 1242    }
 1243   
 1244    /** The lowest access level of classes and members to include in the javadoc. */
 1245    public static final ForcedChoiceOption JAVADOC_ACCESS_LEVEL =
 1246    new ForcedChoiceOption("javadoc.access.level", AccessLevelChoices.PACKAGE, accessLevelChoices);
 1247   
 1248    /** Possible options for Javadoc system class documentation links. */
 1249    static final String JAVADOC_NONE_TEXT = "none";
 1250    static final String JAVADOC_1_3_TEXT = "1.3";
 1251    static final String JAVADOC_1_4_TEXT = "1.4";
 1252    static final String JAVADOC_1_5_TEXT = "1.5";
 1253    static final String JAVADOC_1_6_TEXT = "1.6";
 1254    static final String JAVADOC_1_7_TEXT = "1.7";
 1255    static final String JAVADOC_AUTO_TEXT = "use compiler version"; // for "Open Java API Javadoc"
 1256   
 1257    static final String[] linkChoices = new String[]{
 1258    JAVADOC_NONE_TEXT, JAVADOC_1_5_TEXT, JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT };
 1259    static final ArrayList<String> linkVersionChoices = new ArrayList<String>(Arrays.asList(linkChoices));
 1260   
 1261    static final String[] linkDeprecated = new String[]{
 1262    JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT };
 1263    static final ArrayList<String> linkVersionDeprecated = new ArrayList<String>(Arrays.asList(linkDeprecated));
 1264   
 1265    /** Constants for the URLs of Sun's system class documentation for different versions of Java. */
 1266    public static final StringOption JAVADOC_1_3_LINK =
 1267    new StringOption("javadoc.1.3.link", "http://download.oracle.com/javase/1.3/docs/api");
 1268    public static final StringOption JAVADOC_1_4_LINK =
 1269    new StringOption("javadoc.1.4.link", "http://download.oracle.com/javase/1.4.2/docs/api");
 1270    public static final StringOption JAVADOC_1_5_LINK =
 1271    new StringOption("javadoc.1.5.link", "http://download.oracle.com/javase/1.5.0/docs/api");
 1272    public static final StringOption JAVADOC_1_6_LINK =
 1273    new StringOption("javadoc.1.6.link", "http://download.oracle.com/javase/6/docs/api");
 1274    public static final StringOption JAVADOC_1_7_LINK =
 1275    new StringOption("javadoc.1.7.link", "http://download.oracle.com/javase/7/docs/api/");
 1276   
 1277    /** The version of Java to use for links to Javadoc for system classes. */
 1278    public static final ForcedChoiceOption JAVADOC_LINK_VERSION =
 1279    new ForcedChoiceOption("javadoc.link.version",
 1280  117 (System.getProperty("java.specification.version").startsWith("1.5") ? JAVADOC_1_5_TEXT :
 1281  117 (System.getProperty("java.specification.version").startsWith("1.6") ? JAVADOC_1_6_TEXT :
 1282    JAVADOC_1_7_TEXT)),
 1283    linkVersionChoices, linkVersionDeprecated);
 1284   
 1285    static final String[] apiJavadocChoices = new String[] {
 1286    JAVADOC_1_5_TEXT, JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT, JAVADOC_AUTO_TEXT};
 1287    static final ArrayList<String> apiJavadocVersionChoices = new ArrayList<String>(Arrays.asList(apiJavadocChoices));
 1288   
 1289    static final String[] apiJavadocDeprecated = new String[] {
 1290    JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT}; // deprecated, will be changed to JAVADOC_AUTO_TEXT
 1291    static final ArrayList<String> apiJavadocVersionDeprecated = new ArrayList<String>(Arrays.asList(apiJavadocDeprecated));
 1292   
 1293    /** The version of Java to use for the "Open Java API Javadoc" feature. */
 1294    public static final ForcedChoiceOption JAVADOC_API_REF_VERSION =
 1295    new ForcedChoiceOption("javadoc.api.ref.version", JAVADOC_AUTO_TEXT,
 1296    apiJavadocVersionChoices, apiJavadocVersionDeprecated);
 1297   
 1298    /** URL for JUnit javadocs. */
 1299    public static final StringOption JUNIT_LINK =
 1300    new StringOption("junit.link", "http://www.cs.rice.edu/~javaplt/javadoc/concjunit4.7");
 1301   
 1302    /** Additional Javadoc URLs. */
 1303    public static final VectorOption<String> JAVADOC_ADDITIONAL_LINKS =
 1304    new VectorOption<String>("javadoc.additional.links", new StringOption("",null), new Vector<String>());
 1305   
 1306    /** Whether to include the entire package heirarchy from the source roots when generating JavaDoc output. */
 1307    public static final BooleanOption JAVADOC_FROM_ROOTS = new BooleanOption("javadoc.from.roots", Boolean.FALSE);
 1308   
 1309    /** A string containing custom options to be passed to Javadoc. This string needs to be tokenized before passing it to
 1310    * Javadoc.
 1311    */
 1312    public static final StringOption JAVADOC_CUSTOM_PARAMS =
 1313    new StringOption("javadoc.custom.params", "-author -version");
 1314   
 1315    /** The default destination directory for Javadoc output. */
 1316    public static final FileOption JAVADOC_DESTINATION = new FileOption("javadoc.destination", FileOps.NULL_FILE);
 1317   
 1318    /** Whether to always prompt for a destination directory, whether or not a default has been set. */
 1319    public static final BooleanOption JAVADOC_PROMPT_FOR_DESTINATION =
 1320    new BooleanOption("javadoc.prompt.for.destination", Boolean.TRUE);
 1321   
 1322    /* ---------- NOTIFICATION OPTIONS ---------- */
 1323   
 1324    /** Whether to prompt when the interactions pane is unexpectedly reset. */
 1325    public static final BooleanOption INTERACTIONS_EXIT_PROMPT =
 1326    new BooleanOption("interactions.exit.prompt", Boolean.TRUE);
 1327   
 1328    /** Whether to prompt before quitting DrJava. */
 1329    public static final BooleanOption QUIT_PROMPT = new BooleanOption("quit.prompt", Boolean.TRUE);
 1330   
 1331    /** Whether to prompt before resetting the interactions pane. */
 1332    public static final BooleanOption INTERACTIONS_RESET_PROMPT =
 1333    new BooleanOption("interactions.reset.prompt", Boolean.TRUE);
 1334   
 1335    /** Whether to prompt to save before compiling. */
 1336    public static final BooleanOption ALWAYS_SAVE_BEFORE_COMPILE =
 1337    new BooleanOption("save.before.compile", Boolean.FALSE);
 1338   
 1339    /** Whether to prompt to save before running. */
 1340    public static final BooleanOption ALWAYS_SAVE_BEFORE_RUN =
 1341    new BooleanOption("save.before.run", Boolean.FALSE);
 1342   
 1343    /** Whether to prompt to save before testing. */
 1344    public static final BooleanOption ALWAYS_COMPILE_BEFORE_JUNIT =
 1345    new BooleanOption("compile.before.junit", Boolean.FALSE);
 1346   
 1347    /** Whether to prompt to save before compiling. */
 1348    public static final BooleanOption ALWAYS_SAVE_BEFORE_JAVADOC =
 1349    new BooleanOption("save.before.javadoc", Boolean.FALSE);
 1350   
 1351    /** Whether to prompt to compile before compiling. */
 1352    public static final BooleanOption ALWAYS_COMPILE_BEFORE_JAVADOC =
 1353    new BooleanOption("compile.before.javadoc", Boolean.FALSE);
 1354   
 1355    /** Whether to prompt to save before compiling. */
 1356    public static final BooleanOption ALWAYS_SAVE_BEFORE_DEBUG =
 1357    new BooleanOption("save.before.debug", Boolean.FALSE);
 1358   
 1359    /** Whether to warn if a document has been modified before allowing the user to set a breakpoint in it. */
 1360    public static final BooleanOption WARN_BREAKPOINT_OUT_OF_SYNC =
 1361    new BooleanOption("warn.breakpoint.out.of.sync", Boolean.TRUE);
 1362   
 1363    /** Whether to warn that the user is debugging a file that is out of sync with its class file. */
 1364    public static final BooleanOption WARN_DEBUG_MODIFIED_FILE =
 1365    new BooleanOption("warn.debug.modified.file", Boolean.TRUE);
 1366   
 1367    /** Whether to warn that a restart is necessary before the look and feel will change. */
 1368    public static final BooleanOption WARN_CHANGE_LAF = new BooleanOption("warn.change.laf", Boolean.TRUE);
 1369   
 1370    /** Whether to warn that a restart is necessary before the theme will change. */
 1371    public static final BooleanOption WARN_CHANGE_THEME = new BooleanOption("warn.change.theme", Boolean.TRUE);
 1372   
 1373    /** Whether to warn that a restart is necessary before these miscellaneous preferences will change. */
 1374    public static final BooleanOption WARN_CHANGE_MISC = new BooleanOption("warn.change.misc", Boolean.TRUE);
 1375   
 1376    /** Whether to warn that a reset is necessary before these Interactions Pane preferences will change. */
 1377    public static final BooleanOption WARN_CHANGE_INTERACTIONS = new BooleanOption("warn.change.interactions", Boolean.TRUE);
 1378   
 1379    /** Whether to warn that a file's path contains a "#' symbol. */
 1380    public static final BooleanOption WARN_PATH_CONTAINS_POUND =
 1381    new BooleanOption("warn.path.contains.pound", Boolean.TRUE);
 1382   
 1383    /** Whether to warn that a restart is necessary before the default compiler preference will change. */
 1384    public static final BooleanOption WARN_CHANGE_DCP = new BooleanOption("warn.change.dcp", Boolean.TRUE);
 1385   
 1386    /** Whether to prompt to change the language level extensions (.dj0/.dj1->.dj, .dj2->.java). */
 1387    public static final BooleanOption PROMPT_RENAME_LL_FILES = new BooleanOption("prompt.rename.ll.files", Boolean.TRUE);
 1388   
 1389    /* ---------- MISC OPTIONS ---------- */
 1390   
 1391    /** Whether to warn when cleaning the build directory */
 1392    public static final BooleanOption PROMPT_BEFORE_CLEAN = new BooleanOption("prompt.before.clean", Boolean.TRUE);
 1393   
 1394    /** Open directory should default to recursive */
 1395    public static final BooleanOption OPEN_FOLDER_RECURSIVE = new BooleanOption("open.folder.recursive", Boolean.FALSE);
 1396   
 1397    /** How many spaces to use for indenting. */
 1398    public static final NonNegativeIntegerOption INDENT_LEVEL =
 1399    new NonNegativeIntegerOption("indent.level", Integer.valueOf(2));
 1400   
 1401    /** Number of lines to remember in the Interactions History */
 1402    public static final NonNegativeIntegerOption HISTORY_MAX_SIZE =
 1403    new NonNegativeIntegerOption("history.max.size", Integer.valueOf(500));
 1404   
 1405    /** Number of files to list in the recent file list */
 1406    public static final NonNegativeIntegerOption RECENT_FILES_MAX_SIZE =
 1407    new NonNegativeIntegerOption("recent.files.max.size", Integer.valueOf(5));
 1408   
 1409    /** Whether to automatically close comments. */
 1410    public static final BooleanOption AUTO_CLOSE_COMMENTS = new BooleanOption("auto.close.comments", Boolean.FALSE);
 1411   
 1412    /** Whether to clear the console when manually resetting the interactions pane. */
 1413    public static final BooleanOption RESET_CLEAR_CONSOLE = new BooleanOption("reset.clear.console", Boolean.TRUE);
 1414   
 1415    /** Whether to run assert statements in the interactions pane. */
 1416    public static final BooleanOption RUN_WITH_ASSERT = new BooleanOption("run.with.assert", Boolean.TRUE);
 1417   
 1418    /** Whether the java command should automatically detect applets and acm.program.Program subclasses. */
 1419    public static final BooleanOption SMART_RUN_FOR_APPLETS_AND_PROGRAMS =
 1420    new BooleanOption("smart.run.for.applets.and.programs", Boolean.TRUE);
 1421   
 1422    /** Whether to make emacs-style backup files. */
 1423    public static final BooleanOption BACKUP_FILES = new BooleanOption("files.backup", Boolean.TRUE);
 1424   
 1425    /** Whether to allow users to access to all members in the Interactions Pane.
 1426    * This should not be used anymore. Instead, use DYNAMICJAVA_ACCESS_CONTROL. */
 1427    @Deprecated public static final BooleanOption ALLOW_PRIVATE_ACCESS = new BooleanOption("allow.private.access", Boolean.FALSE);
 1428   
 1429    /** Whether to force test classes in projects to end in "Test". */
 1430    public static final BooleanOption FORCE_TEST_SUFFIX = new BooleanOption("force.test.suffix", Boolean.FALSE);
 1431   
 1432    /** Whether remote control using sockets is enabled. */
 1433    public static final BooleanOption REMOTE_CONTROL_ENABLED = new BooleanOption("remote.control.enabled", Boolean.TRUE);
 1434   
 1435    /** The port where DrJava will listen for remote control requests. */
 1436    public static final IntegerOption REMOTE_CONTROL_PORT = new IntegerOption("remote.control.port", Integer.valueOf(4444));
 1437   
 1438    /** Whether to warn if Compiz is being used */
 1439    public static final BooleanOption WARN_IF_COMPIZ = new BooleanOption("warn.if.compiz", Boolean.TRUE);
 1440   
 1441    /* ---------- COMPILER OPTIONS ------------- */
 1442   
 1443    /** Whether to show unchecked warnings */
 1444    public static final BooleanOption SHOW_UNCHECKED_WARNINGS =
 1445    new BooleanOption("show.unchecked.warnings", Boolean.TRUE);
 1446   
 1447    /** Whether to show deprecation warnings */
 1448    public static final BooleanOption SHOW_DEPRECATION_WARNINGS =
 1449    new BooleanOption("show.deprecation.warnings", Boolean.TRUE);
 1450   
 1451    /** Whether to show finally warnings */
 1452    public static final BooleanOption SHOW_FINALLY_WARNINGS = new BooleanOption("show.finally.warnings", Boolean.FALSE);
 1453   
 1454    /** Whether to show serial warnings */
 1455    public static final BooleanOption SHOW_SERIAL_WARNINGS =
 1456    new BooleanOption("show.serial.warnings", Boolean.FALSE);
 1457   
 1458    /** Whether to show serial warnings */
 1459    public static final BooleanOption SHOW_FALLTHROUGH_WARNINGS =
 1460    new BooleanOption("show.fallthrough.warnings", Boolean.FALSE);
 1461   
 1462    /** Whether to show serial warnings */
 1463    public static final BooleanOption SHOW_PATH_WARNINGS =
 1464    new BooleanOption("show.path.warnings", Boolean.FALSE);
 1465   
 1466    /**
 1467    * Default compiler to use
 1468    * Stores the name of the compiler to use, set by changing the selection in
 1469    * the ForcedChoiceOption created by COMPILER_PREFERENCE_CONTROL.evaluate()
 1470    */
 1471    public static final StringOption DEFAULT_COMPILER_PREFERENCE =
 1472    new StringOption("default.compiler.preference", COMPILER_PREFERENCE_CONTROL.NO_PREFERENCE);
 1473   
 1474    /**
 1475    * Class that is used to dynamically populate the ForcedChoiceOption.
 1476    * setList method is used by DefaultCompilerModel to set the available
 1477    * compilers that it has
 1478    * Must store the selected name into DEFAULT_COMPILER_PREFERENCE to save the setting
 1479    */
 1480    public static final class COMPILER_PREFERENCE_CONTROL {
 1481    public static final String NO_PREFERENCE = "No Preference";
 1482    public static ArrayList<String> _list = new ArrayList<String>();
 1483   
 1484  157 public static void setList(ArrayList<String> list) { _list = list; }
 1485  44 public static ForcedChoiceOption evaluate() {
 1486  44 if (!_list.contains(NO_PREFERENCE)) {
 1487  38 _list.add(NO_PREFERENCE);
 1488    }
 1489   
 1490  44 ForcedChoiceOption fco;
 1491  44 String defaultC = edu.rice.cs.drjava.DrJava.getConfig().getSetting(DEFAULT_COMPILER_PREFERENCE);
 1492   
 1493  44 if (_list.contains(defaultC)) {
 1494  44 fco = new ForcedChoiceOption("compiler.preference.control", defaultC, _list);
 1495    }
 1496    else {
 1497  0 fco = new ForcedChoiceOption("compiler.preference.control", NO_PREFERENCE, _list);
 1498  0 edu.rice.cs.drjava.DrJava.getConfig().setSetting(DEFAULT_COMPILER_PREFERENCE,NO_PREFERENCE);
 1499    }
 1500   
 1501  44 edu.rice.cs.drjava.DrJava.getConfig().setSetting(fco, edu.rice.cs.drjava.DrJava.getConfig().getSetting(DEFAULT_COMPILER_PREFERENCE));
 1502  44 return fco;
 1503    }
 1504    }
 1505   
 1506    /* ---------- UNDISPLAYED OPTIONS ---------- */
 1507   
 1508    /** The language level to use when starting DrJava. Stores the most recently used one. Defaults to full java. */
 1509    public static final IntegerOption LANGUAGE_LEVEL = new IntegerOption("language.level", Integer.valueOf(0));
 1510   
 1511    /** A vector containing the most recently used files. */
 1512    public static final VectorOption<File> RECENT_FILES =
 1513    new VectorOption<File>("recent.files",new FileOption("",null),new Vector<File>());
 1514   
 1515    /** A vector containing the most recently used projects. */
 1516    public static final VectorOption<File> RECENT_PROJECTS =
 1517    new VectorOption<File>("recent.projects",new FileOption("",null),new Vector<File>());
 1518   
 1519    /** Whether to enabled the Show Debug Console menu item in the Tools menu. */
 1520    public static final BooleanOption SHOW_DEBUG_CONSOLE = new BooleanOption("show.debug.console", Boolean.FALSE);
 1521   
 1522    /** Height of MainFrame at startUp. Can be overridden if out of bounds. */
 1523    public static final NonNegativeIntegerOption WINDOW_HEIGHT =
 1524    new NonNegativeIntegerOption("window.height", Integer.valueOf(700));
 1525   
 1526    /** Width of MainFrame at startUp. Can be overridden if out of bounds. */
 1527    public static final NonNegativeIntegerOption WINDOW_WIDTH =
 1528    new NonNegativeIntegerOption("window.width", Integer.valueOf(800));
 1529   
 1530    /** X position of MainFrame at startUp. Can be overridden if out of bounds. This value can legally be negative in a
 1531    * multi-screen setup.
 1532    */
 1533    public static final IntegerOption WINDOW_X = new IntegerOption("window.x", Integer.valueOf(Integer.MAX_VALUE));
 1534   
 1535    /** Y position of MainFrame at startUp. Can be overridden if out of bounds. This value can legally be negative in a
 1536    * multi-screen setup.
 1537    */
 1538    public static final IntegerOption WINDOW_Y = new IntegerOption("window.y", Integer.valueOf(Integer.MAX_VALUE));
 1539   
 1540    /** The window state (maxamized or normal). The current window state
 1541    * is saved on shutdown.
 1542    */
 1543    public static final IntegerOption WINDOW_STATE =
 1544    new IntegerOption("window.state", Integer.valueOf(Frame.NORMAL));
 1545   
 1546    /** Width of DocList at startUp. Must be less than WINDOW_WIDTH. Can be overridden if out of bounds. */
 1547    public static final NonNegativeIntegerOption DOC_LIST_WIDTH =
 1548    new NonNegativeIntegerOption("doc.list.width", Integer.valueOf(150));
 1549   
 1550    /** Height of tabbed panel at startUp. Must be less than WINDOW_HEIGHT + DEBUG_PANEL_HEIGHT. Can be overridden if
 1551    * out of bounds.
 1552    */
 1553    public static final NonNegativeIntegerOption TABS_HEIGHT =
 1554    new NonNegativeIntegerOption("tabs.height", Integer.valueOf(120));
 1555   
 1556    /** Height of debugger panel at startUp. Must be less than WINDOW_HEIGHT + TABS_HEIGHT. Can be overridden if out of
 1557    * bounds.
 1558    */
 1559    public static final NonNegativeIntegerOption DEBUG_PANEL_HEIGHT =
 1560    new NonNegativeIntegerOption("debug.panel.height", Integer.valueOf(0));
 1561   
 1562    /** The directory in use by the file choosers upon the previous quit. */
 1563    public static final FileOption LAST_DIRECTORY = new FileOption("last.dir", FileOps.NULL_FILE);
 1564   
 1565    /** The directory in use by the Interactions pane upon the previous quit. */
 1566    public static final FileOption LAST_INTERACTIONS_DIRECTORY = new FileOption("last.interactions.dir", FileOps.NULL_FILE);
 1567   
 1568    /** The directory for the Interactions pane to use (as long as there is no project working directory). */
 1569    public static final FileOption FIXED_INTERACTIONS_DIRECTORY = new FileOption("fixed.interactions.dir", FileOps.NULL_FILE);
 1570   
 1571    /** Whether to save and restore Interactions pane directory at startUp/shutdown (sticky=true), or to use
 1572    * "user.home" (sticky=false). */
 1573    public static final BooleanOption STICKY_INTERACTIONS_DIRECTORY =
 1574    new BooleanOption("sticky.interactions.dir", Boolean.TRUE);
 1575   
 1576    /** Whether to require a semicolon at the end of statements in the Interactions Pane. */
 1577    public static final BooleanOption DYNAMICJAVA_REQUIRE_SEMICOLON =
 1578    new BooleanOption("dynamicjava.require.semicolon", Boolean.FALSE);
 1579   
 1580    /** Whether to require a variable type for variable declarations in the Interactions Pane. */
 1581    public static final BooleanOption DYNAMICJAVA_REQUIRE_VARIABLE_TYPE =
 1582    new BooleanOption("dynamicjava.require.variable.type", Boolean.TRUE);
 1583   
 1584   
 1585    /** Dynamic Java access control. */
 1586    public static final ArrayList<String> DYNAMICJAVA_ACCESS_CONTROL_CHOICES =
 1587    DynamicJavaAccessControlChoices.evaluate();
 1588    public static class DynamicJavaAccessControlChoices {
 1589    public static final String DISABLED = "disabled";
 1590    public static final String PRIVATE = "private only";
 1591    public static final String PRIVATE_AND_PACKAGE = "private and package only";
 1592  117 public static ArrayList<String> evaluate() {
 1593  117 ArrayList<String> aList = new ArrayList<String>(4);
 1594  117 aList.add(DISABLED);
 1595  117 aList.add(PRIVATE);
 1596   
 1597    // NOTE: this sets the enforceAllAccess option in InteractionsPaneOptions, but since that is not fully
 1598    // implemented, this description is better.
 1599  117 aList.add(PRIVATE_AND_PACKAGE);
 1600  117 return aList;
 1601    }
 1602    }
 1603   
 1604    /** File extension registration. */
 1605    public static final ForcedChoiceOption DYNAMICJAVA_ACCESS_CONTROL =
 1606    new ForcedChoiceOption("dynamicjava.access.control", DynamicJavaAccessControlChoices.PRIVATE_AND_PACKAGE,
 1607    DYNAMICJAVA_ACCESS_CONTROL_CHOICES);
 1608   
 1609    /** The command-line arguments to be passed to the Master JVM. */
 1610    public static final StringOption MASTER_JVM_ARGS = new StringOption("master.jvm.args", "");
 1611   
 1612    /** The command-line arguments to be passed to the Slave JVM. */
 1613    public static final StringOption SLAVE_JVM_ARGS = new StringOption("slave.jvm.args", "");
 1614   
 1615    /* Possible maximum heap sizes. */
 1616    public static final ArrayList<String> heapSizeChoices = HeapSizeChoices.evaluate();
 1617    static class HeapSizeChoices {
 1618  117 public static ArrayList<String> evaluate() {
 1619  117 ArrayList<String> aList = new ArrayList<String>(4);
 1620  117 aList.add("default");
 1621  117 aList.add("64");
 1622  117 aList.add("128");
 1623  117 aList.add("256");
 1624  117 aList.add("512");
 1625  117 aList.add("768");
 1626  117 aList.add("1024");
 1627  117 aList.add("1536");
 1628  117 aList.add("2048");
 1629  117 aList.add("2560");
 1630  117 aList.add("3072");
 1631  117 aList.add("3584");
 1632  117 aList.add("4096");
 1633  117 return aList;
 1634    }
 1635    }
 1636   
 1637    /** The command-line arguments for the maximum heap size (-Xmx___) to be passed to the Master JVM. */
 1638    public static final ForcedChoiceOption MASTER_JVM_XMX =
 1639    new ForcedChoiceOption("master.jvm.xmx", "default", heapSizeChoices);
 1640   
 1641    /** The command-line arguments for the maximum heap size (-Xmx___) to be passed to the Slave JVM. */
 1642    public static final ForcedChoiceOption SLAVE_JVM_XMX =
 1643    new ForcedChoiceOption("slave.jvm.xmx", "default", heapSizeChoices);
 1644   
 1645    /** The last state of the "Clipboard History" dialog. */
 1646    public static final StringOption DIALOG_CLIPBOARD_HISTORY_STATE = new StringOption("dialog.clipboard.history.state", "default");
 1647   
 1648    /** Whether to save and restore window size and position at startUp/shutdown. */
 1649    public static final BooleanOption DIALOG_CLIPBOARD_HISTORY_STORE_POSITION =
 1650    new BooleanOption("dialog.clipboardhistory.store.position", Boolean.TRUE);
 1651   
 1652    /** How many entries are kept in the clipboard history. */
 1653    public static final NonNegativeIntegerOption CLIPBOARD_HISTORY_SIZE =
 1654    new NonNegativeIntegerOption("clipboardhistory.store.size", 10);
 1655   
 1656    /** The last state of the "Go to File" dialog. */
 1657    public static final StringOption DIALOG_GOTOFILE_STATE = new StringOption("dialog.gotofile.state", "default");
 1658   
 1659    /** Whether to save and restore window size and position at startUp/shutdown. */
 1660    public static final BooleanOption DIALOG_GOTOFILE_STORE_POSITION =
 1661    new BooleanOption("dialog.gotofile.store.position", Boolean.TRUE);
 1662   
 1663    /** The last state of the "Open Javadoc" dialog. */
 1664    public static final StringOption DIALOG_OPENJAVADOC_STATE = new StringOption("dialog.openjavadoc.state", "default");
 1665   
 1666    /** Whether to save and restore window size and position at startUp/shutdown. */
 1667    public static final BooleanOption DIALOG_OPENJAVADOC_STORE_POSITION =
 1668    new BooleanOption("dialog.openjavadoc.store.position", Boolean.TRUE);
 1669   
 1670    /** The last state of the "Auto Import" dialog. */
 1671    public static final StringOption DIALOG_AUTOIMPORT_STATE = new StringOption("dialog.autoimport.state", "default");
 1672   
 1673    /** Whether to save and restore window size and position at startUp/shutdown. */
 1674    public static final BooleanOption DIALOG_AUTOIMPORT_STORE_POSITION =
 1675    new BooleanOption("dialog.autoimport.store.position", Boolean.TRUE);
 1676   
 1677    /** Number of entries in the browser history (0 for unlimited). */
 1678    public static final NonNegativeIntegerOption BROWSER_HISTORY_MAX_SIZE =
 1679    new NonNegativeIntegerOption("browser.history.max.size", Integer.valueOf(50));
 1680   
 1681    /** Whether to also list files with fully qualified paths.
 1682    */
 1683    public static final BooleanOption DIALOG_GOTOFILE_FULLY_QUALIFIED =
 1684    new BooleanOption("dialog.gotofile.fully.qualified", Boolean.FALSE);
 1685   
 1686    /** The last state of the "Complete File" dialog. */
 1687    public static final StringOption DIALOG_COMPLETE_WORD_STATE = new StringOption("dialog.completeword.state", "default");
 1688   
 1689    /** Whether to save and restore window size and position at startUp/shutdown. */
 1690    public static final BooleanOption DIALOG_COMPLETE_WORD_STORE_POSITION =
 1691    new BooleanOption("dialog.completeword.store.position", Boolean.TRUE);
 1692   
 1693    /** Whether to scan class files for auto-completion class names. */
 1694    public static final BooleanOption DIALOG_COMPLETE_SCAN_CLASS_FILES =
 1695    new BooleanOption("dialog.completeword.scan.class.files", Boolean.FALSE);
 1696   
 1697    /** Whether to include Java API classes in auto-completion. */
 1698    public static final BooleanOption DIALOG_COMPLETE_JAVAAPI =
 1699    new BooleanOption("dialog.completeword.javaapi", Boolean.FALSE);
 1700   
 1701    // Any lightweight parsing has been disabled until we have something that is beneficial and works better in the background.
 1702    /** Whether to perform light-weight parsing. */
 1703    public static final BooleanOption LIGHTWEIGHT_PARSING_ENABLED =
 1704    new BooleanOption("lightweight.parsing.enabled", Boolean.FALSE);
 1705   
 1706    /** Delay for light-weight parsing. */
 1707    public static final NonNegativeIntegerOption DIALOG_LIGHTWEIGHT_PARSING_DELAY =
 1708    new NonNegativeIntegerOption("lightweight.parsing.delay", Integer.valueOf(500));
 1709   
 1710    /** The last state of the "Tabbed Panes" frame. */
 1711    public static final StringOption DIALOG_TABBEDPANES_STATE = new StringOption("tabbedpanes.state", "default");
 1712   
 1713    /** Whether to save and restore window size and position at startUp/shutdown. */
 1714    public static final BooleanOption DIALOG_TABBEDPANES_STORE_POSITION =
 1715    new BooleanOption("tabbedpanes.store.position", Boolean.TRUE);
 1716   
 1717    /** Whether the tabbed pane is detached from the MainFrame. */
 1718    public static final BooleanOption DETACH_TABBEDPANES =
 1719    new BooleanOption("tabbedpanes.detach", Boolean.FALSE);
 1720   
 1721    /** The last state of the "Debugger" frame. */
 1722    public static final StringOption DIALOG_DEBUGFRAME_STATE = new StringOption("debugger.state", "default");
 1723   
 1724    /** Whether to save and restore window size and position at startUp/shutdown. */
 1725    public static final BooleanOption DIALOG_DEBUGFRAME_STORE_POSITION =
 1726    new BooleanOption("debugger.store.position", Boolean.TRUE);
 1727   
 1728    /** Whether the debugger is detached from the MainFrame. */
 1729    public static final BooleanOption DETACH_DEBUGGER =
 1730    new BooleanOption("debugger.detach", Boolean.FALSE);
 1731   
 1732    /** The last state of the "Create Jar from Project" dialog. */
 1733    public static final StringOption DIALOG_JAROPTIONS_STATE = new StringOption("dialog.jaroptions.state", "default");
 1734   
 1735    /** Whether to save and restore window size and position at startUp/shutdown. */
 1736    public static final BooleanOption DIALOG_JAROPTIONS_STORE_POSITION =
 1737    new BooleanOption("dialog.jaroptions.store.position", Boolean.TRUE);
 1738   
 1739    /** The last state of the "Execute External Process" dialog. */
 1740    public static final StringOption DIALOG_EXTERNALPROCESS_STATE = new StringOption("dialog.externalprocess.state", "default");
 1741   
 1742    /** Whether to save and restore window size and position at startUp/shutdown. */
 1743    public static final BooleanOption DIALOG_EXTERNALPROCESS_STORE_POSITION =
 1744    new BooleanOption("dialog.externalprocess.store.position", Boolean.TRUE);
 1745   
 1746    /** The last state of the "Edit External Process" dialog. */
 1747    public static final StringOption DIALOG_EDITEXTERNALPROCESS_STATE = new StringOption("dialog.editexternalprocess.state", "default");
 1748   
 1749    /** Whether to save and restore window size and position at startUp/shutdown. */
 1750    public static final BooleanOption DIALOG_EDITEXTERNALPROCESS_STORE_POSITION =
 1751    new BooleanOption("dialog.editexternalprocess.store.position", Boolean.TRUE);
 1752   
 1753    /** Whether to put the focus in the definitions pane after find/replace. */
 1754    public static final BooleanOption FIND_REPLACE_FOCUS_IN_DEFPANE =
 1755    new BooleanOption("find.replace.focus.in.defpane", Boolean.FALSE);
 1756   
 1757    /** Whether to show a notification popup when the first DrJava error occurs. */
 1758    public static final BooleanOption DIALOG_DRJAVA_ERROR_POPUP_ENABLED =
 1759    new BooleanOption("dialog.drjava.error.popup.enabled", Boolean.TRUE);
 1760   
 1761    /** Whether to ask the user if DrJava may send system information to the DrJava developers. */
 1762    public static final BooleanOption DIALOG_DRJAVA_SURVEY_ENABLED =
 1763    new BooleanOption("dialog.drjava.survey.enabled", Boolean.TRUE);
 1764   
 1765    /** Whether to show the "code preview" popups in the RegionTreePanels (bookmarks, breakpoints, find all). */
 1766    public static final BooleanOption SHOW_CODE_PREVIEW_POPUPS =
 1767    new BooleanOption("show.code.preview.popups", Boolean.TRUE);
 1768   
 1769    /** Whether to use Runtime.halt to quit DrJava (see bugs 1550220 and 1478796). */
 1770    public static final BooleanOption DRJAVA_USE_FORCE_QUIT =
 1771    new BooleanOption("drjava.use.force.quit", Boolean.FALSE);
 1772   
 1773    /** Whether to display the "Auto Import" dialog when an undefined class
 1774    * is encountered in the Interactions Pane. */
 1775    public static final BooleanOption DIALOG_AUTOIMPORT_ENABLED =
 1776    new BooleanOption("dialog.autoimport.enabled", Boolean.TRUE);
 1777   
 1778    /** Delay for following files. */
 1779    public static final NonNegativeIntegerOption FOLLOW_FILE_DELAY =
 1780    new NonNegativeIntegerOption("follow.file.delay", Integer.valueOf(300));
 1781   
 1782    /** Maximum lines to keep when following files, or 0 for unlimited. */
 1783    public static final NonNegativeIntegerOption FOLLOW_FILE_LINES =
 1784    new NonNegativeIntegerOption("follow.file.lines", Integer.valueOf(1000));
 1785   
 1786    /** Prefix for the "external saved" settings. */
 1787    public static final String EXTERNAL_SAVED_PREFIX = "external.saved.";
 1788   
 1789    /** The number of saved external processes. */
 1790    public static final NonNegativeIntegerOption EXTERNAL_SAVED_COUNT =
 1791    new NonNegativeIntegerOption(EXTERNAL_SAVED_PREFIX + "count", Integer.valueOf(0));
 1792   
 1793    /** The names of saved external processes. */
 1794    public static final VectorOption<String> EXTERNAL_SAVED_NAMES =
 1795    new VectorOption<String>(EXTERNAL_SAVED_PREFIX + "names",
 1796    new StringOption("",""),
 1797    new Vector<String>());
 1798   
 1799    /** The command lines of saved external processes. */
 1800    public static final VectorOption<String> EXTERNAL_SAVED_CMDLINES =
 1801    new VectorOption<String>(EXTERNAL_SAVED_PREFIX + "cmdlines",
 1802    new StringOption("",""),
 1803    new Vector<String>());
 1804   
 1805    /** The work directories of saved external processes. */
 1806    public static final VectorOption<String> EXTERNAL_SAVED_WORKDIRS =
 1807    new VectorOption<String>(EXTERNAL_SAVED_PREFIX + "workdirs",
 1808    new StringOption("",""),
 1809    new Vector<String>());
 1810   
 1811    /** The script file (or "" if none) of saved external processes. */
 1812    public static final VectorOption<String> EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES =
 1813    new VectorOption<String>(EXTERNAL_SAVED_PREFIX + "enclosingdjappfiles",
 1814    new StringOption("",""),
 1815    new Vector<String>());
 1816   
 1817    /** Notification of new versions. */
 1818    public static final ArrayList<String> NEW_VERSION_NOTIFICATION_CHOICES =
 1819    VersionNotificationChoices.evaluate();
 1820    public static class VersionNotificationChoices {
 1821    public static final String STABLE = "stable versions only";
 1822    public static final String BETA = "stable and beta versions only";
 1823    public static final String ALL_RELEASES = "all release versions";
 1824    public static final String EXPERIMENTAL = "weekly experimental builds";
 1825    public static final String DISABLED = "none (disabled)";
 1826  117 public static ArrayList<String> evaluate() {
 1827  117 ArrayList<String> aList = new ArrayList<String>(4);
 1828  117 aList.add(STABLE);
 1829  117 aList.add(BETA);
 1830  117 aList.add(ALL_RELEASES);
 1831  117 aList.add(EXPERIMENTAL);
 1832  117 aList.add(DISABLED);
 1833  117 return aList;
 1834    }
 1835    }
 1836   
 1837    /** The kind of version DrJava should be looking for. */
 1838    public static final ForcedChoiceOption NEW_VERSION_NOTIFICATION =
 1839    new ForcedChoiceOption("new.version.notification", VersionNotificationChoices.BETA, NEW_VERSION_NOTIFICATION_CHOICES);
 1840   
 1841    /** Whether the new version feature may be used at all. */
 1842    public static final BooleanOption NEW_VERSION_ALLOWED = new BooleanOption("new.version.allowed", Boolean.TRUE);
 1843   
 1844    /** The last time we checked for a new version. */
 1845    public static final LongOption LAST_NEW_VERSION_NOTIFICATION = new LongOption("new.version.notification.last", (long)0);
 1846   
 1847    /** The number of days that have to pass before we automatically check again. */
 1848    public static final NonNegativeIntegerOption NEW_VERSION_NOTIFICATION_DAYS =
 1849    new NonNegativeIntegerOption("new.version.notification.days", 7);
 1850   
 1851    /** The number of days that have to pass before we ask and allow the user to participate in the DrJava survey again. */
 1852    public static final NonNegativeIntegerOption DRJAVA_SURVEY_DAYS =
 1853    new NonNegativeIntegerOption("drjava.survey.days", 91); // every three month
 1854   
 1855    /** The last time we asked the user to participate in the DrJava survey. */
 1856    public static final LongOption LAST_DRJAVA_SURVEY = new LongOption("drjava.survey.notification.last", (long)0);
 1857   
 1858    /** The request URL that the user generated the last time the DrJava survey was taken. */
 1859    public static final StringOption LAST_DRJAVA_SURVEY_RESULT = new StringOption("drjava.survey.result.last", "");
 1860   
 1861    /** Delete class files for language-level classes. */
 1862    public static final ArrayList<String> DELETE_LL_CLASS_FILES_CHOICES =
 1863    DeleteLLClassFileChoices.evaluate();
 1864    public static class DeleteLLClassFileChoices {
 1865    public static final String NEVER = "never";
 1866    public static final String ASK_ME = "ask me at startup";
 1867    public static final String ALWAYS = "always";
 1868  117 public static ArrayList<String> evaluate() {
 1869  117 ArrayList<String> aList = new ArrayList<String>(3);
 1870  117 aList.add(NEVER);
 1871  117 aList.add(ASK_ME);
 1872  117 aList.add(ALWAYS);
 1873  117 return aList;
 1874    }
 1875    }
 1876   
 1877    /** Whether to delete language level class files. */
 1878    public static final ForcedChoiceOption DELETE_LL_CLASS_FILES =
 1879    new ForcedChoiceOption("delete.ll.class.files", DeleteLLClassFileChoices.ALWAYS, DELETE_LL_CLASS_FILES_CHOICES);
 1880   
 1881    /** File extension registration choices. */
 1882    public static final ArrayList<String> FILE_EXT_REGISTRATION_CHOICES =
 1883    FileExtRegistrationChoices.evaluate();
 1884    public static class FileExtRegistrationChoices {
 1885    public static final String NEVER = "never";
 1886    public static final String ASK_ME = "ask me at startup";
 1887    public static final String ALWAYS = "always";
 1888  117 public static ArrayList<String> evaluate() {
 1889  117 ArrayList<String> aList = new ArrayList<String>(4);
 1890  117 aList.add(NEVER);
 1891  117 aList.add(ASK_ME);
 1892  117 aList.add(ALWAYS);
 1893  117 return aList;
 1894    }
 1895    }
 1896   
 1897    /** File extension registration. */
 1898    public static final ForcedChoiceOption FILE_EXT_REGISTRATION =
 1899    new ForcedChoiceOption("file.ext.registration", FileExtRegistrationChoices.ASK_ME,
 1900    FILE_EXT_REGISTRATION_CHOICES);
 1901   
 1902    /** JUnit/ConcJUnit. */
 1903   
 1904    /** junitrt.jar/concutest-junit-3.8.2-withrt.jar location, or NULL_FILE if not specified. */
 1905    public static final FileOption JUNIT_LOCATION = new FileOption("junit.location", FileOps.NULL_FILE);
 1906   
 1907    /** True if the JUnit jar in JUNIT_LOCATION should be used. */
 1908    public static final BooleanOption JUNIT_LOCATION_ENABLED = new BooleanOption("junit.location.enabled", Boolean.FALSE);
 1909   
 1910    /** ConcJUnit processed Java Runtime (rt.concjunit.jar) location, or NULL_FILE if not specified. */
 1911    public static final FileOption RT_CONCJUNIT_LOCATION = new FileOption("rt.concjunit.location", FileOps.NULL_FILE);
 1912   
 1913    /** Possible options for Javadoc access levels. */
 1914    static final ArrayList<String> concJUnitCheckChoices =
 1915    ConcJUnitCheckChoices.evaluate();
 1916    public static class ConcJUnitCheckChoices {
 1917    public static final String ALL = "all-threads, no-join, lucky";
 1918    public static final String NO_LUCKY = "all-threads, no-join";
 1919    public static final String ONLY_THREADS = "all-threads";
 1920    public static final String NONE = "none (use JUnit)";
 1921  117 public static ArrayList<String> evaluate() {
 1922  117 ArrayList<String> aList = new ArrayList<String>(4);
 1923  117 aList.add(ALL);
 1924  117 aList.add(NO_LUCKY);
 1925  117 aList.add(ONLY_THREADS);
 1926  117 aList.add(NONE);
 1927  117 return aList;
 1928    }
 1929    }
 1930   
 1931    /** The concurrent test checks that ConcJUnit should perform. */
 1932    public static final ForcedChoiceOption CONCJUNIT_CHECKS_ENABLED =
 1933    new ForcedChoiceOption("concjunit.checks.enabled", ConcJUnitCheckChoices.NONE, concJUnitCheckChoices);
 1934   
 1935    /** A version suffix that describes custom additions to DrJava. */
 1936    public static final StringOption CUSTOM_DRJAVA_JAR_VERSION_SUFFIX = new StringOption("custom.drjava.jar.version.suffix", "");
 1937    }