public abstract class IntentionManager
extends java.lang.Object
IntentionAction
Modifier and Type | Field and Description |
---|---|
static ExtensionPointName<IntentionActionBean> |
EP_INTENTION_ACTIONS |
static Key<java.lang.Boolean> |
SHOW_INTENTION_OPTIONS_KEY
Key to be used within
UserDataHolder in order to check presence of explicit indication on if intentions sub-menu
should be shown. |
Constructor and Description |
---|
IntentionManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addAction(IntentionAction action)
Registers an intention action.
|
abstract LocalQuickFix |
convertToFix(IntentionAction action)
Wraps given action in a LocalQuickFix object.
|
abstract IntentionAction |
createCleanupAllIntention() |
abstract IntentionAction |
createFixAllIntention(InspectionToolWrapper toolWrapper,
IntentionAction action) |
abstract IntentionAction [] |
getAvailableIntentionActions()
Returns all registered intention actions which are available now
(not disabled via Settings|Intentions or Alt-Enter|Disable intention quick fix)
|
abstract java.util.List<IntentionAction> |
getCleanupIntentionOptions() |
static IntentionManager |
getInstance() |
static IntentionManager |
getInstance(Project project)
Deprecated.
Use
getInstance() instead.
Returns instance of IntentionManager for given project. |
abstract IntentionAction [] |
getIntentionActions()
Returns all registered intention actions.
|
abstract java.util.List<IntentionAction> |
getStandardIntentionOptions(HighlightDisplayKey displayKey,
PsiElement context) |
abstract void |
registerIntentionAndMetaData(IntentionAction action,
java.lang.String... category)
Deprecated.
Please use
<intentionAction> extension point instead |
abstract void |
unregisterIntention(IntentionAction intentionAction) |
public static final ExtensionPointName<IntentionActionBean> EP_INTENTION_ACTIONS
public static final Key<java.lang.Boolean> SHOW_INTENTION_OPTIONS_KEY
UserDataHolder
in order to check presence of explicit indication on if intentions sub-menu
should be shown.@Deprecated public static IntentionManager getInstance(Project project)
getInstance()
instead.
Returns instance of IntentionManager
for given project.project
- the project for which the instance is returned.IntentionManager
assigned for given project.public static IntentionManager getInstance()
public abstract void addAction(IntentionAction action)
action
- the intention action to register.public abstract IntentionAction [] getIntentionActions()
public abstract IntentionAction [] getAvailableIntentionActions()
@Deprecated public abstract void registerIntentionAndMetaData(IntentionAction action, java.lang.String... category)
<intentionAction>
extension point insteadIntentionAction.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.action
- 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 abstract void unregisterIntention(IntentionAction intentionAction)
public abstract java.util.List<IntentionAction> getStandardIntentionOptions(HighlightDisplayKey displayKey, PsiElement context)
public abstract IntentionAction createFixAllIntention(InspectionToolWrapper toolWrapper, IntentionAction action)
public abstract IntentionAction createCleanupAllIntention()
public abstract java.util.List<IntentionAction> getCleanupIntentionOptions()
createCleanupAllIntention()
e.g. edit enabled cleanup inspections or starting cleanup on predefined scopepublic abstract LocalQuickFix convertToFix(IntentionAction action)
action
- action to convert.