diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameStep.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameStep.java index d288f646f108..d4396a291e8b 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameStep.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameStep.java @@ -67,12 +67,14 @@ public class ProjectNameStep extends ModuleWizardStep { myNamePathComponent.getNameComponent().setSelectionEnd(initialProjectName.length()); myPanel = new JPanel(new GridBagLayout()); myPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), BorderFactory.createEmptyBorder(10, 10, 10, 10))); - myPanel.add(myNamePathComponent, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 4, 0, 0), 0, 0)); + myPanel.add(myNamePathComponent, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(10, 0, 20, 0), 0, 0)); - myPanel.add(myFormatPanel.getPanel(), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(2, 0, 0, 0), 0, 0)); + if (myWizardContext.getProject() == null) { + myNamePathComponent.add(new JLabel("Project file format:"), new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + myNamePathComponent.add(myFormatPanel.getStorageFormatComboBox(), new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + } myNamePathComponent.setVisible(myWizardContext.getProject() == null); - myFormatPanel.setVisible(myWizardContext.getProject() == null); myAdditionalContentPanel = new JPanel(new GridBagLayout()); myPanel.add(myAdditionalContentPanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); } diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.form b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.form index c0b9cbb412cd..e9cd22082c9c 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.form +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.form @@ -135,13 +135,15 @@ - + - + + + @@ -152,9 +154,9 @@ - + - + diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.java index 60d3cfe94716..1b4bb93abad3 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/ProjectNameWithTypeStep.java @@ -22,7 +22,6 @@ import com.intellij.ide.util.BrowseFilesListener; import com.intellij.ide.util.newProjectWizard.modes.WizardMode; import com.intellij.ide.util.projectWizard.ModuleBuilder; import com.intellij.ide.util.projectWizard.ProjectWizardUtil; -import com.intellij.ide.util.projectWizard.SourcePathsBuilder; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleManager; @@ -60,6 +59,7 @@ public class ProjectNameWithTypeStep extends ProjectNameStep { private JTextField myModuleName; private TextFieldWithBrowseButton myModuleContentRoot; private TextFieldWithBrowseButton myModuleFileLocation; + private JPanel myHeader; private boolean myModuleNameChangedByUser = false; private boolean myModuleNameDocListenerEnabled = true; @@ -73,8 +73,10 @@ public class ProjectNameWithTypeStep extends ProjectNameStep { public ProjectNameWithTypeStep(final WizardContext wizardContext, StepSequence sequence, final WizardMode mode) { super(wizardContext, sequence, mode); - myAdditionalContentPanel.add(myModulePanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); - myCreateModuleCb.setVisible(myWizardContext.isCreatingNewProject()); + myAdditionalContentPanel.add(myModulePanel, + new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, + GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); + myHeader.setVisible(myWizardContext.isCreatingNewProject()); myCreateModuleCb.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { UIUtil.setEnabled(myInternalPanel, myCreateModuleCb.isSelected(), true); diff --git a/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java b/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java index b51fcee51b20..888b3ad09e7b 100644 --- a/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java +++ b/java/idea-ui/src/com/intellij/ide/util/projectWizard/NamePathComponent.java @@ -81,9 +81,12 @@ public class NamePathComponent extends JPanel{ myNameLabel = new JLabel(nameLabelText); if (bold) myNameLabel.setFont(UIUtil.getLabelFont().deriveFont(Font.BOLD)); myNameLabel.setLabelFor(myTfName); - this.add(myNameLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); + Insets insets = new Insets(0, 0, 5, 0); + this.add(myNameLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, + insets, 0, 0)); - this.add(myTfName, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 8, 0), 0, 0)); + this.add(myTfName, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, + insets, 0, 0)); // todo: review texts final FileChooserDescriptor chooserDescriptor = (FileChooserDescriptor)BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR.clone(); chooserDescriptor.setHideIgnored(hideIgnored); @@ -93,11 +96,14 @@ public class NamePathComponent extends JPanel{ myIsPathChangedByUser = true; } }; - myPathPanel = new FieldPanel(myTfPath, pathLabelText, null, browseButtonActionListener, null); - final JLabel locationLabel = myPathPanel.getFieldLabel(); + myPathPanel = new FieldPanel(myTfPath, null, null, browseButtonActionListener, null); + final JLabel locationLabel = new JLabel(pathLabelText); locationLabel.setLabelFor(myTfPath); if (bold) locationLabel.setFont(UIUtil.getLabelFont().deriveFont(Font.BOLD)); - this.add(myPathPanel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(8, 0, 0, 0), 0, 0)); + this.add(locationLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, + insets, 0, 0)); + this.add(myPathPanel, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, + insets, 0, 0)); } public String getNameValue() { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java index ed0089cfbf7e..1faf2ae6d354 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleStructureConfigurable.java @@ -784,9 +784,9 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple try { final String modulePresentation = IdeBundle.message("project.new.wizard.module.identification"); final NamePathComponent component = new NamePathComponent(IdeBundle.message("label.project.name"), IdeBundle.message( - "label.component.file.location", StringUtil.capitalize(modulePresentation)), 'a', 'l', IdeBundle.message( + "label.component.file.location", StringUtil.capitalize(modulePresentation)), IdeBundle.message( "title.select.project.file.directory", modulePresentation), IdeBundle.message("description.select.project.file.directory", - StringUtil.capitalize(modulePresentation))); + StringUtil.capitalize(modulePresentation)), true, false); final DialogWrapper copyModuleDialog = new DialogWrapper(myTree, false) { { setTitle(ProjectBundle.message("copy.module.dialog.title")); diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index 118267f2eef0..a1fe8a6841fb 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -672,7 +672,7 @@ title.directory.does.not.exist=Directory Does Not Exist error.failed.to.create.directory=Failed to create directory \"{0}\" label.select.compiler.output.path=Select c&ompiler output path: title.select.compiler.output.path=Select compiler output path -label.project.name=N&ame: +label.project.name=Project n&ame: label.component.file.location={0} file &location: label.project.files.location=Project files &location: title.select.project.file.directory=Select {0} file directory diff --git a/platform/platform-resources-en/src/messages/ProjectBundle.properties b/platform/platform-resources-en/src/messages/ProjectBundle.properties index 64f212124017..01822eb200a8 100644 --- a/platform/platform-resources-en/src/messages/ProjectBundle.properties +++ b/platform/platform-resources-en/src/messages/ProjectBundle.properties @@ -393,7 +393,7 @@ project.new.wizard.import.title=Import {0} from external &model project.new.wizard.import.description=Create {0} {1} structure over existing external model ({2}) project.new.wizard.from.existent.sources.title=Create {0} from &existing sources project.new.wizard.from.existent.sources.description=Create {0} {1} structure over existing sources -project.new.wizard.module.name.title=Na&me: +project.new.wizard.module.name.title=Module na&me: project.new.wizard.module.root.title=Content &root: project.new.wizard.module.file.title=Module &file location: