Skip to content

Commit 765b039

Browse files
authored
Enable envars for run configs (#6765)
Fixes #6746
1 parent 852aa41 commit 765b039

File tree

2 files changed

+12
-26
lines changed

2 files changed

+12
-26
lines changed

flutter-idea/src/io/flutter/run/FlutterConfigurationEditorForm.form

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@
4242
</constraints>
4343
<properties/>
4444
</component>
45-
<component id="9a5c8" class="javax.swing.JLabel">
46-
<constraints>
47-
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
48-
</constraints>
49-
<properties>
50-
<enabled value="false"/>
51-
<text value="An optional build flavor; either a Gradle product flavor or an Xcode custom scheme."/>
52-
</properties>
53-
</component>
5445
<component id="45360" class="javax.swing.JLabel">
5546
<constraints>
5647
<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"/>
@@ -65,7 +56,7 @@
6556
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
6657
</constraints>
6758
<properties>
68-
<margin top="1" left="6" bottom="1" right="27"/>
59+
<margin top="2" left="6" bottom="2" right="29"/>
6960
<text value=""/>
7061
</properties>
7162
</component>
@@ -93,7 +84,7 @@
9384
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
9485
</constraints>
9586
<properties>
96-
<margin top="1" left="6" bottom="1" right="27"/>
87+
<margin top="2" left="6" bottom="2" right="29"/>
9788
</properties>
9889
</component>
9990
<component id="42996" class="javax.swing.JLabel">
@@ -143,7 +134,16 @@
143134
</constraints>
144135
<properties>
145136
<enabled value="false"/>
146-
<text value="Additional environment variables; only valid for desktop apps"/>
137+
<text value="Additional environment variables."/>
138+
</properties>
139+
</component>
140+
<component id="9a5c8" class="javax.swing.JLabel">
141+
<constraints>
142+
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
143+
</constraints>
144+
<properties>
145+
<enabled value="false"/>
146+
<text value="An optional build flavor; either a Gradle product flavor or an Xcode custom scheme."/>
147147
</properties>
148148
</component>
149149
</children>

flutter-idea/src/io/flutter/run/FlutterConfigurationEditorForm.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,8 @@ public class FlutterConfigurationEditorForm extends SettingsEditor<SdkRunConfig>
3434
private EnvironmentVariablesTextFieldWithBrowseButton myEnvironmentVariables;
3535
private JLabel myEnvvarLabel;
3636

37-
private static final List<String> DESKTOP_PLATFORMS =
38-
Lists.newArrayList("enable-linux-desktop", "enable-macos-desktop", "enable-windows-desktop", "enable-windows-uwp-desktop");
39-
4037
public FlutterConfigurationEditorForm(final Project project) {
4138
initDartFileTextWithBrowse(project, myFileField);
42-
final FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
43-
if (sdk != null) {
44-
final Set<String> platforms = sdk.queryConfiguredPlatforms(true);
45-
for (String platform : platforms) {
46-
if (DESKTOP_PLATFORMS.contains(platform)) {
47-
return;
48-
}
49-
}
50-
}
51-
myEnvironmentVariables.setEnabled(false);
52-
myEnvvarLabel.setEnabled(false);
5339
}
5440

5541
@Override

0 commit comments

Comments
 (0)