From 0c21d4492ff606808dcd621e9fc8bc4fb6844a37 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 2 Oct 2017 20:21:00 +0200 Subject: [PATCH] IDEA-CR-25029 rename to loadUsageViewSettings to avoid runtime errors --- .../find/actions/ShowUsagesAction.java | 24 ++++--------------- .../intellij/usages/ShowUsagesSettings.java | 2 +- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesAction.java b/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesAction.java index cc17cbe91295..67eb04556f8b 100644 --- a/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesAction.java +++ b/platform/lang-impl/src/com/intellij/find/actions/ShowUsagesAction.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.find.actions; import com.intellij.codeInsight.TargetElementUtil; @@ -254,7 +240,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction { } Disposer.register(usageView, () -> { - showUsagesSettings.loadState(usageViewSettings); + showUsagesSettings.loadUsageViewSettings(usageViewSettings); usageViewSettings.loadState(savedGlobalSettings); }); @@ -693,13 +679,13 @@ public class ShowUsagesAction extends AnAction implements PopupAction { DefaultActionGroup toolbar = new DefaultActionGroup(); usageView.addFilteringActions(toolbar); - toolbar.add(UsageGroupingRuleProviderImpl.createGroupByFileStructureAction(usageView)); + toolbar.add(UsageGroupingRuleProviderImpl.createGroupByFileStructureAction(usageView)); ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.USAGE_VIEW_TOOLBAR, toolbar, true); actionToolbar.setReservePlaceAutoPopupIcon(false); final JComponent toolBar = actionToolbar.getComponent(); toolBar.setOpaque(false); builder.setSettingButton(toolBar); - builder.setCancelKeyEnabled(false); + builder.setCancelKeyEnabled(false); popup[0] = builder.createPopup(); JComponent content = popup[0].getContent(); @@ -1182,7 +1168,7 @@ public class ShowUsagesAction extends AnAction implements PopupAction { public int getRowHeight() { return super.getRowHeight() + 2 * MARGIN; } - + @NotNull @Override public Component prepareRenderer(@NotNull TableCellRenderer renderer, int row, int column) { diff --git a/platform/usageView/src/com/intellij/usages/ShowUsagesSettings.java b/platform/usageView/src/com/intellij/usages/ShowUsagesSettings.java index 8d72334aa04f..6f82487d466c 100644 --- a/platform/usageView/src/com/intellij/usages/ShowUsagesSettings.java +++ b/platform/usageView/src/com/intellij/usages/ShowUsagesSettings.java @@ -28,7 +28,7 @@ public class ShowUsagesSettings implements PersistentStateComponent