home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
- // @Modified build 218 cm19980918 - see below
- // @Modified build 252 cm19990114 - added support for useInteractiveProcess
- // @Modified build 315 cm19990725 - added support for rmic
-
- // This script sets up the tools standard options for for
- // Sun's Java development kit.
-
- var gOutput = getOutput();
- var gOptions = getMapFile("JDKToolsStandardOptions");
-
- var gBooleanOptions = newList();
- gBooleanOptions.addTail("true");
- gBooleanOptions.addTail("false");
- var includeJDPAOption = true;
-
- function DoCommand()
- {
- var JDKOptions = getScriptObject("\\Library\\JDKOptions");
- var classpathUtilities = getScriptObject("\\Library\\classpathUtilities");
-
- var propertyLabelList = newList();
- var propertyList = newList();
- var valueList = newList();
- var actionList = newList();
-
- var propertyName = "runInWindow";
- var propertyValue = gOptions.lookup(propertyName, true);
- propertyLabelList.addTail("Run applications in window ( use javaw )");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "showConsoleWindow";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Show application console window");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "useInteractiveProcess";
- var propertyValue = gOptions.lookup(propertyName, true);
- propertyLabelList.addTail("Use Interactive Process");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- if (includeJDPAOption)
- {
- var propertyName = "useJPDADebugger";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Use JPDA Debugger");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
- }
-
- var propertyName = "enableRMICinBuilds";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Enable RMIC in builds");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "showAppletConsoleWindow";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Show applet console window");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "showCommandLine";
- var propertyValue = gOptions.lookup(propertyName, true);
- propertyLabelList.addTail("Show Generated Command Lines");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "useCommandFileWhenCompiling";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Use Command File When Compiling");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "useSpecifiedClasspathsOnly";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Use Specified Classpaths Only");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "useEnvironmentClasspath";
- var propertyValue = gOptions.lookup(propertyName, false);
- propertyLabelList.addTail("Use Environment Classpaths Only");
- propertyList.addTail(propertyName);
- valueList.addTail("" + propertyValue);
- actionList.addTail(gBooleanOptions);
-
- var propertyName = "customClasspaths";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Custom Classpaths");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(classpathUtilities.EditJDKCustomClasspaths);
-
- var propertyName = "jdk-compiler_debug";
- var propertyValue = gOptions.lookup(propertyName, "-g");
- propertyLabelList.addTail("Compiler (javac) debug");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.CompileOptions);
-
- var propertyName = "jdk-compiler_release";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Compiler (javac) release");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.CompileOptions);
-
- var propertyName = "jdk-runapplication_debug";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Interpreter (java) debug");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.RunOptions);
-
- var propertyName = "jdk-runapplication_release";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Interpreter (java) release");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.RunOptions);
-
- var propertyName = "jdk-runapplicationwindow_debug";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Interpreter (javaw) debug");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.RunOptions);
-
- var propertyName = "jdk-runapplicationwindow_release";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Interpreter (javaw) release");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.RunOptions);
-
- var propertyName = "jdk-appletviewer_release";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Appletviewer release");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.AppletViewerOptions);
-
- var propertyName = "jdk-appletviewer_debug";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Appletviewer debug");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.AppletViewerOptions);
-
- var propertyName = "jdk-debugger";
- var propertyValue = gOptions.lookup(propertyName, "");
- propertyLabelList.addTail("Debugger (jdb)");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(JDKOptions.DebuggerOptions);
-
- if (includeJDPAOption)
- {
- var propertyName = "jdk-jdpa_debugger";
- var propertyValue = gOptions.lookup(propertyName, "server=y,address=8000");
- propertyLabelList.addTail("Debugger (jpda)");
- propertyList.addTail(propertyName);
- valueList.addTail(propertyValue);
- actionList.addTail(newList());
- }
-
- var results = editProperties("JDK Options", "Edit options",
- "Option", "Value", propertyLabelList, valueList, actionList);
-
- if (results)
- {
- var propertyPostion = propertyList.getHeadPosition();
- var valuePosition = valueList.getHeadPosition();
- while (propertyPostion.valid && valuePosition.valid)
- {
- var property = propertyList.getNext(propertyPostion);
- var value = valueList.getNext(valuePosition);
-
- // Update the value of the property
-
- if (property == "runInWindow" ||
- property == "showConsoleWindow" || //cm19980918
- property == "showAppletConsoleWindow" || //cm19980918
- property == "showCommandLine" ||
- property == "useInteractiveProcess" || //cm19990114
- property == "useJPDADebugger" || //cm20010512
- property == "enableRMICinBuilds" || //cm19990725
- property == "useEnvironmentClasspath" ||
- property == "useSpecifiedClasspathsOnly" || //cm20020325
- property == "useCommandFileWhenCompiling") //cm20000530
- {
- // convert value to a boolean
- if (value == "true")
- {
- gOptions.setValue(property, true);
- }
- else
- {
- gOptions.setValue(property, false);
- }
- }
- else
- {
- gOptions.setValue(property, value);
- }
- }
-
- // Update options
- var jdkOptions = getScriptObject("\\Library\\jdkOptions");
- jdkOptions.UpdateOptions()
- }
- }
-
- !!/Script
-
-
-