From 5f8f9d8369919230435505a823c1e3916cceddbf Mon Sep 17 00:00:00 2001 From: ShadelessFox Date: Fri, 1 Mar 2024 09:35:55 +0100 Subject: [PATCH] Application: Compilation fix --- .../platform/ui/editors/stack/EditorStackManager.java | 1 + .../shade/platform/ui/menus/impl/MenuManagerImpl.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/editors/stack/EditorStackManager.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/editors/stack/EditorStackManager.java index e380efcb2..9a2d3b5d1 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/editors/stack/EditorStackManager.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/editors/stack/EditorStackManager.java @@ -829,6 +829,7 @@ private void paintOnboarding(@NotNull Graphics2D g2) { height += spacing; } + // To make the text positioned relatively to the center of the window, not the editor stack final var parent = getParent(); final int deltaX = parent.getWidth() - getWidth(); final int deltaY = parent.getHeight() - getHeight(); diff --git a/modules/platform-ui/src/main/java/com/shade/platform/ui/menus/impl/MenuManagerImpl.java b/modules/platform-ui/src/main/java/com/shade/platform/ui/menus/impl/MenuManagerImpl.java index 402bd21b5..a1f954a90 100644 --- a/modules/platform-ui/src/main/java/com/shade/platform/ui/menus/impl/MenuManagerImpl.java +++ b/modules/platform-ui/src/main/java/com/shade/platform/ui/menus/impl/MenuManagerImpl.java @@ -79,6 +79,17 @@ public void update(@NotNull JToolBar toolBar) { } } + @Nullable + @Override + public MenuItemRegistration findItem(@NotNull String id) { + for (var contribution : contributedItems) { + if (contribution.metadata().id().equals(id)) { + return contribution.metadata(); + } + } + + return null; + } @NotNull private JMenuBar createMenuBar(@NotNull String id, @NotNull DataContext context) {