Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Fixed

- Silent failure when opening Flutter projects without `.idea` directory in IntelliJ IDEA, by removing `FlutterProjectOpenProcessor` and migrating configuration logic to `FlutterInitializer`. (#8845)

## 90.0.0

### Added
Expand Down
2 changes: 0 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@
<!-- See https://github.com/flutter/flutter-intellij/issues/8029 -->
<projectService serviceImplementation="io.flutter.view.InspectorView" overrides="false"/>

<projectOpenProcessor id="flutter" implementation="io.flutter.project.FlutterProjectOpenProcessor" order="first"/>

<editorNotificationProvider implementation="io.flutter.editor.FlutterPubspecNotificationProvider"/>
<editorNotificationProvider implementation="io.flutter.inspections.SdkConfigurationNotificationProvider"/>
<editorNotificationProvider implementation="io.flutter.editor.NativeEditorNotificationProvider"/>
Expand Down
14 changes: 12 additions & 2 deletions src/io/flutter/FlutterInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@
* Runs actions after the project has started up and the index is up to date.
*
* @see ProjectOpenActivity for actions that run earlier.
* @see io.flutter.project.FlutterProjectOpenProcessor for additional actions that
* may run when a project is being imported.
*/
public class FlutterInitializer extends FlutterProjectActivity {
private boolean toolWindowsInitialized = false;
Expand Down Expand Up @@ -97,6 +95,18 @@ public void executeProjectStartup(@NotNull Project project) {
// Start a DevTools server
DevToolsService.getInstance(project);

// Ensure Flutter project configuration is applied for projects that may have been
// opened without a .idea directory. Previously this was handled by FlutterProjectOpenProcessor,
// but that processor silently failed when no delegate processor could open the project.
// Instead, we let the platform open the project normally and apply our configuration here.
// See https://github.com/flutter/flutter-intellij/issues/8661 (Android Studio equivalent)
for (Module module : FlutterModuleUtils.getModules(project)) {
if (FlutterModuleUtils.declaresFlutter(module) && !FlutterModuleUtils.isFlutterModule(module)) {
log().info("Fixing Flutter module configuration for " + module.getName());
FlutterModuleUtils.setFlutterModuleAndReload(module, project);
}
}

// If the project declares a Flutter dependency, do some extra initialization.
boolean hasFlutterModule = false;

Expand Down
107 changes: 0 additions & 107 deletions src/io/flutter/project/FlutterProjectOpenProcessor.kt

This file was deleted.

Loading