IViewDefinitions.NewElementDef method
Namespace: NextDesign.Core
Description
Generates an editor element definition for the given model class.
argument
| Name | Type | Description |
|---|---|---|
| editor | IEditorDef | Editor Definition |
| name | string | editor element definition name |
| modelClass | IClass | Model Metaclass |
| type | string | Type of editor element - "SimpleShape" : simple shape - "CompartmentShape" : compartment shape - "Port" : port shape - "ConnectorShape" : Connector Shape - "TextBox" : Text Box - "CheckBox" : Check Box - "ComboBox" : Combo Box - "List" : List - "Grid" : grid - "ModelReferenceControl" : model reference control |
| path | string | Specify null for elements that do not correspond to the path string field of the corresponding metaclass. The default is null. |
| parent | IElementDef | Parent definition element Specify null when defining as an element directly under the editor definition. The default is null. |
Return value
Exceptions
| Name | Exception Class | Description |
|---|---|---|
| Invalid argument | ExtensionArgumentException | If parameter is invalid - Editor definition not specified - Metaclass not specified |
| Invalid type | ExtensionInvalidTypeException | If an unsupported editor element type is specified - An unsupported element type is specified for type - The parameter specification is inconsistent with the type specified for type do |
| Field not found | ExtensionFieldNotFoundException | If the field specified in the path was not found |
| Duplicate definition | ExtensionDuplicationException | When view element definition names are duplicated |