IDEA-101109 Impossible to import Flash Builder project via Import Project -> select .project file

This commit is contained in:
Dmitry Avdeev
2013-02-22 12:52:13 +04:00
parent f3f3a740d0
commit 2a07369c53
2 changed files with 8 additions and 9 deletions
@@ -3,7 +3,7 @@
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="269"/>
<xy x="20" y="20" width="500" height="171"/>
</constraints>
<properties/>
<border type="none"/>
@@ -24,7 +24,7 @@
<text resource-bundle="messages/ProjectBundle" key="project.new.wizard.import.title"/>
</properties>
</component>
<grid id="b4cdc" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="b4cdc" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -49,11 +49,6 @@
</component>
</children>
</scrollpane>
<vspacer id="65df7">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
</children>
</grid>
</children>
@@ -32,6 +32,7 @@ import com.intellij.ui.DoubleClickListener;
import com.intellij.ui.components.JBList;
import com.intellij.ui.components.JBRadioButton;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -50,6 +51,7 @@ public class ImportChooserStep extends ProjectImportWizardStep {
private final ProjectImportProvider[] myProviders;
private final StepSequence mySequence;
@Nullable
private ProjectImportProvider myFromSourcesProvider;
private JBList myList;
private JPanel myPanel;
@@ -73,7 +75,9 @@ public class ImportChooserStep extends ProjectImportWizardStep {
model.addElement(provider);
}
}
if (myFromSourcesProvider == null) {
myCreateFromSources.setVisible(false);
}
myList.setModel(model);
myList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
myList.setCellRenderer(new DefaultListCellRenderer() {
@@ -121,7 +125,7 @@ public class ImportChooserStep extends ProjectImportWizardStep {
if (myList.getSelectedValue() != null) return;
final String id = PropertiesComponent.getInstance().getValue(PREFERRED);
if (id == null || id.equals(myFromSourcesProvider.getId())) {
if (id == null || myFromSourcesProvider != null && id.equals(myFromSourcesProvider.getId())) {
myCreateFromSources.setSelected(true);
}
else {