File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
flutter-idea/src/io/flutter/run Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 49
49
import org .jetbrains .annotations .NotNull ;
50
50
import org .jetbrains .annotations .Nullable ;
51
51
52
+ import java .lang .reflect .Field ;
52
53
import java .util .ArrayList ;
53
54
import java .util .Arrays ;
54
55
import java .util .List ;
@@ -148,12 +149,22 @@ protected RunContentDescriptor launch(@NotNull ExecutionEnvironment env) throws
148
149
}
149
150
150
151
final FlutterLaunchMode launchMode = FlutterLaunchMode .fromEnv (env );
152
+ final RunContentDescriptor descriptor ;
151
153
if (launchMode .supportsDebugConnection ()) {
152
- return createDebugSession (env , app , result ).getRunContentDescriptor ();
154
+ descriptor = createDebugSession (env , app , result ).getRunContentDescriptor ();
153
155
}
154
156
else {
155
- return new RunContentBuilder (result , env ).showRunContent (env .getContentToReuse ());
157
+ descriptor = new RunContentBuilder (result , env ).showRunContent (env .getContentToReuse ());
156
158
}
159
+ try {
160
+ final Field f = descriptor .getClass ().getDeclaredField ("myDisplayName" );
161
+ f .setAccessible (true );
162
+ f .set (descriptor , descriptor .getDisplayName () + " (" + device .deviceName () + ")" );
163
+ }
164
+ catch (IllegalAccessException | NoSuchFieldException e ) {
165
+ LOG .info (e );
166
+ }
167
+ return descriptor ;
157
168
}
158
169
159
170
private static Class classForName (String className ) {
You can’t perform that action at this time.
0 commit comments