Create, edit and run models

1. Create a model

    After the model manager is running, in the model manager, you can open the new model window through the right-click menu of the mouse, and select the model you want to create in the new model window.

     For example, in the video below, choose to create an SWT Shell model, and the editing will be opened after the model is created.

2. Edit the model

    A model is a tree-structured data consisting of nodes and attributes like XML, so the basic way to edit a model is to write a model node's attribute form, and add and delete model's child nodes.

    The following video demonstrates editing a model's property form, adding child nodes of a model, and more.

3. Run the model

    Runable models usually define a run menu, such as the SWT Shell model in this tutorial, which can be run through the menu SWT->Run.


4. Basic knowledge

4.1. The principle of the model editor

    In a dynamic model, the structure of the model is also represented by the model. The structure of the model can indicate which attributes and child nodes the model has, and how the attributes are edited. Therefore, the editing form can be dynamically generated through the structure of the model, and the model can be edited through the form.     

4.2.Debug mode startup and hot deployment

    In IDEs, such as Eclipse and Idea, it is generally recommended to use Debug to start the model editor, and set it to be hot deployable, that is, classes can be automatically reloaded after Java code is modified.

    To start the model editor in Deubg mode, the main reason is that the dynamic model is generally dynamically programmed at runtime, so that when the Java code is modified, it is not necessary to restart the model editor.

Copyright ©  2007-2019  版权所有  沪ICP备08000575号