public class UsageViewImpl extends java.lang.Object implements UsageViewEx
UsageView.ExcludeListener
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HELP_ID |
static UsageNode |
NULL_NODE |
static java.lang.String |
SHOW_RECENT_FIND_USAGES_ACTION_ID |
static java.util.Comparator<Usage> |
USAGE_COMPARATOR |
USAGE_INFO_KEY, USAGE_INFO_LIST_KEY, USAGE_SCOPE, USAGE_TARGETS_KEY, USAGE_VIEW_KEY, USAGES_KEY
Constructor and Description |
---|
UsageViewImpl(Project project,
UsageViewPresentation presentation,
UsageTarget [] targets,
Factory<UsageSearcher> usageSearcherFactory) |
Modifier and Type | Method and Description |
---|---|
void |
addButtonToLowerPane(javax.swing.Action action) |
void |
addButtonToLowerPane(java.lang.Runnable runnable,
java.lang.String text) |
void |
addButtonToLowerPane(java.lang.Runnable runnable,
java.lang.String text,
char mnemonic) |
void |
addExcludeListener(Disposable disposable,
UsageView.ExcludeListener listener) |
void |
addFilteringActions(DefaultActionGroup group) |
void |
addPerformOperationAction(java.lang.Runnable processRunnable,
java.lang.String commandName,
java.lang.String cannotMakeString,
java.lang.String shortDescription) |
void |
addPerformOperationAction(java.lang.Runnable processRunnable,
java.lang.String commandName,
java.lang.String cannotMakeString,
java.lang.String shortDescription,
boolean checkReadOnlyStatus) |
void |
appendUsage(Usage usage) |
java.util.concurrent.CompletableFuture<?> |
appendUsagesInBulk(java.util.Collection<? extends Usage> usages) |
void |
associateProgress(ProgressIndicator indicator) |
void |
cancelCurrentSearch() |
boolean |
canPerformReRun() |
void |
close() |
protected AnAction [] |
createActions() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
UsageNode |
doAppendUsage(Usage usage) |
protected UsageView |
doReRun() |
void |
excludeUsages(Usage [] usages) |
void |
expandAll() |
void |
expandRoot() |
javax.swing.JComponent |
getComponent() |
java.util.Set<Usage> |
getExcludedUsages() |
Usage |
getNextToSelect(java.util.Collection<? extends Usage> toDelete) |
Usage |
getNextToSelect(Usage toDelete) |
java.lang.String |
getNodeText(javax.swing.tree.TreeNode node) |
javax.swing.JComponent |
getPreferredFocusableComponent() |
UsageViewPresentation |
getPresentation() |
Project |
getProject() |
GroupNode |
getRoot() |
java.util.Set<Usage> |
getSelectedUsages() |
static KeyboardShortcut |
getShowUsagesWithSettingsShortcut() |
java.util.List<Usage> |
getSortedUsages() |
UsageTarget [] |
getTargets() |
java.util.Set<Usage> |
getUsages() |
int |
getUsagesCount() |
void |
includeUsages(Usage [] usages) |
boolean |
isDisposed() |
boolean |
isOriginUsage(Usage usage)
true if the points to the element the "find usages" action was invoked on
|
protected boolean |
isPreviewUsageActionEnabled() |
boolean |
isPreviewUsages() |
boolean |
isSearchInProgress() |
boolean |
isVisible(Usage usage) |
void |
refreshUsages() |
void |
removeUsage(Usage usage) |
void |
removeUsagesBulk(java.util.Collection<? extends Usage> usages)
Removes all specified usages from the usage view in one heroic swoop.
|
void |
searchFinished() |
boolean |
searchHasBeenCancelled() |
void |
select() |
void |
selectUsages(Usage [] usages) |
void |
setAdditionalComponent(javax.swing.JComponent comp) |
void |
setOriginUsage(Usage usage)
The element the "find usages" action was invoked on.
|
void |
setPreviewUsages(boolean state) |
void |
setRerunAction(javax.swing.Action rerunAction) |
void |
setSearchInProgress(boolean searchInProgress) |
void |
waitForUpdateRequestsCompletion() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setReRunActivity
public static final java.lang.String SHOW_RECENT_FIND_USAGES_ACTION_ID
public static final UsageNode NULL_NODE
public static final java.util.Comparator<Usage> USAGE_COMPARATOR
public static final java.lang.String HELP_ID
public UsageViewImpl(Project project, UsageViewPresentation presentation, UsageTarget [] targets, Factory<UsageSearcher> usageSearcherFactory)
public void searchFinished()
searchFinished
in interface UsageViewEx
public boolean searchHasBeenCancelled()
searchHasBeenCancelled
in interface UsageViewEx
public void cancelCurrentSearch()
cancelCurrentSearch
in interface UsageViewEx
public boolean isPreviewUsages()
public void setPreviewUsages(boolean state)
protected boolean isPreviewUsageActionEnabled()
public void addFilteringActions(DefaultActionGroup group)
protected AnAction [] createActions()
public void expandAll()
public void expandRoot()
public void select()
public Project getProject()
public static KeyboardShortcut getShowUsagesWithSettingsShortcut()
public void associateProgress(ProgressIndicator indicator)
associateProgress
in interface UsageViewEx
public void refreshUsages()
protected UsageView doReRun()
this
if it knows how to re-run itself, or the new created one otherwise)public void appendUsage(Usage usage)
appendUsage
in interface UsageView
public void waitForUpdateRequestsCompletion()
waitForUpdateRequestsCompletion
in interface UsageViewEx
public java.util.concurrent.CompletableFuture<?> appendUsagesInBulk(java.util.Collection<? extends Usage> usages)
appendUsagesInBulk
in interface UsageViewEx
public void removeUsage(Usage usage)
removeUsage
in interface UsageView
public void removeUsagesBulk(java.util.Collection<? extends Usage> usages)
UsageView
removeUsagesBulk
in interface UsageView
public void includeUsages(Usage [] usages)
includeUsages
in interface UsageView
public void excludeUsages(Usage [] usages)
excludeUsages
in interface UsageView
public void selectUsages(Usage [] usages)
selectUsages
in interface UsageView
public javax.swing.JComponent getPreferredFocusableComponent()
getPreferredFocusableComponent
in interface UsageView
public javax.swing.JComponent getComponent()
getComponent
in interface UsageView
public int getUsagesCount()
getUsagesCount
in interface UsageView
public void addExcludeListener(Disposable disposable, UsageView.ExcludeListener listener)
addExcludeListener
in interface UsageView
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isSearchInProgress()
isSearchInProgress
in interface UsageView
public void setSearchInProgress(boolean searchInProgress)
setSearchInProgress
in interface UsageViewEx
public boolean isDisposed()
public void setRerunAction(javax.swing.Action rerunAction)
setRerunAction
in interface UsageView
rerunAction
- this action is used to provide non-standard search restart. Disabled action makes toolbar button disabled too.public void addButtonToLowerPane(javax.swing.Action action)
addButtonToLowerPane
in interface UsageView
public void addButtonToLowerPane(java.lang.Runnable runnable, java.lang.String text)
addButtonToLowerPane
in interface UsageView
public void setAdditionalComponent(javax.swing.JComponent comp)
setAdditionalComponent
in interface UsageView
public void addButtonToLowerPane(java.lang.Runnable runnable, java.lang.String text, char mnemonic)
addButtonToLowerPane
in interface UsageView
public void addPerformOperationAction(java.lang.Runnable processRunnable, java.lang.String commandName, java.lang.String cannotMakeString, java.lang.String shortDescription)
addPerformOperationAction
in interface UsageView
public void addPerformOperationAction(java.lang.Runnable processRunnable, java.lang.String commandName, java.lang.String cannotMakeString, java.lang.String shortDescription, boolean checkReadOnlyStatus)
addPerformOperationAction
in interface UsageView
checkReadOnlyStatus
- if false, check is performed inside processRunnablepublic UsageViewPresentation getPresentation()
getPresentation
in interface UsageView
public boolean canPerformReRun()
public java.util.Set<Usage> getExcludedUsages()
getExcludedUsages
in interface UsageView
public java.util.Set<Usage> getSelectedUsages()
getSelectedUsages
in interface UsageView
public java.util.List<Usage> getSortedUsages()
getSortedUsages
in interface UsageView
public GroupNode getRoot()
public java.lang.String getNodeText(javax.swing.tree.TreeNode node)
public boolean isVisible(Usage usage)
public UsageTarget [] getTargets()
public void setOriginUsage(Usage usage)
public boolean isOriginUsage(Usage usage)