Skip to content

Restore Project Structure editor #1983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2018
Merged

Restore Project Structure editor #1983

merged 1 commit into from
Mar 26, 2018

Conversation

stevemessick
Copy link
Member

Allow the Project Structure menu item to show up in Android Studio. Tested by building a 3.0 plugin and installing it into AS 3.0.1, and by running debuggable AS from sources.

It still uses the one that comes with IntelliJ, so needs some work, but at least it can be used to add (non-Dart) dependencies to Flutter modules. There is some code that is commented-out that will be useful in fixing up support for the new one (I hope).

@devoncarew @pq

@devoncarew
Copy link
Member

I don't think I have enough context here why we're adding the menu item back into Android Studio - let's plan to discuss ~tomorrow am.

@@ -30,5 +31,6 @@ public void runActivity(@NotNull Project project) {
// The IntelliJ version of this action spawns a new process for Android Studio.
// Since we're already running Android Studio we want to simply open the project in the current process.
replaceAction("flutter.androidstudio.open", new OpenAndroidModule());
replaceAction("ShowProjectStructureSettings", new FlutterShowStructureSettingsAction());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only do this replace if the given project is a Flutter project? We have some utils for detecting this, that look inside the pubspec.yaml file.

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should guard the action replacement with some code to verify that this is only done on a flutter project.

@devoncarew
Copy link
Member

I also think we should investigate ways we can get the new, JAVA_MODULE based flutter project type to be closer to something that Android Studio is happy with.

@stevemessick
Copy link
Member Author

I have implemented the guard clause and will add it with the next PR.

@stevemessick stevemessick reopened this Mar 26, 2018
@stevemessick stevemessick merged commit 8d6615e into master Mar 26, 2018
@stevemessick stevemessick deleted the edit-structure branch March 26, 2018 19:55
devoncarew pushed a commit that referenced this pull request Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants