mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Visibility fixes in UsagesViewImpl and UsagesViewManagerImpl (IDEA-CR-17463)
This commit is contained in:
@@ -164,7 +164,7 @@ public class UsageViewImpl implements UsageView {
|
||||
private final UsageViewTreeCellRenderer myUsageViewTreeCellRenderer;
|
||||
private Usage myOriginUsage;
|
||||
|
||||
UsageViewImpl(@NotNull final Project project,
|
||||
public UsageViewImpl(@NotNull final Project project,
|
||||
@NotNull UsageViewPresentation presentation,
|
||||
@NotNull UsageTarget[] targets,
|
||||
Factory<UsageSearcher> usageSearcherFactory) {
|
||||
@@ -660,6 +660,10 @@ public class UsageViewImpl implements UsageView {
|
||||
return actionToolbar.getComponent();
|
||||
}
|
||||
|
||||
protected boolean isPreviewUsageActionEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private JComponent createFiltersToolbar() {
|
||||
final DefaultActionGroup group = new DefaultActionGroup();
|
||||
@@ -670,7 +674,9 @@ public class UsageViewImpl implements UsageView {
|
||||
}
|
||||
|
||||
addFilteringActions(group);
|
||||
group.add(new PreviewUsageAction(this));
|
||||
if (isPreviewUsageActionEnabled()) {
|
||||
group.add(new PreviewUsageAction(this));
|
||||
}
|
||||
|
||||
group.add(new SortMembersAlphabeticallyAction(this));
|
||||
return toUsageViewToolbar(group);
|
||||
@@ -699,7 +705,7 @@ public class UsageViewImpl implements UsageView {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private AnAction[] createActions() {
|
||||
protected AnAction[] createActions() {
|
||||
final TreeExpander treeExpander = new TreeExpander() {
|
||||
@Override
|
||||
public void expandAll() {
|
||||
@@ -983,7 +989,7 @@ public class UsageViewImpl implements UsageView {
|
||||
doReRun();
|
||||
}
|
||||
|
||||
private void doReRun() {
|
||||
protected void doReRun() {
|
||||
close();
|
||||
com.intellij.usages.UsageViewManager.getInstance(getProject()).
|
||||
searchAndShowUsages(myTargets, myUsageSearcherFactory, true, true, myPresentation, null);
|
||||
@@ -1323,7 +1329,7 @@ public class UsageViewImpl implements UsageView {
|
||||
return new MyPerformOperationRunnable(cannotMakeString, processRunnable, commandName, checkReadOnlyStatus);
|
||||
}
|
||||
|
||||
private boolean allTargetsAreValid() {
|
||||
protected boolean allTargetsAreValid() {
|
||||
for (UsageTarget target : myTargets) {
|
||||
if (!target.isValid()) {
|
||||
return false;
|
||||
|
||||
@@ -197,7 +197,7 @@ public class UsageViewManagerImpl extends UsageViewManager {
|
||||
}
|
||||
}
|
||||
|
||||
private static void appendUsages(@NotNull final Usage[] foundUsages, @NotNull final UsageViewImpl usageView) {
|
||||
protected static void appendUsages(@NotNull final Usage[] foundUsages, @NotNull final UsageViewImpl usageView) {
|
||||
ApplicationManager.getApplication().runReadAction(() -> {
|
||||
for (Usage foundUsage : foundUsages) {
|
||||
usageView.appendUsage(foundUsage);
|
||||
|
||||
Reference in New Issue
Block a user