Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public NativeEditorNotificationProvider(@NotNull Project project) {
}

@Nullable
private EditorNotificationPanel createPanelForAction(@NotNull FileEditor fileEditor, @NotNull VirtualFile root, @Nullable String actionName) {
private EditorNotificationPanel createPanelForAction(@NotNull FileEditor fileEditor,
@NotNull VirtualFile root,
@Nullable String actionName) {
if (actionName == null) {
return null;
}
Expand Down Expand Up @@ -113,7 +115,9 @@ class NativeEditorActionsPanel extends EditorNotificationPanel {
text("Flutter commands");

// Ensure this project is a Flutter project by updating the menu action. It will only be visible for Flutter projects.
myAction.update(AnActionEvent.createFromDataContext(ActionPlaces.EDITOR_TOOLBAR, myAction.getTemplatePresentation(), makeContext()));
myAction.update(
AnActionEvent.createEvent(makeContext(), myAction.getTemplatePresentation(), ActionPlaces.EDITOR_TOOLBAR, ActionUiKind.NONE, null));

isVisible = myAction.getTemplatePresentation().isVisible();
createActionLabel(myAction.getTemplatePresentation().getText(), this::performAction)
.setToolTipText(myAction.getTemplatePresentation().getDescription());
Expand All @@ -134,7 +138,7 @@ private boolean isValidForFile() {
private void performAction() {
// Open Xcode or Android Studio. If already running AS then just open a new window.
myAction.actionPerformed(
AnActionEvent.createFromDataContext(ActionPlaces.EDITOR_TOOLBAR, myAction.getTemplatePresentation(), makeContext()));
AnActionEvent.createEvent(makeContext(), myAction.getTemplatePresentation(), ActionPlaces.EDITOR_TOOLBAR, ActionUiKind.NONE, null));
}

private DataContext makeContext() {
Expand Down