From f98ab7e3ecfdde9e6107097b053226884c57ab43 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Fri, 2 Aug 2024 20:00:52 +0200 Subject: [PATCH] fix deprecated api --- .../erlang/hierarchy/ErlangCallHierarchyProvider.java | 2 +- .../intellij/erlang/navigation/ErlangGotoSuperHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/intellij/erlang/hierarchy/ErlangCallHierarchyProvider.java b/src/org/intellij/erlang/hierarchy/ErlangCallHierarchyProvider.java index 6f6590657..85a330c2a 100644 --- a/src/org/intellij/erlang/hierarchy/ErlangCallHierarchyProvider.java +++ b/src/org/intellij/erlang/hierarchy/ErlangCallHierarchyProvider.java @@ -102,7 +102,7 @@ protected HierarchyTreeStructure createHierarchyTreeStructure(@NotNull String ty @Override protected Comparator> getComparator() { HierarchyBrowserManager.State state = HierarchyBrowserManager.getInstance(myProject).getState(); - return state != null && state.SORT_ALPHABETICALLY ? AlphaComparator.INSTANCE : SourceComparator.INSTANCE; + return state != null && state.SORT_ALPHABETICALLY ? AlphaComparator.getInstance() : SourceComparator.INSTANCE; } } } diff --git a/src/org/intellij/erlang/navigation/ErlangGotoSuperHandler.java b/src/org/intellij/erlang/navigation/ErlangGotoSuperHandler.java index 1f7bfcb69..0dfc8111a 100644 --- a/src/org/intellij/erlang/navigation/ErlangGotoSuperHandler.java +++ b/src/org/intellij/erlang/navigation/ErlangGotoSuperHandler.java @@ -52,7 +52,7 @@ public void invoke(@NotNull Project project, @NotNull Editor editor, @NotNull Ps List callbackSpecs = ErlangNavigationUtil.getCallbackSpecs(function); String presentation = ErlangPsiImplUtil.createFunctionPresentation(function); - PsiElementListNavigator.openTargets(editor, getNavigatables(presentation, callbackSpecs), "Go to callback specification", presentation, new DefaultPsiElementCellRenderer()); + PsiElementListNavigator.openTargets(editor, getNavigatables(presentation, callbackSpecs), "Go to Callback Specification", presentation, new DefaultPsiElementCellRenderer(), null); } @Override @@ -67,6 +67,6 @@ private static NavigatablePsiElement[] getNavigatables(String targetPresentation ContainerUtil.addIfNotNull(navigatables, ErlangNavigationUtil.getNavigatableSpecFun(targetPresentation, specFun)); } - return navigatables.toArray(new NavigatablePsiElement[navigatables.size()]); + return navigatables.toArray(new NavigatablePsiElement[0]); } }