Skip to content

T_Aml_Editor_Plugin_Contracts_Commanding_IEditorCommanding

AutomationML edited this page Jun 24, 2019 · 1 revision

IEditorCommanding Interface

AutomationML Editor

This interface is a PlugIn interface, that provides a callback function, which can be used to execute commands provided by the AMLEditor.

Namespace: Aml.Editor.Plugin.Contracts.Commanding
Assembly: AML.Editor.PluginContracts (in AML.Editor.PluginContracts.dll) Version: 2.1

Syntax

C#

public interface IEditorCommanding : IAMLEditorPlugin

VB

Public Interface IEditorCommanding
	Inherits IAMLEditorPlugin

C++

public interface class IEditorCommanding : IAMLEditorPlugin

The IEditorCommanding type exposes the following members.

Properties

 

Name Description
Public property ActivatePlugin Gets the Activation command for the PlugIn. (Inherited from IAMLEditorPlugin.)
Public property Commands Gets the List of commands, which are bound to the PlugIn Menu in the AutomationML Editor. The Command Names are shown in a sub-Menu in the PlugIn-Menu. (Inherited from IAMLEditorPlugin.)
Public property DisplayName Gets the display name which is shown in the PlugIn Menu in the AutomationML Editor. (Inherited from IAMLEditorPlugin.)
Public property EditorCommand Property set by the AMLEditor to provide a callback function to a PlugIn, which can be used to execute an editor command. All available commands are listed in AMLEditorCommandEnum. The current implementation only supports synchronous execution of commands.
Public property IsActive Gets a value indicating whether this instance is active. (Inherited from IAMLEditorPlugin.)
Public property IsAutoActive Gets or sets a value indicating whether this instance is automatic active when loaded. This value can be initially set and will be defined by the user. (Inherited from IAMLEditorPlugin.)
Public property IsReactive Gets a value indicating whether this instance is reactive. Reactive PlugIn will be notified, when the actual CAEX-Object changes (Selection of any Tree view Item in an AutomationML TreeView) via the ChangeSelectedObject(CAEXBasicObject) Method or an AutomationML File is opened via the ChangeAMLFilePath(String) Method. (Inherited from IAMLEditorPlugin.)
Public property IsReadonly Gets a value indicating whether this instance is read only. A Read only PlugIn should not change any CAEX Objects. (Inherited from IAMLEditorPlugin.)
Public property PackageName Gets the package name which is used to download the PlugIn package from a NuGet feed. If a Package name is defined, the AMLEditor can update PlugIn packages independently from its own update cycle. (Inherited from IAMLEditorPlugin.)
Public property TerminatePlugin Gets the Terminate command for the PlugIn. (Inherited from IAMLEditorPlugin.)
  Back to Top

Methods

 

Name Description
Public method ChangeAMLFilePath Changes the current amlFilePath. The Host Application will call this method when the PlugIns IsReactive Property is set to true and the Currently opened AutomationML File changes in the AMLEditor Host Application. (Inherited from IAMLEditorPlugin.)
Public method ChangeSelectedObject Changes the selected object. The Host Application will call this method when the PlugIns IsReactive Property is set to true and the Current Selection changes in the AMLEditor Host Application. (Inherited from IAMLEditorPlugin.)
Public methodCode example ExecuteCommand This Method enables the AutomationML Editor to execute a command. Only those commands are executable, which are identifiable via the PluginCommandsEnum. (Inherited from IAMLEditorPlugin.)
Public methodCode example PublishAutomationMLFileAndObject PublishAutomationMLFileAndObject after the PlugIn is activated. This Method is called by the AutomationML Editor when the PluginActivated Event is handled. The AutomationML Editor will send the actual Path of the AutomationML File and the actual selected Object to the PlugIn, when an AutomationML File is currently open. If the Activation happened, when no AutomationML File was opened so far, the PlugIn will be informed as soon as this will happen, but only if the IsReactive Flag is set to true. (Inherited from IAMLEditorPlugin.)
  Back to Top

Events

 

Name Description
Public event PluginActivated The Event occurs when the PlugIn is Activated (for example via an Activation Command). This event is raised by the PlugIn and handled by the AutomationML Editor. If the PlugIn has a UI-Control, the AutomationML Editor will show the UI and dock the Control in a Container Window, used for external Views. (Inherited from IAMLEditorPlugin.)
Public event PluginTerminated Occurs when the PlugIn is terminated (some UserInteraction inside the PlugIn, i. e. a Window is Closed, or via a Command). This event is raised by the PlugIn and handled by the AutomationML Editor. If the PlugIn is a UI-Control IAMLEditorView, the control is removed from the Container Window. The State of the currently open AutomationML Document is checked, and if it was modified, the User will be asked to reload it. (Inherited from IAMLEditorPlugin.)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method CloseCAEXFile Calls the command, to close the CAEX file. (Defined by EditorCommandBase.)
Public Extension Method GetCAEXFileCommand Calls the command, to get the currently edited CAEX file from the AutomationML editor. (Defined by EditorCommandBase.)
Public Extension Method ImportLibraries Calls the command, to open the CAEX file. (Defined by EditorCommandBase.)
Public Extension Method NewCAEXFile Calls the command, to create a new CAEX file. (Defined by EditorCommandBase.)
Public Extension Method OpenCAEXFile(String, OpenFileCommandArguments) Overloaded.
Calls the command, to open the CAEX file. (Defined by EditorCommandBase.)
Public Extension Method OpenCAEXFile(Stream, OpenFileCommandArguments) Overloaded.
Calls the command, to open the CAEX file from a stream. (Defined by EditorCommandBase.)
Public Extension Method SaveCAEXFile Calls the command, to save the CAEX file. (Defined by EditorCommandBase.)
  Back to Top

See Also

Reference

Aml.Editor.Plugin.Contracts.Commanding Namespace
Aml.Editor.Plugin.Contracts.IAMLEditorPlugin

Clone this wiki locally