Plugin API Reference
This page documents the public API available to ONE WARE Studio plugins through OneWare.Essentials and OneWare.UniversalFpgaProjectSystem.
Module Lifecycle
IOneWareModule
The core interface every plugin must implement (typically via OneWareModuleBase):
public interface IOneWareModule
{
string Id { get; }
IReadOnlyCollection<string> Dependencies { get; }
void RegisterServices(IServiceCollection services);
void Initialize(IServiceProvider serviceProvider);
}
| Member | Description |
|---|---|
Id | Module identifier (defaults to class name) |
Dependencies | Module IDs that must initialize before this one |
RegisterServices | Phase 1: register types into the DI container |
Initialize | Phase 2: resolve services and register extensions |
OneWareModuleBase
Abstract base class providing sensible defaults:
public abstract class OneWareModuleBase : IOneWareModule
{
public virtual string Id => GetType().Name;
public virtual IReadOnlyCollection<string> Dependencies => Array.Empty<string>();
public virtual void RegisterServices(IServiceCollection services) { }
public virtual void Initialize(IServiceProvider serviceProvider) { }
}
Service Resolution
Use the Resolve<T>() extension method on IServiceProvider:
var windowService = serviceProvider.Resolve<IWindowService>();
This first tries GetService<T>(), then falls back to ActivatorUtilities.CreateInstance<T>().
Core Services
IWindowService
UI management — menus, dialogs, notifications, and UI extensions.
| Method | Description |
|---|---|
RegisterMenuItem(key, items) | Inject menu items by path (e.g., "MainWindow_MainMenu/View/Tool Windows") |
RegisterUiExtension(key, extension) | Add UI to named extension points |
GetUiExtensions(key) | Retrieve registered UI extensions |
Show(window) | Open a window |
ShowDialogAsync(window) | Open a modal dialog |
ShowMessageBoxAsync(...) | Show a message box |
ShowNotification(...) | Toast notification |
ShowNotificationWithButton(...) | Notification with action button |
ShowInputAsync(...) | Text input dialog |
ShowFolderSelectAsync(...) | Folder picker dialog |
ActivateMainWindow() | Bring main window to foreground |
IMainDockService
Dockable panel and document management.
| Method | Description |
|---|---|
RegisterDocumentView<T>(extensions) | Map file extensions to document view models |
RegisterFileOpenOverwrite(action, extensions) | Override open behavior for specific extensions |
RegisterLayoutExtension<T>(location) | Add dockable tool window (Bottom, Left, Right) |
Show<T>() | Display a dockable view |
OpenFileAsync(fullPath) | Open a file in the editor |
CloseFileAsync(fullPath) | Close a document |
ISettingsService
Persistent settings registration and access.
| Method | Description |
|---|---|
RegisterSettingCategory(name) | Create a settings group |
RegisterSettingSubCategory(parent, name) | Create a sub-group |
Register<T>(key, defaultValue) | Register a setting with type and default |
GetSettingValue<T>(key) | Read current value |
SetSettingValue(key, value) | Write value |
GetSettingObservable<T>(key) | Reactive observable for UI binding |
Bind<T>(key, observable) | Two-way bind a setting |
IProjectExplorerService
Project tree manipulation and context menus.
| Method | Description |
|---|---|
AddProject(root) | Add a project to the explorer |
TryCloseProjectAsync(root) | Close a project |
SaveProjectAsync(root) | Save project state |
RegisterConstructContextMenu(action) | Add items to the right-click context menu |
GetEntryFromFullPath(path) | Resolve a path to a project entry node |
ImportAsync(target, files) | Import files into a project |
IProjectManagerService
Project type registration.
| Method | Description |
|---|---|
RegisterProjectManager(id, manager) | Register a project type handler |
GetManager(id) | Resolve a project manager by type ID |
GetManagerByExtension(ext) | Resolve by file extension |
Language & Editor Services
ILanguageManager
Language support registration — syntax highlighting, LSP, and type assistance.
| Method | Description |
|---|---|
RegisterTextMateLanguage(id, grammarPath, extensions) | Register TextMate grammar for highlighting |
RegisterLanguageExtensionLink(source, target) | Map one extension to another's language |
RegisterService(type, workspaceDependent, fileTypes) | Register an LSP language service |
RegisterStandaloneTypeAssistance(type, fileTypes) | Register editor assistance without LSP |
GetLanguageService(fullPath) | Resolve language service for a file |
IErrorService
Diagnostic reporting.
| Method | Description |
|---|---|
RegisterErrorSource(source) | Register a named error source |
RefreshErrors(errors, source, filePath) | Replace diagnostics for a file |
Clear(source) | Clear all diagnostics from a source |
GetErrorsForFile(filePath) | Get diagnostics for a specific file |
IOutputService
Output panel logging.
| Method | Description |
|---|---|
WriteLine(text, color, owner) | Append a line to the output panel |
Write(text, color, owner) | Append inline text |
Tool & Package Services
IToolService
External tool registration and execution.
| Method | Description |
|---|---|
Register(toolContext, strategy) | Register a tool with its execution strategy |
RegisterStrategy(toolKey, strategy) | Add an alternative strategy for a tool |
GetAllTools() | List registered tools |
GetStrategy(toolKey) | Get active strategy for a tool |
IPackageService
Downloadable package management (tools, plugins, hardware).
| Method | Description |
|---|---|
RegisterPackage(package) | Register a downloadable package |
RegisterPackageRepository(url) | Add a package repository URL |
InstallAsync(packageId, version) | Install a package |
RemoveAsync(packageId) | Uninstall a package |
RefreshAsync() | Refresh package metadata |
IChildProcessService
External process execution.
| Method | Description |
|---|---|
ExecuteShellAsync(path, args, workDir, status, ...) | Run a tool with UI status tracking |
StartChildProcess(startInfo) | Start a managed child process |
Kill(process) | Terminate a process |
IEnvironmentService
Environment variable management for tool execution.
| Method | Description |
|---|---|
SetEnvironmentVariable(key, value) | Set an environment variable |
SetPath(key, path) | Add to PATH |
UI Extension Points
Register UI components at named locations using IWindowService.RegisterUiExtension:
| Key | Location |
|---|---|
MainWindow_RoundToolBarExtension | Main toolbar row |
UniversalFpgaToolBar_CompileMenuExtension | Compile button dropdown |
UniversalFpgaToolBar_PinPlannerMenuExtension | Pin planner menu |
UniversalFpgaToolBar_DownloaderConfigurationExtension | Download configuration area |
CompileWindow_TopRightExtension | Pin planner window (top right) |
EditView_Top | Top of editor panel |
Menu Item Paths
Register menu items using IWindowService.RegisterMenuItem with these path prefixes:
MainWindow_MainMenu/FileMainWindow_MainMenu/EditMainWindow_MainMenu/View/Tool WindowsMainWindow_MainMenu/ExtrasMainWindow_MainMenu/Help
FPGA Project System
Available when depending on OneWare.UniversalFpgaProjectSystem.
FpgaService
Central registry for FPGA extension points.
| Method | Description |
|---|---|
RegisterFpgaPackage(package) | Register a hardware package |
RegisterFpgaExtensionPackage(package) | Register a board extension |
RegisterToolchain<T>() | Register an FPGA toolchain |
RegisterLoader<T>() | Register a programming/download tool |
RegisterSimulator<T>() | Register a simulation tool |
RegisterTemplate<T>() | Register a project template |
RegisterPreCompileStep<T>() | Add a pre-compile hook |
RegisterNodeProvider<T>() | Register HDL node extraction |
RegisterLanguage(ext, name) | Register an HDL language for FPGA projects |
RegisterProjectEntryModification(action) | Custom project explorer adornments |
Key Interfaces
| Interface | Purpose |
|---|---|
IFpgaToolchain | Synthesis/place-and-route implementation |
IFpgaLoader | Device programming |
IFpgaSimulator | Simulation execution |
IFpgaProjectTemplate | New project file generation |
IFpgaPreCompileStep | Pre-compile processing |
INodeProvider | HDL signal/port extraction for pin planning |
Project Properties
FPGA projects (.fpgaproj) store configuration as JSON key-value pairs:
| Key | Description |
|---|---|
topEntity | Relative path to the top-level HDL file |
toolchain | Active toolchain ID |
loader | Active loader ID |
fpga | Selected FPGA package name |
include / exclude | Glob patterns for file inclusion |
testBenches | Relative paths marked as test benches |
compileExcluded | Files excluded from compilation |
Miscellaneous Services
| Service | Description |
|---|---|
IPaths | App directories: AppDataDirectory, PackagesDirectory, PluginsDirectory, TempDirectory |
IFileIconService | Register file extension icons |
IHttpService | Download files, archives, images, and text |
IApplicationStateService | Status tracking, notifications, shutdown hooks |
IWelcomeScreenService | Add items to the welcome screen |
IChatService / IChatManagerService | AI chat provider integration |
ITerminalManagerService | Execute commands in terminal panes |
Plugin Loading & Compatibility
Plugins are loaded via IPluginService.AddPlugin(path):
- Plugin folder is copied to a session directory
- All
.dllfiles are scanned and loaded - Assemblies are checked for
IOneWareModuleimplementations RegisterServices()is called on discovered modulesInitialize()is called in dependency-sorted order
The compatibility.txt file at the plugin root declares required host dependencies:
OneWare.Essentials : 1.0.0
OneWare.UniversalFpgaProjectSystem : 1.0.0
Version checking is enforced by PluginCompatibilityChecker. Incompatible plugins are flagged but not loaded.