EClass DragAndDrop

Defines a DragAndDrop tool. Typical use case: create objects. E.g. add Task to Functions. DragAndDrop defines what is created, the TEMPLATE e.g “CRN ‘http://www.oaam.de/oaam/model/v160/functions’ Input 1”. Needs a matching DropReception (by TEMPLATE class and target class) that typically does the integration e.g. “ADD #{DROPTARGET} inputs #{DROPITEM}”. Use the TEMPLATE as DROPITEM.

Must have providesTemplate=true and 1 factoryCmd with alias TEMPLATE. The factoryCmd is run once, then the TEMPLATE is cloned every time the tool is successfully used.

ePackage:

tools

inherits from:

Tool

referenced by:

PaletteCategory (via Tool)

contained by:

Editor (via Tool), ToolGenerator (via Tool)

EAttributes

icon (EString)

Defines the path to the tool icon. The path is relative to the editor’s repository URL.

id (EString)

Defines an unique id for the tool.

name (EString)

Defines the tool name.

providesTemplate (EBoolean)

DragAndDrop needs TEMPLATE, referenced as DROPITEM. EdgeRouting can have TEMPLATE, referenced as EDGEITEM. SelectionTool ignores template.

In the factoryCmd, exactly 1 EOQ Command has the alias TEMPLATE. The factoryCmd is run once and the resulting TEMPLATE then is cloned every time the tool is used. So make sure to only run commands in the factory that influence the TEMPLATE. Integration commands go to DropReception/EdgeDefinition.

tooltip (EString)

Defines a tooltip for the tool.

EReferences

factoryCmd (CompoundCmd) (lowerBound=0, upperBound=1) (containment)

Defines the command to create the drop item.

preview (Shape) (lowerBound=0, upperBound=1)

Defines the preview that is shown while dragging. The preview is defined by a shape object.