Skip to content

Conversation

helin24
Copy link
Member

@helin24 helin24 commented Oct 17, 2025

I think this fixes #7599.

I checked that I can now use Tools > Flutter > Open Android module in Android Studio, and made sure this works with a new project and an existing project. There may be more testing needed, e.g. is this supposed to work in IntelliJ also?

If we want to use this again, we should probably also re-enable a menu when a user right clicks the android subdirectory, and update comments related to dd5a521

@helin24 helin24 requested review from jwren and pq October 17, 2025 21:00
Copy link
Collaborator

@pq pq left a comment

Choose a reason for hiding this comment

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

Cool!

if (target != null) {
GradleProjectImporter gradleImporter = GradleProjectImporter.getInstance();
gradleImporter.importAndOpenProjectCore(null, true, projectFile);
com.intellij.ide.impl.ProjectUtil.openOrImport(projectFile.toNioPath(), OpenProjectTask.build().withForceOpenInNewFrame(forceOpenInNewFrame));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd be inclined to replace this qualified name with an import statement? Or maybe there's some reason not to?

Copy link
Member Author

Choose a reason for hiding this comment

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

After looking into this more, I think my solution is wrong because this method openOrImport is already being imported statically and is used below. There's some additional complexity here about whether a directory should be opened as though it's a project in itself or as a sub-project, but I'm not sure what all of the consequences are. I think I'll mark this PR a draft for now.

@pq
Copy link
Collaborator

pq commented Oct 17, 2025

I haven't dug in but the new build failure seems surprising?

@helin24 helin24 marked this pull request as draft October 20, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Open Android module in Android Studio" & "Open iOS module in Xcode" missing after upgrading 80.x

2 participants