Class ToggleAgiContextAction
java.lang.Object
com.intellij.openapi.actionSystem.AnAction
com.intellij.openapi.actionSystem.ToggleAction
uno.anahata.asi.intellij.tools.ide.actions.ToggleAgiContextAction
- All Implemented Interfaces:
com.intellij.openapi.actionSystem.ActionUpdateThreadAware, com.intellij.openapi.actionSystem.Toggleable, com.intellij.openapi.project.PossiblyDumbAware
public class ToggleAgiContextAction
extends com.intellij.openapi.actionSystem.ToggleAction
A single session's toggle within the "AGI Context" popup: checked when the selected
files are all in that session's context, and adds/removes them on toggle.
- Author:
- anahata
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.intellij.openapi.actionSystem.ActionUpdateThreadAware
com.intellij.openapi.actionSystem.ActionUpdateThreadAware.Recursive -
Field Summary
FieldsFields inherited from class com.intellij.openapi.actionSystem.AnAction
ACTIONS_KEY, ACTIONS_MOD_COUNT, EMPTY_ARRAYFields inherited from interface com.intellij.openapi.actionSystem.Toggleable
SELECTED_KEY, SELECTED_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a toggle for the given session, labelled with its display name. -
Method Summary
Modifier and TypeMethodDescription@NotNull com.intellij.openapi.actionSystem.ActionUpdateThreadbooleanisSelected(@NotNull com.intellij.openapi.actionSystem.AnActionEvent e) voidsetSelected(@NotNull com.intellij.openapi.actionSystem.AnActionEvent e, boolean state) Methods inherited from class com.intellij.openapi.actionSystem.ToggleAction
actionPerformed, createTemplatePresentation, updateMethods inherited from class com.intellij.openapi.actionSystem.AnAction
addSynonym, addTextOverride, addTextOverride, applyTextOverride, applyTextOverride, beforeActionPerformedUpdate, copyActionTextOverride, copyActionTextOverrides, copyFrom, copyShortcutFrom, displayTextInToolbar, getEventProject, getShortcutSet, getSynonyms, getTemplatePresentation, getTemplateText, isDefaultIcon, isDumbAware, isEnabledInModalContext, isInInjectedContext, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, registerCustomShortcutSet, setDefaultIcon, setEnabledInModalContext, setInjectedContext, setShortcutSet, toString, unregisterCustomShortcutSet, useSmallerFontForTextInToolbar
-
Field Details
-
agi
The session this toggle targets.
-
-
Constructor Details
-
ToggleAgiContextAction
Constructs a toggle for the given session, labelled with its display name.- Parameters:
agi- the target session.
-
-
Method Details
-
isSelected
public boolean isSelected(@NotNull @NotNull com.intellij.openapi.actionSystem.AnActionEvent e) Selected when the current file selection is fully in this session's context.
- Specified by:
isSelectedin classcom.intellij.openapi.actionSystem.ToggleAction
-
setSelected
public void setSelected(@NotNull @NotNull com.intellij.openapi.actionSystem.AnActionEvent e, boolean state) Adds the selection to the session's context when enabling, removes it when disabling.
- Specified by:
setSelectedin classcom.intellij.openapi.actionSystem.ToggleAction
-
getActionUpdateThread
@NotNull public @NotNull com.intellij.openapi.actionSystem.ActionUpdateThread getActionUpdateThread()Membership is a lightweight resource-manager lookup, safe to compute off the EDT.
- Specified by:
getActionUpdateThreadin interfacecom.intellij.openapi.actionSystem.ActionUpdateThreadAware- Overrides:
getActionUpdateThreadin classcom.intellij.openapi.actionSystem.AnAction
-

