Package dk.gtz.graphedit.spi
Interface IPlugin
public interface IPlugin
Base interface for a third-party plugin.
Each plugin must implement this to be discoverable by the plugin loader.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Get a general description of this plugindefault Collection<IExporter>
Get a collection of exporters provided by this plugin.default Collection<IImporter>
Get a collection of importers provided by this plugin.default Collection<ILanguageServer>
Get a collection of language servers provided by this plugin.getName()
Get the name of this plugin.default Collection<IPluginPanel>
Get a collection of panels provided by this plugin.default Collection<ISyntaxFactory>
Get a collection of syntax factories provided by this plugin.default void
Event called when the plugin is disabled by the user.default void
Event called when the plugin is initialized (before any syntax factories or panels are requested) At this point, only some things are registered inDI
.default void
onStart()
Event called when the application has loaded.
-
Method Details
-
getName
String getName()Get the name of this plugin. Should try to be unique- Returns:
- The name of this plugin implementation
-
getDescription
Get a general description of this plugin- Returns:
- A description of what kinds of utilities this plugin provides
-
onInitialize
default void onInitialize()Event called when the plugin is initialized (before any syntax factories or panels are requested) At this point, only some things are registered inDI
. -
onStart
default void onStart()Event called when the application has loaded. At this point, most things are registered inDI
. -
onDestroy
default void onDestroy()Event called when the plugin is disabled by the user. Use this to clean up any processed or resources that has been loaded. -
getSyntaxFactories
Get a collection of syntax factories provided by this plugin. Will return an empty list by default.- Returns:
- A collection of syntax factories
- Throws:
Exception
- Allowed to throw any kind of exception. See the specific plugin implementation for details
-
getPanels
Get a collection of panels provided by this plugin. Will return an empty list by default.- Returns:
- A collection of plugin panels
- Throws:
Exception
- Allowed to throw any kind of exception. See the specific plugin implementation for details
-
getLanguageServers
Get a collection of language servers provided by this plugin. Will return an empty list by default.- Returns:
- A collection of language servers
- Throws:
Exception
- Allowed to throw any kind of exception. See the specific plugin implementation for details
-
getImporters
Get a collection of importers provided by this plugin. Will return an empty list by default.- Returns:
- A collection of importers
-
getExporters
Get a collection of exporters provided by this plugin. Will return an empty list by default.- Returns:
- A collection of exporters
-