Class IntellijResourceUI
- All Implemented Interfaces:
ResourceUI
ResourceUI.
This strategy leverages IntelliJ native OpenAPI for high-fidelity navigation and
visualization within the IDE. It provides IntellijTextResourceViewer for
100% IDE editor fidelity (syntax highlighting, line numbers, folding, error annotators).
- Author:
- anahata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateContent(Resource resource, AgiPanel agiPanel) Creates the primary content component for the given resource.private StringResolves the physical path from the handle for IDE navigation.voidOpens the resource in the host environment's preferred viewer or editor.voidpopulateActions(JPanel actionContainer, Resource resource, AgiPanel agiPanel) Injects host-specific actions into the provided container.voidSelects and highlights the resource in the host environment's navigation component (e.g., Projects tree).Methods inherited from class DefaultResourceUI
createHandlePanel, createLinkButton, createViewPanel, openUriMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResourceUI
canEdit, getEditorContent, setEditing
-
Constructor Details
-
IntellijResourceUI
public IntellijResourceUI()
-
-
Method Details
-
createContent
Creates the primary content component for the given resource.Implementation details: Dispatches to
RSyntaxTextAreaTextResourceViewerfor text resources or a custom label for binary/media resources.Returns an IntelliJ-native
IntellijTextResourceViewerfor textual resources, providing authentic IDE editor frames.- Specified by:
createContentin interfaceResourceUI- Overrides:
createContentin classDefaultResourceUI- Parameters:
resource- The resource to render.agiPanel- The parent AgiPanel.- Returns:
- The JComponent representing the content view.
-
populateActions
Injects host-specific actions into the provided container.Implementation details: Injects OS-level actions for physical resources.
Injects IDE-specific 'Open in Editor' and 'Select in Project' actions for physical resources.
- Specified by:
populateActionsin interfaceResourceUI- Overrides:
populateActionsin classDefaultResourceUI- Parameters:
actionContainer- The container (usually a toolbar or header panel).resource- The resource instance.agiPanel- The parent AgiPanel.
-
open
Opens the resource in the host environment's preferred viewer or editor.Implementation details: Uses
DesktopAPI to open physical or URL resources.Opens the physical file in the IntelliJ editor via
OpenFileDescriptor.- Specified by:
openin interfaceResourceUI- Overrides:
openin classDefaultResourceUI- Parameters:
resource- The resource to open.agiPanel- The parent AgiPanel.
-
select
Selects and highlights the resource in the host environment's navigation component (e.g., Projects tree).Implementation details: Standalone mode does not support project-level selection.
Uses the ASI
IDEtool to focus the resource in the Project view.- Specified by:
selectin interfaceResourceUI- Overrides:
selectin classDefaultResourceUI- Parameters:
resource- The resource to select.agiPanel- The parent AgiPanel.
-
getPath
-

