Commit ce265cb
authored
Make the run buttons in editor toolbar more context-aware (#898)
* Make the run buttons in editor toolbar more context-aware
- If the file has a main() method, run it
- If the file is a test file, delegate to Test Runner
- If neither has a main() method nor is a test file, try to launch as a
project
- If both has a main() method and is a test file, let the user to
choose
Signed-off-by: Sheng Chen <sheche@microsoft.com>
* fix build error
Signed-off-by: Sheng Chen <sheche@microsoft.com>
* Can search the main classes in the whole workspace
Signed-off-by: Sheng Chen <sheche@microsoft.com>
* Show project name as the option detail
Signed-off-by: Sheng Chen <sheche@microsoft.com>
* Address the comments
* Remove unused import1 parent 0f6ad59 commit ce265cb
3 files changed
+63
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
267 | 306 | | |
268 | 307 | | |
269 | 308 | | |
270 | 309 | | |
271 | 310 | | |
272 | 311 | | |
273 | | - | |
| 312 | + | |
274 | 313 | | |
275 | 314 | | |
276 | 315 | | |
| |||
287 | 326 | | |
288 | 327 | | |
289 | 328 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 329 | + | |
307 | 330 | | |
308 | 331 | | |
309 | 332 | | |
310 | 333 | | |
311 | 334 | | |
312 | 335 | | |
313 | 336 | | |
314 | | - | |
| 337 | + | |
315 | 338 | | |
316 | 339 | | |
317 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
0 commit comments