Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

Gloop model editor

The Gloop model editor is used for adding, removing, and editing the properties of a Gloop model. It works in conjunction with the Properties view, where meta-properties1 are displayed and can be configured.

Gloop model editor

Gloop model editor

Opening a Gloop model renders the Gloop model editor visible. To open a Gloop model, double click its .model file from the Navigator view or select the file (either via clicking or arrow keys) and press .

Object properties

To show the properties of the Gloop model, you can either click the Show Model Properties button from the editor toolbar or click on any empty space in the model tree.

The *Show Model Properties* button, as seen in the toolbar

The *Show Model Properties* button, as seen in the toolbar

Adding properties

The ways in which you can add a property to Gloop model are:

  • Using the toolbar

    1. Click the plus-shaped green button in the toolbar.
    2. Click one of the menu items in the appearing menu to select the type of property you want to add.

    Adding a new property using the toolbar

    Adding a new property using the toolbar

  • Using the context menu

    Right click on the model tree, select Add, and then click the type of property you want to add.

    Adding a new property using the context menu

    Adding a new property using the context menu

  • Using keyboard shortcuts

  • Via content-assist

    Adding a new property using content-assist

    Adding a new property using content-assist

Depending on the context of where you choose to add a property, the to-be-created property may either be added as the property of the opened Gloop model, or the property of another property that is a Gloop model. For example, selecting a Gloop model property (a property that is a Gloop model) in the tree and then adding a new property from there will add a new property to that Gloop model instead of the root Gloop model.

Renaming a property

There are multiple ways to rename a Gloop model property:

  • Using context menu

    Right-click the property then select Rename.

    Renaming a property using the context menu

    Renaming a property using the context menu

  • Using the Properties view

    Select the property to be renamed, go to the Properties view, and then change the value of the Name property.

    Renaming a property using the Properties view

    Renaming a property using the Properties view

  • Using keyboard shortcuts

    Select the property you want to rename and then press the or key to rename it.

Deleting a property

You can delete a Gloop model property by:

  • Using the toolbar

    Select all the properties you want to delete and then click on the red 'x' button in the toolbar.

    Delete button for properties in the Gloop model editor toolbar

    Delete button for properties in the Gloop model editor toolbar

  • Using the context menu

    Select all the properties you want to delete, right click, and then select Delete.

    Deleting a property using context menu

    Deleting a property using context menu

  • Using keyboard shortcuts

    Select all the properties you want to delete and then press .

Adding referenced Gloop models

You can also add an existing Gloop model as a property. When the model is added, you will see a parenthesis with a name in it, which is the name of the referenced model. You will also see that its Reference object property has the same value. These models are called referenced Gloop models.

To add referenced Gloop models as a property, you may:

  • Use content assist
  • Drag and drop the model from the Navigator view to the model tree

Here is a short demonstration showing the use of both options:

Adding a referenced model as a property

Adding a referenced model as a property

Unmodifiable properties

A referenced Gloop model's properties could not be modified, but you can add more properties. You can also modify the object properties of a referenced Gloop model but not the object properties of its referenced Gloop models, if any (for nested Gloop models).

Opening a referenced model from the Gloop model editor

You can open a property's referenced model in the editor by right-clicking the property and then selecting Open Declaration. You can also do this using the Open Declaration button in the Properties view, which appears when the property is selected. You can also press on the selected property to do the same.

Opening a referenced Gloop model from the Properties view

Converting a property's type

When you've mistakenly added a model property with the wrong type, rather than deleting the property and adding a new property with the appropriate type, you can convert its type instead.

To convert the property type of a property:

  1. Right click on the property.
  2. Select Convert To from the appearing context menu.
  3. Select the appropriate type from the nested menu.

Converting a Gloop model property's type

Converting a Gloop model property's type

After converting a property, you will be able to see the icon change, as well as the Type object property from the Properties view.

Moving properties

You can also rearrange your model properties by moving them. You can move properties up, down, left, and right. Moving up means the selected property will switch places with the property that was originally above it. Likewise, moving down means the selected property will switch places with the property originally below it. Moving left would prompt Martini to place the property under the nearest model above the property; the same goes for moving right, but it would go under the nearest model underneath the property.

There are multiple ways to move properties:

  • Using the toolbar

    To move properties using the toolbar, select all the properties you want (select multiple by pressing while left-clicking) to move and then click on one of the arrowhead-shaped buttons.

    Move buttons highlited in the Gloop model editor toolbar

    Move buttons highlited in the Gloop model editor toolbar

  • Using keyboard shortcuts

  • Via drag and drop

    Moving a property via dragging and dropping

    Moving a property via dragging and dropping

Adding comments to a property

You can add comments to model properties. When a model property has a comment, you will be able to see it in the model tree. There are three ways to add a comment:

  • Using the Properties view

    In the Properties view, go to the Comments tab, and then add your comments in the provided text area.

    Add comments using the Properties view

    Add comments using the Properties view

  • Using keyboard shortcuts

    Select a property, press , and then type in your comments for that property.

  • Using the toolbar

    Toggle button for comments in the Gloop model editor toolbar

    Toggle button for comments in the Gloop model editor toolbar

Searching properties

You can search Gloop model properties via the search bar located in the toolbar of the Gloop model editor. Martini tries to find properties whose Name object property matches the typed-in text in the search bar.

JSON and XML representations

You can also check the JSON or XML representation of a Gloop model property simply by clicking the Show JSON or Show XML button in the toolbar, respectively. The JSON and XML definition also shows the value of the property based on the meta property Default Value.

Toggle for JSON or XML definitions in the Gloop model editor

Toggle for JSON or XML definitions in the Gloop model editor

Shortcuts

Command Description Shortcut
Add big decimal Adds a big decimal property ⌥⇧D
Add big integer Adds a big integer property
Add boolean Adds a boolean property
Add byte array Adds a byte array property
Add byte Adds a byte property
Add character Adds a character property
Add date Adds a date property
Add double Adds a double property
Add float Adds a float property
Add integer Adds a integer property
Add long Adds a long property
Add model Adds a model property
Add object Adds a object property
Add short Adds a short property
Add string Adds a string property
Rename Renames the selected property or
Delete Deletes all selected properties
Move property up Switches the selected property with the property above it
Move property down Switches the selected property with the property below it
Move property left Takes the property out of the model property it is under
Move property right Adds the property as a property of the nearest model above it
Add property comments Adds a comment to the selected property
Open Declaration Opens the referenced model's file

Customize shortcuts

The shortcuts listed above are the default keyboard shortcuts for Martini Desktop. You can modify these key-action mappings by opening the Preferences menu, expanding General, and then clicking on Keys.

Command Description Shortcut
Add big decimal Adds a big decimal property
Add big integer Adds a big integer property
Add boolean Adds a boolean property
Add byte array Adds a byte array property
Add byte Adds a byte property
Add character Adds a character property
Add date Adds a date property
Add double Adds a double property
Add float Adds a float property
Add integer Adds a integer property
Add long Adds a long property
Add model Adds a model property
Add object Adds a object property
Add short Adds a short property
Add string Adds a string property
Move property up Switches the selected property with the property above it
Move property down Switches the selected property with the property below it
Move property left Takes the property out of the model property it is under
Move property right Adds the property as a property of the nearest model above it
Add property comments Add comments to the selected property
Open Declaration Opens the referenced model's file

Show shortcuts

To show the entire list of shortcuts, press .


  1. Or in other words, the properties of a property.