graph LR
Plugin_Lifecycle_Manager["Plugin Lifecycle Manager"]
User_Interface_UI_Manager["User Interface (UI) Manager"]
Obsidian_Interaction_Service["Obsidian Interaction Service"]
Note_Content_Processor["Note Content Processor"]
Template_and_Note_Creation_Engine["Template and Note Creation Engine"]
Configuration_Management["Configuration Management"]
Unclassified["Unclassified"]
Plugin_Lifecycle_Manager -- "Registers" --> UI_Manager
Plugin_Lifecycle_Manager -- "Registers" --> Obsidian_Interaction_Service
Plugin_Lifecycle_Manager -- "Manages" --> Configuration_Management
UI_Manager -- "Triggers" --> Template_and_Note_Creation_Engine
UI_Manager -- "Interacts with" --> Configuration_Management
Obsidian_Interaction_Service -- "Provides access to" --> Note_Content_Processor
Obsidian_Interaction_Service -- "Provides access to" --> Template_and_Note_Creation_Engine
Note_Content_Processor -- "Uses" --> Obsidian_Interaction_Service
Note_Content_Processor -- "Uses" --> Configuration_Management
Template_and_Note_Creation_Engine -- "Uses" --> Obsidian_Interaction_Service
Template_and_Note_Creation_Engine -- "Uses" --> Configuration_Management
Configuration_Management -- "Stores for" --> Plugin_Lifecycle_Manager
Configuration_Management -- "Provides to" --> UI_Manager
Configuration_Management -- "Provides to" --> Note_Content_Processor
Configuration_Management -- "Provides to" --> Template_and_Note_Creation_Engine
The "ABCs of Control" plugin for Obsidian is structured around a central Plugin Lifecycle Manager (ABCsOfControlPlugin) that orchestrates the entire plugin's operation. This manager initializes the plugin, loads and saves user Configuration Management settings, and registers key functionalities. User interaction is primarily handled by the User Interface (UI) Manager, which includes a main modal (ABCsModal) for template-driven note creation and a settings tab (ABCsSettingTab). All interactions with the core Obsidian application, such as file system operations, command registration, and event listening, are facilitated by the Obsidian Interaction Service, which is essentially the ABCsOfControlPlugin itself leveraging the Obsidian API. The Note Content Processor handles specific text manipulation tasks like highlighting, copying, pasting, and quoting within notes, relying on the Obsidian Interaction Service for editor access and Configuration Management for preferences. A dedicated Template and Note Creation Engine is responsible for loading templates, gathering user input for placeholders, executing embedded scripts, and ultimately creating or modifying notes based on these templates, also utilizing the Obsidian Interaction Service for vault operations and Configuration Management for template folder paths. This modular design ensures clear separation of concerns, making the plugin maintainable and extensible.
Orchestrates the plugin's entire lifecycle, from initialization (onload) to cleanup (onunload). It is responsible for loading and saving plugin settings, registering UI elements like the ribbon icon and settings tab, and setting up event listeners for user interactions.
Related Classes/Methods:
Manages all user-facing components, including the main modal for selecting templates and creating notes, and the dedicated settings tab for configuring plugin preferences. It handles rendering and user input for these interfaces.
Related Classes/Methods:
Provides an abstracted layer for direct interaction with the core Obsidian API. This includes accessing the vault for file operations, managing the workspace for UI elements (ribbon icons, commands), and handling editor-specific events.
Related Classes/Methods:
src.main.ABCsOfControlPlugin.addCommand:48-54src.main.ABCsOfControlPlugin.registerEvent
Encapsulates the core logic for manipulating and formatting content within Obsidian notes. This includes handling user selections for highlighting, copying, pasting, and quoting, as well as formatting the output before insertion into a note.
Related Classes/Methods:
src.main.ABCsOfControlPlugin.handlePasteHighlightsrc.main.ABCsOfControlPlugin.handleQuotesrc.main.ABCsOfControlPlugin.formatHighlight:290-298
Manages the discovery, processing, and application of templates for creating new notes or inserting content into existing ones. It handles user input for template placeholders, executes embedded JavaScript within templates, and ensures proper folder structures are maintained.
Related Classes/Methods:
src.main.ABCsModal.showTemplatesForLetter:1-10src.main.ABCsModal.createNoteFromTemplatesrc.main.ABCsModal.extractJavaScriptCode
Handles the storage, retrieval, and updating of all plugin settings. It defines the structure of the plugin's configuration and provides mechanisms for persistence across Obsidian sessions.
Related Classes/Methods:
src.main.MyPluginSettings:4-8src.main.DEFAULT_SETTINGS:10-14src.main.ABCsOfControlPlugin.loadSettingssrc.main.ABCsOfControlPlugin.saveSettings:322-324
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
Related Classes/Methods: None