Beispiel #1
0
 /**
  * Stores the data from this panel in gwt.properties.
  *
  * @param props gwt.properties
  */
 public void fillData(Properties props) {
   final String m = jTextAreaModules.getText();
   String[] ms = m.split("\n"); // NOI18N
   props.setProperty(
       "gwt.module", // NOI18N
       GWT4NBUtil.join(
           Arrays.asList(ms), // NOI18N
           " ")); // NOI18N
   props.setProperty(
       "gwt.output.dir", // NOI18N
       jTextFieldCompilerOutputDirectory.getText());
   props.setProperty(
       "gwt.compiler.output.style", // NOI18N
       OUTPUT_STYLES.get(jComboBoxCompilerOutputStyle.getSelectedIndex()));
   props.setProperty(
       "gwt.compiler.jvmargs", // NOI18N
       jTextFieldCompilerJVMArgs.getText());
   props.setProperty(
       "gwt.compiler.local.workers", // NOI18N
       jSpinnerCompilerWorkers.getValue().toString());
   props.setProperty(
       "gwt.compiler.logLevel", // NOI18N
       (String) jComboBoxCompilerLogLevel.getSelectedItem());
   props.setProperty(
       "gwt.shell.output.style", // NOI18N
       OUTPUT_STYLES.get(jComboBoxShellOutputStyle.getSelectedIndex()));
   props.setProperty(
       "gwt.shell.logLevel", // NOI18N
       (String) jComboBoxShellLogLevel.getSelectedItem());
   props.setProperty(
       "gwt.shell.java", // NOI18N
       jTextFieldShellJVM.getText());
   props.setProperty(
       "gwt.shell.jvmargs", // NOI18N
       jTextFieldShellJVMArgs.getText());
   props.setProperty(
       "gwt.version", // NOI18N
       (String) jComboBoxGWTVersion.getSelectedItem());
   props.setProperty(
       "gwt.shell.code.server.port", // NOI18N
       jSpinnerShellServerPort.getValue().toString());
   props.setProperty(
       "gwt.shell.port", // NOI18N
       jSpinnerShellPort.getValue().toString());
   props.setProperty(
       "gwt.compiler.args", // NOI18N
       jTextFieldCompilerArgs.getText());
   props.setProperty(
       "gwt.test.jvmargs", // NOI18N
       jTextFieldTestsArgs.getText());
   props.setProperty(
       "gwt.shell.args", // NOI18N
       jTextFieldShellArgs.getText());
   props.setProperty("gwt.debug.openbrowser", jCheckBoxOpenBrowser.isSelected() ? "yes" : "no");
   props.setProperty("gwt.debug.superdev", jCheckBoxSuperDev.isSelected() ? "yes" : "no");
 }
Beispiel #2
0
  /**
   * Fills this panel with the data from gwt.properties
   *
   * @param props gwt.properties
   */
  public void fillPanel(Properties props) {
    final String m = props.getProperty("gwt.module"); // NOI18N
    String[] ms = m.split(" "); // NOI18N
    jTextAreaModules.setText(GWT4NBUtil.join(Arrays.asList(ms), "\n")); // NOI18N
    jTextFieldCompilerOutputDirectory.setText(props.getProperty("gwt.output.dir")); // NOI18N
    jComboBoxCompilerOutputStyle.setSelectedIndex(
        prefixIndex(props.getProperty("gwt.compiler.output.style"), OUTPUT_STYLES)); // NOI18N
    jTextFieldCompilerJVMArgs.setText(props.getProperty("gwt.compiler.jvmargs")); // NOI18N
    jSpinnerCompilerWorkers.setValue(
        new Integer(props.getProperty("gwt.compiler.local.workers"))); // NOI18N
    jComboBoxCompilerLogLevel.setSelectedItem(props.getProperty("gwt.compiler.logLevel")); // NOI18N
    jComboBoxShellOutputStyle.setSelectedIndex(
        prefixIndex(props.getProperty("gwt.shell.output.style"), OUTPUT_STYLES)); // NOI18N
    jComboBoxShellLogLevel.setSelectedItem(props.getProperty("gwt.shell.logLevel")); // NOI18N
    jTextFieldShellJVM.setText(props.getProperty("gwt.shell.java")); // NOI18N
    jTextFieldShellJVMArgs.setText(props.getProperty("gwt.shell.jvmargs")); // NOI18N
    jCheckBoxOpenBrowser.setSelected(
        props.getProperty("gwt.debug.openbrowser") != null
            && props.getProperty("gwt.debug.openbrowser").equals("yes"));
    jCheckBoxSuperDev.setSelected(
        props.getProperty("gwt.debug.superdev") != null
            && props.getProperty("gwt.debug.superdev").equals("yes"));

    // select the newest version, if unknown
    ComboBoxModel cbm = jComboBoxGWTVersion.getModel();
    String v = props.getProperty("gwt.version"); // NOI18N
    int index = -1;
    for (int i = 0; i < cbm.getSize(); i++) {
      if (cbm.getElementAt(i).equals(v)) {
        index = i;
        break;
      }
    }
    if (index < 0) {
      index = jComboBoxGWTVersion.getItemCount() - 1;
    }
    jComboBoxGWTVersion.setSelectedIndex(index);

    jSpinnerShellServerPort.setValue(
        new Integer(props.getProperty("gwt.shell.code.server.port"))); // NOI18N
    jSpinnerShellPort.setValue(new Integer(props.getProperty("gwt.shell.port"))); // NOI18N
    jTextFieldCompilerArgs.setText(props.getProperty("gwt.compiler.args")); // NOI18N
    jTextFieldTestsArgs.setText(props.getProperty("gwt.test.jvmargs")); // NOI18N
    jTextFieldShellArgs.setText(props.getProperty("gwt.shell.args")); // NOI18N
  }