Skip to content
Closed
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
14 changes: 12 additions & 2 deletions src/io/flutter/editor/WidgetIndentsHighlightingPassFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class WidgetIndentsHighlightingPassFactory implements TextEditorHighlight

private final Project project;
private final FlutterDartAnalysisServer flutterDartAnalysisService;
private final InspectorGroupManagerService inspectorGroupManagerService;
private /*final*/ InspectorGroupManagerService inspectorGroupManagerService;
private final EditorMouseEventService editorEventService;
private final EditorPositionService editorPositionService;
private final ActiveEditorsOutlineService editorOutlineService;
Expand All @@ -63,7 +63,16 @@ public WidgetIndentsHighlightingPassFactory(@NotNull Project project) {
this.project = project;
flutterDartAnalysisService = FlutterDartAnalysisServer.getInstance(project);
this.editorOutlineService = ActiveEditorsOutlineService.getInstance(project);
this.inspectorGroupManagerService = InspectorGroupManagerService.getInstance(project);
if (!project.getClass().getSimpleName().startsWith("Embed")) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have a cleaner solution for this.
Can't we instead make InspectorGrpuManagerService.getInstance(project) more robust so we don't have to skip it?

// This class is registered as a <project-component> in plugin.xml, therefore this constructor
// runs as a result of the call to Project.init() in AndroidModuleLibraryManager.EmbeddedAndroidProject.
// An EmbeddedAndroidProject is created to drive Gradle sync's on the Android module that is part
// of a Flutter project, but only if the experimental option is turned on. Downstream of the following
// line an IDE frame is created, which results in an empty, un-closeable window being created.
// This has been reported a few times and is affecting all users who enable Java indexing.
// See https://github.com/flutter/flutter-intellij/issues/4217
this.inspectorGroupManagerService = InspectorGroupManagerService.getInstance(project);
}
this.editorEventService = EditorMouseEventService.getInstance(project);
this.editorPositionService = EditorPositionService.getInstance(project);
this.settingsListener = new SettingsListener();
Expand Down Expand Up @@ -277,6 +286,7 @@ class PlaceholderHighlightingPass extends TextEditorHighlightingPass {
super(project, document, isRunIntentionPassAfter);
}

@Override
public void doCollectInformation(@NotNull ProgressIndicator indicator) {
}

Expand Down