Java 类com.intellij.ui.RawCommandLineEditor 实例源码

项目:intellij-nette-tester    文件:TesterSettingsEditor.java   
private void createUIComponents() {
    testScope = new TextFieldWithBrowseButton();
    testScope.addBrowseFolderListener(null, null, project, FileChooserDescriptorFactory.createSingleFileOrFolderDescriptor());

    testerExecutable = new TextFieldWithBrowseButton();
    testerExecutable.addBrowseFolderListener(null, null, project, FileChooserDescriptorFactory.createSingleFileOrFolderDescriptor());

    testerOptions = new RawCommandLineEditor();
    testerOptions.setDialogCaption("Options");

    userSetupScript = new TextFieldWithBrowseButton();
    userSetupScript.addBrowseFolderListener(null, null, project, FileChooserDescriptorFactory.createSingleFileDescriptor("php"));

    testScopeLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.tester.testScope"));
    testerExecutableLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.tester.testerExecutable"));
    testerOptionsLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.tester.testerOptions"));
    setupScriptLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.tester.setupScript"));
}
项目:intellij-ce-playground    文件:GradleCompilerSettingsConfigurable.java   
private void createUIComponents() {
  myParallelBuildDocHyperlinkLabel =
    createHyperlinkLabel("This option is in \"incubation\" and should only be used with ", "decoupled projects", ".",
                         "http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects");

  myCommandLineOptionsDocHyperlinkLabel =
    createHyperlinkLabel("Example: --stacktrace --debug (for more information, please read Gradle's ", "documentation", ".)",
                         "http://www.gradle.org/docs/current/userguide/gradle_command_line.html");

  myConfigureOnDemandDocHyperlinkLabel =
    createHyperlinkLabel("This option may speed up builds. This option is in \"incubation.\" Please read Gradle's ", "documentation", ".",
                         "http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand");

  myCommandLineOptionsEditor = new RawCommandLineEditor();
  myCommandLineOptionsEditor.setDialogCaption("Command-line Options");
}
项目:intellij    文件:BlazeIntellijPluginConfiguration.java   
@Override
protected JComponent createEditor() {
  vmParameters.setText("VM options:");
  vmParameters.setComponent(new RawCommandLineEditor());
  vmParameters.getComponent().setDialogCaption(vmParameters.getRawText());
  vmParameters.setLabelLocation(BorderLayout.WEST);

  programParameters.setText("Program arguments");
  programParameters.setComponent(new RawCommandLineEditor());
  programParameters.getComponent().setDialogCaption(programParameters.getRawText());
  programParameters.setLabelLocation(BorderLayout.WEST);

  return UiUtil.createBox(
      new JLabel("Target:"),
      targetCombo,
      new JLabel("Plugin SDK"),
      sdkCombo,
      vmParameters.getLabel(),
      vmParameters.getComponent(),
      programParameters.getLabel(),
      programParameters.getComponent(),
      blazeFlagsEditor.createComponent(),
      exeFlagsEditor.createComponent(),
      keepInSyncCheckBox);
}
项目:PerlRun    文件:Form.java   
@Override
protected void addComponents() {
    interpreterNameField = new TextFieldWithBrowseButton();
    interpreterNameField.addBrowseFolderListener("Choose interpreter...", "", getProject(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
    LabeledComponent<JComponent> interpreterNameComponent = LabeledComponent.create(createComponentWithMacroBrowse(interpreterNameField), "Interpreter:");
    interpreterNameComponent.setLabelLocation(BorderLayout.WEST);
    add(interpreterNameComponent);

    interpreterOptionsComponent = LabeledComponent.create(new RawCommandLineEditor(), "Interpreter options");
    interpreterOptionsComponent.setLabelLocation(BorderLayout.WEST);
    add(interpreterOptionsComponent);

    programNameField = new TextFieldWithBrowseButton();
    programNameField.addBrowseFolderListener("Choose script...", "", getProject(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
    LabeledComponent<JComponent> programNameComponent = LabeledComponent.create(createComponentWithMacroBrowse(programNameField), "Script:");
    programNameComponent.setLabelLocation(BorderLayout.WEST);
    add(programNameComponent);

    programParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), "Script parameters:");
    programParametersComponent.setLabelLocation(BorderLayout.WEST);
    add(programParametersComponent);
}
项目:consulo-nodejs    文件:NodeJSConfigurationPanelBase.java   
@Override
protected void initComponents()
{
    myModuleBox = new ComboBox();
    myModuleBox.setRenderer(new ModuleListCellRenderer());

    myVmParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), "VM arguments");
    myVmParametersComponent.setLabelLocation(BorderLayout.WEST);
    copyDialogCaption(myVmParametersComponent);

    myUseAlternativeBundleCheckBox = new JCheckBox("Use alternative bundle: ");
    ProjectSdksModel projectSdksModel = new ProjectSdksModel();
    projectSdksModel.reset();

    myAlternativeBundleComboBox = new SdkComboBox(projectSdksModel, Conditions.<SdkTypeId>is(NodeJSBundleType.getInstance()), true);
    myAlternativeBundleComboBox.setEnabled(false);
    myUseAlternativeBundleCheckBox.addItemListener(new ItemListener()
    {
        @Override
        public void itemStateChanged(ItemEvent e)
        {
            myAlternativeBundleComboBox.setEnabled(myUseAlternativeBundleCheckBox.isSelected());
        }
    });
    super.initComponents();
}
项目:intellij-haskforce    文件:HaskellToolsConfigurable.java   
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField,
     RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField, String versionParam,
     @Nullable Topic<SettingsChangeNotifier> topic) {
    this.project = project;
    this.command = command;
    this.key = key;
    this.pathField = pathField;
    this.flagsField = flagsField;
    this.versionField = versionField;
    this.versionParam = versionParam;
    this.autoFindButton = autoFindButton;
    this.topic = topic;
    this.publisher = topic == null ? null : project.getMessageBus().syncPublisher(topic);

    this.propertyFields = Arrays.asList(
            new PropertyField(key.pathKey, pathField),
            new PropertyField(key.flagsKey, flagsField));

    GuiUtil.addFolderListener(pathField, command);
    GuiUtil.addApplyPathAction(autoFindButton, pathField, command);
    updateVersion();
}
项目:consulo    文件:CommonProgramParametersPanel.java   
protected void initComponents() {
  myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                                         ExecutionBundle.message("run.configuration.program.parameters"));

  FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  //noinspection DialogTitleCapitalization
  fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message"));
  myWorkingDirectoryComboBox = new MacroComboBoxWithBrowseButton(fileChooserDescriptor, getProject());

  myWorkingDirectoryComponent = LabeledComponent.create(myWorkingDirectoryComboBox, ExecutionBundle.message("run.configuration.working.directory.label"));
  myEnvVariablesComponent = new EnvironmentVariablesComponent();

  myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
  myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
  myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);

  addComponents();

  setPreferredSize(new Dimension(10, 10));

  copyDialogCaption(myProgramParametersComponent);
}
项目:intellij-nette-tester    文件:PhpCommandLineSettingsEditor.java   
private void createUIComponents() {
    interpreterOptions = new RawCommandLineEditor();
    interpreterOptions.setDialogCaption("Options");

    customWorkingDirectory = new TextFieldWithBrowseButton();
    customWorkingDirectory.addBrowseFolderListener(null, null, project, FileChooserDescriptorFactory.createSingleFolderDescriptor());

    environmentVariables = new EnvironmentVariablesComponent();

    interpreterOptionsLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.cli.interpreterOptions"));
    workingDirectoryLabel = new JBLabel(TesterBundle.message("runConfiguration.editor.cli.workingDirectory"));
}
项目:intellij-ce-playground    文件:CommonJavaParametersPanel.java   
@Override
protected void addComponents() {
  myVMParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                           ExecutionBundle.message("run.configuration.java.vm.parameters.label"));
  copyDialogCaption(myVMParametersComponent);

  myVMParametersComponent.setLabelLocation(BorderLayout.WEST);

  add(myVMParametersComponent);
  super.addComponents();
}
项目:intellij-ce-playground    文件:CommonProgramParametersPanel.java   
protected void initComponents() {
  myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                                         ExecutionBundle.message("run.configuration.program.parameters"));

  FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  //noinspection DialogTitleCapitalization
  fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message"));
  myWorkingDirectoryField = new TextFieldWithBrowseButton();
  myWorkingDirectoryField.addBrowseFolderListener(new MacroAwareTextBrowseFolderListener(fileChooserDescriptor, getProject()) {
    @Override
    public void actionPerformed(ActionEvent e) {
      myFileChooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, myModuleContext);
      setProject(getProject());
      super.actionPerformed(e);
    }
  });

  myWorkingDirectoryComponent = LabeledComponent.create(createComponentWithMacroBrowse(myWorkingDirectoryField), ExecutionBundle.message("run.configuration.working.directory.label"));
  myEnvVariablesComponent = new EnvironmentVariablesComponent();

  myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
  myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
  myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);

  addComponents();

  setPreferredSize(new Dimension(10, 10));

  setAnchor(myEnvVariablesComponent.getLabel());
}
项目:intellij-ce-playground    文件:PluginRunConfigurationEditor.java   
@Override
@NotNull
public JComponent createEditor() {
  myModules.fillModules(myPRC.getProject(), PluginModuleType.getInstance());
  JPanel wholePanel = new JPanel(new GridBagLayout());
  myVMParameters.setText(DevKitBundle.message("vm.parameters"));
  myVMParameters.setComponent(new RawCommandLineEditor());
  myVMParameters.getComponent().setDialogCaption(myVMParameters.getRawText());
  myVMParameters.setLabelLocation(BorderLayout.WEST);

  myProgramParameters.setText(DevKitBundle.message("program.parameters"));
  myProgramParameters.setComponent(new RawCommandLineEditor());
  myProgramParameters.getComponent().setDialogCaption(myProgramParameters.getRawText());
  myProgramParameters.setLabelLocation(BorderLayout.WEST);

  GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 0, 0), UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP);
  wholePanel.add(myVMParameters, gc);
  wholePanel.add(myProgramParameters, gc);
  gc.gridwidth = 1;
  gc.gridy = 3;
  gc.weightx = 0;
  wholePanel.add(myModuleLabel, gc);
  gc.weighty = 1;
  gc.gridx = 1;
  gc.weightx = 1;
  wholePanel.add(myModules, gc);
  gc.gridx = 0;
  gc.gridy = 4;
  gc.gridwidth = 2;

  wholePanel.add(myJrePathEditor, gc);
  gc.gridy = 5;
  wholePanel.add(myShowLogs, gc);
  return wholePanel;
}
项目:tools-idea    文件:CommonJavaParametersPanel.java   
@Override
protected void addComponents() {
  myVMParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                           ExecutionBundle.message("run.configuration.java.vm.parameters.label"));
  copyDialogCaption(myVMParametersComponent);

  myVMParametersComponent.setLabelLocation(BorderLayout.WEST);

  add(myVMParametersComponent);
  super.addComponents();
}
项目:tools-idea    文件:PluginRunConfigurationEditor.java   
@NotNull
public JComponent createEditor() {
  myModules.fillModules(myPRC.getProject(), PluginModuleType.getInstance());
  JPanel wholePanel = new JPanel(new GridBagLayout());
  myVMParameters.setText(DevKitBundle.message("vm.parameters"));
  myVMParameters.setComponent(new RawCommandLineEditor());
  myVMParameters.getComponent().setDialogCaption(myVMParameters.getRawText());
  myVMParameters.setLabelLocation(BorderLayout.WEST);

  myProgramParameters.setText(DevKitBundle.message("program.parameters"));
  myProgramParameters.setComponent(new RawCommandLineEditor());
  myProgramParameters.getComponent().setDialogCaption(myProgramParameters.getRawText());
  myProgramParameters.setLabelLocation(BorderLayout.WEST);

  GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 0, 0), UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP);
  wholePanel.add(myVMParameters, gc);
  wholePanel.add(myProgramParameters, gc);
  gc.gridwidth = 1;
  gc.gridy = 3;
  gc.weightx = 0;
  wholePanel.add(myModuleLabel, gc);
  gc.weighty = 1;
  gc.gridx = 1;
  gc.weightx = 1;
  wholePanel.add(myModules, gc);
  gc.gridx = 0;
  gc.gridy = 4;
  gc.gridwidth = 2;

  wholePanel.add(myAlternativeJREPanel, gc);
  gc.gridy = 5;
  wholePanel.add(myShowLogs, gc);
  return wholePanel;
}
项目:intellij-xquery    文件:CommonJavaParametersPanel.java   
@Override
protected void addComponents() {
    myVMParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), ExecutionBundle.message("run.configuration.java.vm.parameters.label"));
    copyDialogCaption(myVMParametersComponent);

    myVMParametersComponent.setLabelLocation(BorderLayout.WEST);

    add(myVMParametersComponent);
    super.addComponents();
}
项目:consulo-java    文件:CommonJavaParametersPanel.java   
@Override
protected void addComponents() {
  myVMParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                           ExecutionBundle.message("run.configuration.java.vm.parameters.label"));
  copyDialogCaption(myVMParametersComponent);

  myVMParametersComponent.setLabelLocation(BorderLayout.WEST);

  add(myVMParametersComponent);
  super.addComponents();
}
项目:SmartTomcat    文件:RunnerSetting.java   
public RawCommandLineEditor getVmOptons() {
    return vmOptons;
}
项目:intellij-ce-playground    文件:ComparingUtils.java   
public static boolean isModified(RawCommandLineEditor editor, String value) {
  return !editor.getText().equals(value);
}
项目:intellij-ce-playground    文件:CompilerUIConfigurable.java   
private void createUIComponents() {
  myResourcePatternsField = new RawCommandLineEditor(ParametersListUtil.COLON_LINE_PARSER, ParametersListUtil.COLON_LINE_JOINER);
  myResourcePatternsField.setDialogCaption("Resource patterns");
}
项目:intellij-ce-playground    文件:CommonProgramParametersPanel.java   
protected void copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component) {
  final RawCommandLineEditor rawCommandLineEditor = component.getComponent();
  rawCommandLineEditor.setDialogCaption(component.getRawText());
  component.getLabel().setLabelFor(rawCommandLineEditor.getTextField());
}
项目:intellij-ce-playground    文件:CommonProgramParametersPanel.java   
public LabeledComponent<RawCommandLineEditor> getProgramParametersComponent() {
  return myProgramParametersComponent;
}
项目:intellij-ce-playground    文件:MavenRunnerPanel.java   
public JComponent createComponent() {
  JPanel panel = new JPanel(new GridBagLayout());

  GridBagConstraints c = new GridBagConstraints();
  c.fill = GridBagConstraints.HORIZONTAL;
  c.anchor = GridBagConstraints.WEST;
  c.insets.bottom = 5;

  myRunInBackgroundCheckbox = new JCheckBox("Run in background");
  myRunInBackgroundCheckbox.setMnemonic('b');
  if (!myRunConfigurationMode) {
    c.gridx = 0;
    c.gridy++;
    c.weightx = 1;
    c.gridwidth = GridBagConstraints.REMAINDER;

    panel.add(myRunInBackgroundCheckbox, c);
  }
  c.gridwidth = 1;

  JLabel labelVMParameters = new JLabel("VM Options:");
  labelVMParameters.setDisplayedMnemonic('v');
  labelVMParameters.setLabelFor(myVMParametersEditor = new RawCommandLineEditor());
  myVMParametersEditor.setDialogCaption(labelVMParameters.getText());

  c.gridx = 0;
  c.gridy++;
  c.weightx = 0;
  panel.add(labelVMParameters, c);

  c.gridx = 1;
  c.weightx = 1;
  c.insets.left = 10;
  panel.add(myVMParametersEditor, c);
  c.insets.left = 0;

  JLabel jdkLabel = new JLabel("JRE:");
  jdkLabel.setDisplayedMnemonic('j');
  jdkLabel.setLabelFor(myJdkCombo = new ExternalSystemJdkComboBox(myProject));
  c.gridx = 0;
  c.gridy++;
  c.weightx = 0;
  panel.add(jdkLabel, c);
  c.gridx = 1;
  c.weightx = 1;
  c.fill = GridBagConstraints.NONE;
  c.insets.left = 10;
  panel.add(myJdkCombo, c);
  c.insets.left = 0;
  c.fill = GridBagConstraints.HORIZONTAL;

  myEnvVariablesComponent = new EnvironmentVariablesComponent();
  myEnvVariablesComponent.setPassParentEnvs(true);
  myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
  c.gridx = 0;
  c.gridy++;
  c.weightx = 1;
  c.gridwidth = 2;
  panel.add(myEnvVariablesComponent, c);
  c.gridwidth = 1;

  JPanel propertiesPanel = new JPanel(new BorderLayout());
  propertiesPanel.setBorder(IdeBorderFactory.createTitledBorder("Properties", false));

  propertiesPanel.add(mySkipTestsCheckBox = new JCheckBox("Skip tests"), BorderLayout.NORTH);
  mySkipTestsCheckBox.setMnemonic('t');

  collectProperties();
  propertiesPanel.add(myPropertiesPanel = new MavenPropertiesPanel(myProperties), BorderLayout.CENTER);
  myPropertiesPanel.getEmptyText().setText("No properties defined");

  c.gridx = 0;
  c.gridy++;
  c.weightx = c.weighty = 1;
  c.gridwidth = c.gridheight = GridBagConstraints.REMAINDER;
  c.fill = GridBagConstraints.BOTH;
  panel.add(propertiesPanel, c);

  return panel;
}
项目:intellij-ce-playground    文件:PluginRunConfigurationEditor.java   
public RawCommandLineEditor getVMParameters() {
  return myVMParameters.getComponent();
}
项目:intellij-ce-playground    文件:PluginRunConfigurationEditor.java   
public RawCommandLineEditor getProgramParameters() {
  return myProgramParameters.getComponent();
}
项目:intellij-haskforce    文件:HaskellToolsConfigurable.java   
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField,
     RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField) {
    this(project, command, key, pathField, flagsField, autoFindButton, versionField, "--version");
}
项目:intellij-haskforce    文件:HaskellToolsConfigurable.java   
Tool(Project project, String command, ToolKey key, TextFieldWithBrowseButton pathField,
     RawCommandLineEditor flagsField, JButton autoFindButton, JTextField versionField, String versionParam) {
    this(project, command, key, pathField, flagsField, autoFindButton, versionField, versionParam, null);
}
项目:wuff-intellij-plugin    文件:WuffRunConfigurationEditor.java   
@NotNull
@Override
protected JComponent createEditor() {
    JPanel panel = new JPanel(new GridBagLayout());

    myVMParameters.setComponent(new RawCommandLineEditor());
    myVMParameters.setText(WuffBundle.message("wuff.run.config.jvmparams"));

    GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 2, 1, 1, 0, GridBagConstraints.WEST,
            GridBagConstraints.HORIZONTAL, new Insets(2, 0, 0, 0), UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP);

    panel.add(new JBLabel(WuffBundle.message("wuff.run.config.equinoxappmodule")), gc);
    gc.gridx = 1;
    gc.weightx = 7;
    panel.add(myModules, gc);

    gc.gridx = 0;
    gc.weightx = 1;
    panel.add(new JBLabel(WuffBundle.message("wuff.run.config.equinoxmain")), gc);

    gc.gridx = 1;
    gc.weightx = 1;
    panel.add(myEquinoxMainClass, gc);

    gc.gridx = 0;
    gc.weightx = 1;
    panel.add(new JBLabel(WuffBundle.message("wuff.run.configuration.applicationname")), gc);

    gc.gridx = 1;
    gc.weightx = 1;
    panel.add(myApplicationName, gc);

    gc.weightx = 10;
    gc.gridx = 0;
    panel.add(myVMParameters, gc);

    panel.add(createCheckboxPanel(), gc);

    panel.add(new JXTitledSeparator(WuffBundle.message("wuff.run.config.diagnostics")), gc);

    gc.weightx = 1;
    panel.add(myAutomaticDiagnostic, gc);

    gc.gridx = 0;
    panel.add(new JBLabel(WuffBundle.message("wuff.run.config.diagnostic.url")), gc);
    gc.gridx = 1;
    panel.add(myUrl, gc);

    gc.gridx = 0;
    panel.add(new JBLabel(WuffBundle.message("wuff.run.config.diagnostic.user")), gc);
    gc.gridx = 1;
    panel.add(myUser, gc);

    gc.gridx = 0;
    panel.add(new JBLabel(WuffBundle.message("wuff.run.config.diagnostic.pass")), gc);
    gc.gridx = 1;
    panel.add(myPassword, gc);

    setCurrentValuesToControls();

    return panel;
}
项目:tools-idea    文件:ComparingUtils.java   
public static boolean isModified(RawCommandLineEditor editor, String value) {
  return !editor.getText().equals(value);
}
项目:tools-idea    文件:CompilerUIConfigurable.java   
private void createUIComponents() {
  myResourcePatternsField = new RawCommandLineEditor(LINE_PARSER, LINE_JOINER);
  myResourcePatternsField.setDialogCaption("Resource patterns");
}
项目:tools-idea    文件:CommonProgramParametersPanel.java   
protected void initComponents() {
  myProgramParametersComponent = LabeledComponent.create(new RawCommandLineEditor(),
                                                         ExecutionBundle.message("run.configuration.program.parameters"));

  final JPanel panel = new JPanel(new BorderLayout());
  myWorkingDirectoryField = new TextFieldWithBrowseButton(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
      fileChooserDescriptor.setTitle(ExecutionBundle.message("select.working.directory.message"));
      fileChooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, myModuleContext);
      Project project = myModuleContext != null ? myModuleContext.getProject() : null;
      VirtualFile file = FileChooser.chooseFile(fileChooserDescriptor, myWorkingDirectoryComponent, project, null);
      if (file != null) {
        setWorkingDirectory(file.getPresentableUrl());
      }
    }
  }) {
    @Override
    protected void installPathCompletion(FileChooserDescriptor fileChooserDescriptor) {
      super.installPathCompletion(FileChooserDescriptorFactory.createSingleFolderDescriptor());
    }
  };
  panel.add(myWorkingDirectoryField, BorderLayout.CENTER);

  final FixedSizeButton button = new FixedSizeButton(myWorkingDirectoryField);
  button.setIcon(AllIcons.RunConfigurations.Variables);
  button.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      final List<String> macros = new ArrayList<String>(PathMacros.getInstance().getUserMacroNames());
      if (myHaveModuleContext) macros.add("MODULE_DIR");

      final JList list = new JBList(ArrayUtil.toStringArray(macros));
      final JBPopup popup = JBPopupFactory.getInstance().createListPopupBuilder(list).setItemChoosenCallback(new Runnable() {
        @Override
        public void run() {
          final Object value = list.getSelectedValue();
          if (value instanceof String) {
            setWorkingDirectory("$" + value + "$");
          }
        }
      }).setMovable(false).setResizable(false).createPopup();
      popup.showUnderneathOf(button);
    }
  });
  panel.add(button, BorderLayout.EAST);

  myWorkingDirectoryComponent = LabeledComponent.create(panel, ExecutionBundle.message("run.configuration.working.directory.label"));
  myEnvVariablesComponent = new EnvironmentVariablesComponent();

  myEnvVariablesComponent.setLabelLocation(BorderLayout.WEST);
  myProgramParametersComponent.setLabelLocation(BorderLayout.WEST);
  myWorkingDirectoryComponent.setLabelLocation(BorderLayout.WEST);

  addComponents();

  setPreferredSize(new Dimension(10, 10));

  setAnchor(myEnvVariablesComponent.getLabel());
}
项目:tools-idea    文件:CommonProgramParametersPanel.java   
protected void copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component) {
  final RawCommandLineEditor rawCommandLineEditor = component.getComponent();
  rawCommandLineEditor.setDialogCaption(component.getRawText());
  component.getLabel().setLabelFor(rawCommandLineEditor.getTextField());
}
项目:tools-idea    文件:CommonProgramParametersPanel.java   
public LabeledComponent<RawCommandLineEditor> getProgramParametersComponent() {
  return myProgramParametersComponent;
}
项目:tools-idea    文件:MavenRunnerPanel.java   
public JComponent createComponent() {
  JPanel panel = new JPanel(new GridBagLayout());

  GridBagConstraints c = new GridBagConstraints();
  c.fill = GridBagConstraints.HORIZONTAL;
  c.anchor = GridBagConstraints.WEST;
  c.insets.bottom = 5;

  myRunInBackgroundCheckbox = new JCheckBox("Run in background");
  myRunInBackgroundCheckbox.setMnemonic('b');
  if (!myRunConfigurationMode) {
    c.gridx = 0;
    c.gridy++;
    c.weightx = 1;
    c.gridwidth = GridBagConstraints.REMAINDER;

    panel.add(myRunInBackgroundCheckbox, c);
  }
  c.gridwidth = 1;

  JLabel labelVMParameters = new JLabel("VM Options:");
  labelVMParameters.setDisplayedMnemonic('v');
  labelVMParameters.setLabelFor(myVMParametersEditor = new RawCommandLineEditor());
  myVMParametersEditor.setDialogCaption(labelVMParameters.getText());

  c.gridx = 0;
  c.gridy++;
  c.weightx = 0;
  panel.add(labelVMParameters, c);

  c.gridx = 1;
  c.weightx = 1;
  c.insets.left = 10;
  panel.add(myVMParametersEditor, c);
  c.insets.left = 0;

  JLabel jdkLabel = new JLabel("JRE:");
  jdkLabel.setDisplayedMnemonic('j');
  jdkLabel.setLabelFor(myJdkCombo = new JComboBox());
  c.gridx = 0;
  c.gridy++;
  c.weightx = 0;
  panel.add(jdkLabel, c);
  c.gridx = 1;
  c.weightx = 1;
  c.fill = GridBagConstraints.NONE;
  c.insets.left = 10;
  panel.add(myJdkCombo, c);
  c.insets.left = 0;
  c.fill = GridBagConstraints.HORIZONTAL;

  JPanel propertiesPanel = new JPanel(new BorderLayout());
  propertiesPanel.setBorder(IdeBorderFactory.createTitledBorder("Properties", false));

  propertiesPanel.add(mySkipTestsCheckBox = new JCheckBox("Skip tests"), BorderLayout.NORTH);
  mySkipTestsCheckBox.setMnemonic('t');

  collectProperties();
  propertiesPanel.add(myPropertiesPanel = new MavenPropertiesPanel(myProperties), BorderLayout.CENTER);
  myPropertiesPanel.getEmptyText().setText("No properties defined");

  c.gridx = 0;
  c.gridy++;
  c.weightx = c.weighty = 1;
  c.gridwidth = c.gridheight = GridBagConstraints.REMAINDER;
  c.fill = GridBagConstraints.BOTH;
  panel.add(propertiesPanel, c);

  return panel;
}
项目:tools-idea    文件:PluginRunConfigurationEditor.java   
public RawCommandLineEditor getVMParameters() {
  return myVMParameters.getComponent();
}
项目:tools-idea    文件:PluginRunConfigurationEditor.java   
public RawCommandLineEditor getProgramParameters() {
  return myProgramParameters.getComponent();
}
项目:consulo    文件:ComparingUtils.java   
public static boolean isModified(RawCommandLineEditor editor, String value) {
  return !editor.getText().equals(value);
}
项目:consulo    文件:CommonProgramParametersPanel.java   
protected void copyDialogCaption(final LabeledComponent<RawCommandLineEditor> component) {
  final RawCommandLineEditor rawCommandLineEditor = component.getComponent();
  rawCommandLineEditor.setDialogCaption(component.getRawText());
  component.getLabel().setLabelFor(rawCommandLineEditor.getTextField());
}
项目:consulo    文件:CommonProgramParametersPanel.java   
public LabeledComponent<RawCommandLineEditor> getProgramParametersComponent() {
  return myProgramParametersComponent;
}
项目:consulo-java    文件:AppletConfigurable.java   
private RawCommandLineEditor getVMParametersComponent()
{
    return myVMParameters.getComponent();
}