mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
New Flex IDE project wizard
This commit is contained in:
+4
-4
@@ -21,7 +21,7 @@
|
||||
</clientProperties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<scrollpane id="d8de8" class="com.intellij.ui.components.JBScrollPane">
|
||||
<scrollpane id="d8de8" class="com.intellij.ui.components.JBScrollPane" binding="myModuleTypeScrollPane">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<gridbag top="0" left="0" bottom="0" right="5" weightx="0.1" weighty="1.0"/>
|
||||
@@ -38,7 +38,7 @@
|
||||
</component>
|
||||
</children>
|
||||
</scrollpane>
|
||||
<component id="fb71" class="javax.swing.JLabel">
|
||||
<component id="fb71" class="javax.swing.JLabel" binding="myModuleTypeLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<gridbag top="10" left="0" bottom="2" right="0" weightx="0.0" weighty="0.0"/>
|
||||
@@ -47,7 +47,7 @@
|
||||
<text resource-bundle="messages/ProjectBundle" key="project.new.wizard.select.type.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="9073d" class="javax.swing.JLabel">
|
||||
<component id="9073d" class="javax.swing.JLabel" binding="myDescriptionLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<gridbag top="10" left="0" bottom="2" right="0" weightx="0.0" weighty="0.0"/>
|
||||
@@ -56,7 +56,7 @@
|
||||
<text resource-bundle="messages/ProjectBundle" key="project.new.wizard.description.title"/>
|
||||
</properties>
|
||||
</component>
|
||||
<scrollpane id="6260" class="com.intellij.ui.components.JBScrollPane">
|
||||
<scrollpane id="6260" class="com.intellij.ui.components.JBScrollPane" binding="myDescriptionScrollPane">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<gridbag weightx="0.8" weighty="0.0"/>
|
||||
|
||||
+32
-7
@@ -53,7 +53,7 @@ import java.util.List;
|
||||
public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
private JEditorPane myModuleDescriptionPane;
|
||||
private JList myTypesList;
|
||||
private JCheckBox myCreateModuleCb;
|
||||
protected JCheckBox myCreateModuleCb;
|
||||
private JPanel myModulePanel;
|
||||
private JPanel myInternalPanel;
|
||||
private JTextField myModuleName;
|
||||
@@ -61,6 +61,11 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
private TextFieldWithBrowseButton myModuleFileLocation;
|
||||
private JPanel myHeader;
|
||||
|
||||
private JLabel myModuleTypeLabel;
|
||||
private JLabel myDescriptionLabel;
|
||||
private JBScrollPane myModuleTypeScrollPane;
|
||||
private JBScrollPane myDescriptionScrollPane;
|
||||
|
||||
private boolean myModuleNameChangedByUser = false;
|
||||
private boolean myModuleNameDocListenerEnabled = true;
|
||||
|
||||
@@ -179,8 +184,9 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
myModuleNameChangedByUser = true;
|
||||
}
|
||||
String path = getDefaultBaseDir(wizardContext);
|
||||
if (path.length() > 0 && !Comparing.strEqual(myModuleName.getText().trim(), myNamePathComponent.getNameValue())) {
|
||||
path += "/" + myModuleName.getText();
|
||||
final String moduleName = getModuleName();
|
||||
if (path.length() > 0 && !Comparing.strEqual(moduleName, myNamePathComponent.getNameValue())) {
|
||||
path += "/" + moduleName;
|
||||
}
|
||||
if (!myContentRootChangedByUser) {
|
||||
final boolean f = myModuleNameChangedByUser;
|
||||
@@ -320,8 +326,10 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
super.updateDataModel();
|
||||
final ModuleBuilder builder = (ModuleBuilder)myMode.getModuleBuilder();
|
||||
assert builder != null;
|
||||
builder.setName(myModuleName.getText());
|
||||
builder.setModuleFilePath(FileUtil.toSystemIndependentName(myModuleFileLocation.getText()) + "/" + myModuleName.getText() + ModuleFileType.DOT_DEFAULT_EXTENSION);
|
||||
final String moduleName = getModuleName();
|
||||
builder.setName(moduleName);
|
||||
builder.setModuleFilePath(
|
||||
FileUtil.toSystemIndependentName(myModuleFileLocation.getText()) + "/" + moduleName + ModuleFileType.DOT_DEFAULT_EXTENSION);
|
||||
builder.setContentEntryPath(FileUtil.toSystemIndependentName(myModuleContentRoot.getText()));
|
||||
} else {
|
||||
mySequence.setType(null);
|
||||
@@ -329,12 +337,12 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
}
|
||||
}
|
||||
|
||||
private String getSelectedBuilderId() {
|
||||
protected String getSelectedBuilderId() {
|
||||
return ((ModuleBuilder)myTypesList.getSelectedValue()).getBuilderId();
|
||||
}
|
||||
|
||||
public boolean validate() throws ConfigurationException {
|
||||
final String moduleName = myModuleName.getText().trim();
|
||||
final String moduleName = getModuleName();
|
||||
if (myCreateModuleCb.isSelected() || !myWizardContext.isCreatingNewProject()) {
|
||||
final String moduleFileDirectory = myModuleFileLocation.getText();
|
||||
if (moduleFileDirectory.length() == 0) {
|
||||
@@ -397,4 +405,21 @@ public class ProjectNameWithTypeStep extends ProjectNameStep {
|
||||
public String getHelpId() {
|
||||
return "reference.dialogs.new.project.fromScratch";
|
||||
}
|
||||
|
||||
protected String getModuleName() {
|
||||
return myModuleName.getText().trim();
|
||||
}
|
||||
|
||||
protected void addModuleNameListener(final DocumentListener listener) {
|
||||
myModuleName.getDocument().addDocumentListener(listener);
|
||||
}
|
||||
|
||||
protected void replaceModuleTypeOptions(final Component component) {
|
||||
myModuleTypeLabel.setVisible(false);
|
||||
myDescriptionLabel.setVisible(false);
|
||||
myModuleTypeScrollPane.setVisible(false);
|
||||
myDescriptionScrollPane.setVisible(false);
|
||||
myInternalPanel.add(component, new GridBagConstraints(0, 2, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||
new Insets(10, 0, 0, 0), 0, 0));
|
||||
}
|
||||
}
|
||||
@@ -968,6 +968,7 @@
|
||||
<projectService serviceImplementation="com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurable"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.roots.ui.configuration.ProjectSettingsService"
|
||||
serviceImplementation="com.intellij.openapi.roots.ui.configuration.IdeaProjectSettingsService"/>
|
||||
<wizardMode implementation="com.intellij.ide.util.newProjectWizard.modes.CreateFromScratchMode" order="first"/>
|
||||
</extensions>
|
||||
|
||||
</idea-plugin>
|
||||
|
||||
@@ -268,7 +268,6 @@
|
||||
<codeStyleSettingsProvider implementation="com.intellij.application.options.CommonCodeStyleSettingsProvider"/>
|
||||
|
||||
<!-- new project wizard -->
|
||||
<wizardMode implementation="com.intellij.ide.util.newProjectWizard.modes.CreateFromScratchMode"/>
|
||||
<wizardMode implementation="com.intellij.ide.util.newProjectWizard.modes.CreateFromSourcesMode"/>
|
||||
<wizardMode implementation="com.intellij.ide.util.newProjectWizard.modes.ImportMode"/>
|
||||
<wizardMode implementation="com.intellij.ide.util.newProjectWizard.modes.ImportImlMode"/>
|
||||
|
||||
Reference in New Issue
Block a user