public final class IntentionManagerImpl extends IntentionManager implements Disposable
Disposable.ParentEP_INTENTION_ACTIONS, SHOW_INTENTION_OPTIONS_KEY| Constructor and Description |
|---|
IntentionManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAction(IntentionAction action)
Registers an intention action.
|
void |
checkForDuplicates() |
LocalQuickFix |
convertToFix(IntentionAction action)
Wraps given action in a LocalQuickFix object.
|
IntentionAction |
createCleanupAllIntention() |
IntentionAction |
createFixAllIntention(InspectionToolWrapper toolWrapper,
IntentionAction action) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
IntentionAction [] |
getAvailableIntentionActions()
Returns all registered intention actions which are available now
(not disabled via Settings|Intentions or Alt-Enter|Disable intention quick fix)
|
java.util.List<IntentionAction> |
getCleanupIntentionOptions() |
IntentionAction [] |
getIntentionActions()
Returns all registered intention actions.
|
java.util.List<IntentionAction> |
getStandardIntentionOptions(HighlightDisplayKey displayKey,
PsiElement context) |
boolean |
hasActiveRequests() |
void |
registerIntentionAndMetaData(IntentionAction action,
java.lang.String... category)
Registers an intention action which can be enabled or disabled through the "Intention
Settings" dialog.
|
void |
unregisterIntention(IntentionAction intentionAction) |
<T extends java.lang.Throwable> |
withDisabledIntentions(ThrowableRunnable<T> runnable) |
getInstance, getInstancepublic void registerIntentionAndMetaData(IntentionAction action, java.lang.String... category)
IntentionManagerIntentionAction.getFamilyName() needs to
be created under the intentionDescriptions directory of the resource root.
The directory needs to contain three files. description.html provides the
description of the intention, before.java.template provides the sample code
before the intention is invoked, and after.java.template provides the sample
code after invoking the intention. The templates can contain a fragment of code surrounded
with <spot> and </spot> markers. If present, that fragment
will be surrounded by a blinking rectangle in the inspection preview pane.registerIntentionAndMetaData in class IntentionManageraction - the intention action to register.category - the name of the category or categories under which the intention will be shown
in the "Intention Settings" dialog.public void unregisterIntention(IntentionAction intentionAction)
unregisterIntention in class IntentionManagerpublic java.util.List<IntentionAction> getStandardIntentionOptions(HighlightDisplayKey displayKey, PsiElement context)
getStandardIntentionOptions in class IntentionManagerpublic IntentionAction createFixAllIntention(InspectionToolWrapper toolWrapper, IntentionAction action)
createFixAllIntention in class IntentionManagerpublic void dispose()
Disposabledispose in interface Disposablepublic IntentionAction createCleanupAllIntention()
createCleanupAllIntention in class IntentionManagerpublic java.util.List<IntentionAction> getCleanupIntentionOptions()
getCleanupIntentionOptions in class IntentionManagerIntentionManager.createCleanupAllIntention()
e.g. edit enabled cleanup inspections or starting cleanup on predefined scopepublic LocalQuickFix convertToFix(IntentionAction action)
IntentionManagerconvertToFix in class IntentionManageraction - action to convert.public void addAction(IntentionAction action)
IntentionManageraddAction in class IntentionManageraction - the intention action to register.public IntentionAction [] getIntentionActions()
IntentionManagergetIntentionActions in class IntentionManagerpublic IntentionAction [] getAvailableIntentionActions()
IntentionManagergetAvailableIntentionActions in class IntentionManagerpublic void checkForDuplicates()
public boolean hasActiveRequests()
public <T extends java.lang.Throwable> void withDisabledIntentions(ThrowableRunnable<T> runnable) throws T extends java.lang.Throwable
T extends java.lang.Throwable