Open jaumard opened 5 years ago
if I click on iOS folder I have the flutter menu but disabled ^^
As a workaround we can navigate to the example/ios/Runner.xworkspace and the menu is working
@jaumard: can add a screenshot of your project structure?
Which screen on project structure ? this one @pq?
Oh sorry, no. I mean the "Modules" one.
No problem ^^ here it is
Ok, this confirms what I thought. As a rule, things would work much better if each plugin you are working on was imported as its own module. Ideally we could do this for you (or offer to) when you open the "plugins" directory.
@stevemessick : do you think this is the right approach? Alternatively, we could hack the Open actions but that seems a little hacky...
@pq Thanks for tracking down the root cause.
Unfortunately, each plugin needs to be opened as a top-level project. We have to do a lot of path traversal to support various functions, such as "Open for editing in Android Studio". Someday we'll revisit that code but I don't think it will be soon enough to help this case. If you want to keep working this way you can; some things won't work (like the suggestion below) but much will.
While this won't help for Xcode, you can enable an option (for each project) to allow editing of Android Java & Kotlin code in the same window as the Flutter code. You'll need to have the plugin open as a top-level project. (You might want to set the System Setting "Open project in new window".) Open the Flutter plugin preferences and set this checkmark, then restart:
We don't enable it by default because most people don't want to wait for Gradle analysis. If you're wondering why we can't do that for Xcode, it would require us rewriting Xcode in IntelliJ (which isn't going to happen) or getting JetBrains to package their AppCode product as a plugin that we could add to Android Studio (or vice versa), which has only slightly better odds of happening.
Basically I'm working on flutter plugins and it's a bit annoying to not be able to right click on the plugin to go to Xcode or AS.