public class UsageViewImpl extends java.lang.Object implements UsageViewEx
UsageView.ExcludeListenerDisposable.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, waitsetReRunActivitypublic 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 UsageViewExpublic boolean searchHasBeenCancelled()
searchHasBeenCancelled in interface UsageViewExpublic void cancelCurrentSearch()
cancelCurrentSearch in interface UsageViewExpublic 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 UsageViewExpublic 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 UsageViewpublic void waitForUpdateRequestsCompletion()
waitForUpdateRequestsCompletion in interface UsageViewExpublic java.util.concurrent.CompletableFuture<?> appendUsagesInBulk(java.util.Collection<? extends Usage> usages)
appendUsagesInBulk in interface UsageViewExpublic void removeUsage(Usage usage)
removeUsage in interface UsageViewpublic void removeUsagesBulk(java.util.Collection<? extends Usage> usages)
UsageViewremoveUsagesBulk in interface UsageViewpublic void includeUsages(Usage [] usages)
includeUsages in interface UsageViewpublic void excludeUsages(Usage [] usages)
excludeUsages in interface UsageViewpublic void selectUsages(Usage [] usages)
selectUsages in interface UsageViewpublic javax.swing.JComponent getPreferredFocusableComponent()
getPreferredFocusableComponent in interface UsageViewpublic javax.swing.JComponent getComponent()
getComponent in interface UsageViewpublic int getUsagesCount()
getUsagesCount in interface UsageViewpublic void addExcludeListener(Disposable disposable, UsageView.ExcludeListener listener)
addExcludeListener in interface UsageViewpublic void dispose()
Disposabledispose in interface Disposablepublic boolean isSearchInProgress()
isSearchInProgress in interface UsageViewpublic void setSearchInProgress(boolean searchInProgress)
setSearchInProgress in interface UsageViewExpublic boolean isDisposed()
public void setRerunAction(javax.swing.Action rerunAction)
setRerunAction in interface UsageViewrerunAction - 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 UsageViewpublic void addButtonToLowerPane(java.lang.Runnable runnable,
java.lang.String text)
addButtonToLowerPane in interface UsageViewpublic void setAdditionalComponent(javax.swing.JComponent comp)
setAdditionalComponent in interface UsageViewpublic void addButtonToLowerPane(java.lang.Runnable runnable,
java.lang.String text,
char mnemonic)
addButtonToLowerPane in interface UsageViewpublic void addPerformOperationAction(java.lang.Runnable processRunnable,
java.lang.String commandName,
java.lang.String cannotMakeString,
java.lang.String shortDescription)
addPerformOperationAction in interface UsageViewpublic void addPerformOperationAction(java.lang.Runnable processRunnable,
java.lang.String commandName,
java.lang.String cannotMakeString,
java.lang.String shortDescription,
boolean checkReadOnlyStatus)
addPerformOperationAction in interface UsageViewcheckReadOnlyStatus - if false, check is performed inside processRunnablepublic UsageViewPresentation getPresentation()
getPresentation in interface UsageViewpublic boolean canPerformReRun()
public java.util.Set<Usage> getExcludedUsages()
getExcludedUsages in interface UsageViewpublic java.util.Set<Usage> getSelectedUsages()
getSelectedUsages in interface UsageViewpublic java.util.List<Usage> getSortedUsages()
getSortedUsages in interface UsageViewpublic 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)