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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Next
- Resolve "Exception: Cannot invoke "org..AnAction.getTemplatePresentation()" exception (#7488)
- Resolve Released EditorImpl held by lambda in FlutterReloadManager (#7507)
- Configure the Project view for Flutter in AS, when creating a new Flutter project (#4470)
- Migrate to Kotlin UI DSL Version 2 (#7310)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,35 @@ public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file
return createPanelForFile(file, findRootDir(file, project.getBaseDir()));
}

private EditorNotificationPanel createPanelForFile(VirtualFile file, VirtualFile root) {
@Nullable
private EditorNotificationPanel createPanelForFile(@NotNull VirtualFile file, @Nullable VirtualFile root) {
if (root == null) {
return null;
}
return createPanelForAction(file, root, getActionName(root));
}

private EditorNotificationPanel createPanelForAction(VirtualFile file, VirtualFile root, String actionName) {
@Nullable
private EditorNotificationPanel createPanelForAction(@NotNull VirtualFile file, @NotNull VirtualFile root, @Nullable String actionName) {
if (actionName == null) {
return null;
}
final NativeEditorActionsPanel panel = new NativeEditorActionsPanel(file, root, actionName);
return panel.isValidForFile() ? panel : null;
}

private static String getActionName(VirtualFile root) {
@Nullable
private static String getActionName(@Nullable VirtualFile root) {
if (root == null) {
return null;
}

if (root.getName().equals("android")) {
return "flutter.androidstudio.open";
}
else if (root.getName().equals("ios")) {
// See https://github.com/flutter/flutter-intellij/issues/7103
//if (root.getName().equals("android")) {
// return "flutter.androidstudio.open";
//}
//else
if (root.getName().equals("ios")) {
return "flutter.xcode.open";
}
else if (root.getName().equals("macos")) {
Expand Down
1 change: 1 addition & 0 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<![CDATA[
<h1>Next</h1>
<ul>
<li>Resolve &quot;Exception: Cannot invoke &quot;org..AnAction.getTemplatePresentation()&quot; exception (#7488)</li>
<li>Resolve Released EditorImpl held by lambda in FlutterReloadManager (#7507)</li>
<li>Configure the Project view for Flutter in AS, when creating a new Flutter project (#4470)</li>
<li>Migrate to Kotlin UI DSL Version 2 (#7310)</li>
Expand Down