Skip to content

N_Aml_Editor_Plugin_Contracts

AutomationML edited this page Jun 24, 2019 · 1 revision

Aml.Editor.Plugin.Contracts Namespace

AutomationML Editor

The Aml.Editor.Plugin.Contracts Namespace contains Classes and Interfaces for AutomationML Editor PlugIn Developers. The Interface Classes should be used as MEF Contracts, that matches Import and Export components, defined by Import and Export Attributes, at runtime. An AutomationML Editor PlugIn will export the components, implementing the Interfaces in the Contract DLL and the AutomationML Editor imports those components. The Contracts DLL is managed on nuget.

Classes

 

Class Description
Public class PluginCommand Class PluginCommand is used to publish Commands from a PlugIn to the AutomationML Editor.
Public class RelayCommand(T) Class RelayCommand as it was defined in an MSDN Article by Josh Smith. This class is an implementation pattern for a plugin command, which the AutomationML Editor can bind to a plugin Menu. This Implementation provides the UI with the state information, to enabled or disable a command, and with the invocation Method.
Public class SelectionEventArgs The event arguments for the selection event Selected.

Interfaces

 

Interface Description
Public interface IAMLEditorExternalsPlugin This interface can be implemented by plugIns, which are used to view external data, referenced by external data connectors in an AutomationML file or stream.
Public interfaceCode example IAMLEditorPlugin InterfaceClass for any AutomationML Editor PlugIn. The AutomationML Editor is the Host Application for any PlugIn, which implements this interface. The PlugIn implementing this interface will typically run it's own user interface thread. For an integrated UI-PlugIn, which will be controlled by the AutomationML Editors Main UI-Thread the IAMLEditorView-Interface Contract has to be used.
Public interface IAMLEditorPluginMetadata Interface which defines Metadata for an exportet PlugIn.
Public interfaceCode example IAMLEditorView The Interface IAMLEditorView is used for a PlugIn, which can be embedded in the AutomationML Editor's Window- and Docking-Manager. The PlugIn must implement the IFrameworkInputElement Interface (as an example, a WPF UserControl) and the IAMLEditorPlugin Interface. For windows, based on System.Windows.Forms , the view must have a WindowsFormsHost wrapper.
Public interfaceCode example IAMLEditorViewCollection The Interface IAMLEditorViewCollection is used for a PlugIn, which can be embedded in the AutomationML Editor's Window- and Docking-Manager. This PlugIn can provide multiple independent views, to be embedded at different positions in the AML Editor where each of the views shall implement the IAMLEditorView interface. It is possible to dynamically add and remove views from the collection while the PlugIn is active.
Public interface INotifyAMLDocumentLoad This PlugIn interface can be implemented to get notifications when an AML document is loaded or unloaded by the AutomationML editor.
Public interface INotifyViewActivation This interfaces is used to implement a PlugIn which will receive a notification with the Activate(String) method called, when the AMLEditor activates a view.
Public interface ISupportsSelection This interface can be implemented by a PlugIn to get the AutomationML editor to select a CAEX element in a tree view when the Selected event is raised.
Public interface IToolBarIntegration This interface can be implemented by PlugIns which provide ToolBarCommands, integrated into the AMLEditors tool bar.

Enumerations

 

Enumeration Description
Public enumeration DockPositionEnum This enum defines the possible docking positions for a plugIn window, when it is layouted by the Editors Docking manager.
Public enumeration PluginCommandsEnum Enumeration Constants for Plugin Commands. This Constants are used in the Host AutomationML Editor Application to Execute a Plugin internal command. The Plugin should at least publish these commands to the Host via its command list.

Remarks

All PlugIns which export an interface are loaded into the AutomationML Editor at startup only. If the AutomationML Editor restarts after a crash, no PlugIns are loaded, because the crash may be caused by a PlugIn. To get a PlugIn loaded, the DLLs have to be in the PlugIns Folder in the Execution Directory of the Editor. Only the AutomationML Editor Version 4 and higher supports 3d Party PlugIns.

Clone this wiki locally