SOFA 2.0 Editor - GUI Repository Designer for Eclipse

NEWS

2007-06-10

SOFA 2.0 repository editor v. 1.3.0 released. Changes »

2007-02-10

SOFA 2.0 repository editor v. 1.0.149 released.

2006-10-21

Work on the plug-in is started. History »

MANUALS

Compiling and installation

User's manual

Usage scenarios

Developer's manual

UML diagrams

Java docs

Author MaViNes (c)

ARTICLES

OSGI Framework

Eclipse plugin basics

RCP basics

SWT draw basics

jFace tips

SWT Linux/Windows differences

Author MaViNes (c)

<< Previous | Table of contents | Next >>

3.4. Working with cushion extension

Cushion extension allows local generation and further editing of the SOFA 2.0 entities.

3.4.1. Creating new cushion project

To create new cushion project it is required to open the File->New->Project menu or click the button New and select the Project from the drop down list of options.

create new cushion project
img 5.8 - create new cushion project.


Then select SOFA 2.0 projects -> new repository project. In the wizard it is required to type any desired name of a project to be created. Then the folder with typed name will appear in the Package Explorer.

create new cushion project (wizard page)
img 5.8 - create new cushion project (wizard page).


The new project will be created in the current project workspace. It does not differ from other project created in the Eclipse IDE until the first cushion entity is generated. Cushion generates file _config.cfg which is used to track all versions and names of entities generated within the current project. It generates all entities in this way: when a creation wizard is finished, and all data from user is collected, it creates a folder named as new entity should be called and adl.xml file inside this folder. When user wants to edit properties of an entity, it is required to edit this adl.xml file inside the created folder. There is special multi-page editor for these purposes.

3.4.2. Package explorer, cushion view, multi-page editor

All cushion projects are visible from the Package Explore, the default Eclipse package explorer. To edit properties of any entity it is required to open it in the editor from the Package Explorer. New entities can be generated using contribution to the context menu of the Package Explorer. Cushion view is used to display graphical representation of a currently edited entity. It looks like almost the same as the GUI editor for the direct repository editing, but the main difference is the cushion view does not have tool bar with buttons. All interfaces and subcomponents are created using appropriate buttons on the multi-page editor's pane. The multi-page editor itself is the editor part which is opened when any adl.xml file is double clicked from the Package Explorer. It is impossible to avoid its opening and substitute editor with a view. This is due to closed architecture of the Package explorer.

3.4.3 Create new interface type

The first step in developing the project is to create interface type. It is possible to create any cushion entity at any time, but logically it is better to create interface types first, then frames, and only then architectures. This is because entities should be committed in this order. Frames can not be committed until interface types which are used by interfaces are committed, and architectures can not be committed until implemented frames are committed. That is why we recommend this order of entities creation.

There are 2 ways to create each cushion entity. The first we can call appropriate creation wizard from the context menu of the Package explorer, and the second way is to use File->New->Other->SOFA projects->New: menu. The interface type is not exception in this case.

context menu to create new interface type
img 5.9 - context menu to create new interface type.


To create new interface type from the context menu right mouse click on the project's name or any file inside the project. Then select SOFA repository->new ITF option. This will bring the same wizard as for the File->New->Other->SOFA projects->New ITF option.
The wizard asks to input all interface type properties: name and signature. When this is done, it is not necessary to edit the interface type at all (if you are not going to change signature for sure). After the interface type is created, it can be committed at once.

new interface type wizard
img 6.0 - new interface type wizard.


It is also possible to select containing project for the interface type. By default this is currently open project. But if user ha more than one project open, it is possible to select another project using the Browse: button, or just type project's name in the appropriate text field.

3.4.4 Create new frame

After all needed interface types are created (and possibly committed to the repository server) we can proceed to the next step and start to create frames. In fact there is no difference between interface type and frame in calling the appropriate creation wizard from the context menu or from the File->Other->SOFA project->New frame menu. Except user shell select all menus as for the new frame instance.

context menu to create new frame
img 6.1 - context menu to create new frame.


To create new frame from the context menu right mouse click on the project's name or any file inside the project. Then select SOFA repository->new Frame option. This will bring the same wizard as for the File->New->Other->SOFA projects->New Frame option.
The wizard asks only for name of the newly created frame. All other properties should be edited via the multi-page properties editor after the frame is created.

new frame wizard
img 6.2 - new frame wizard.


It is also possible to select containing project for the frame. By default this is currently open project. But if user has more than one project open, it is possible to select another project using the Browse: button, or just type project's name in the appropriate text field.

After the frame is created, it is visible in the list of entities in the package explorer. To edit its properties, expand the frame's folder and double click (or hit the enter key) on the adl.xml file. The multi-page editor should be opened.

frame properties
img 6.3 - frame properties.


The frame properties include frame name (which can not be edited), list of behaviors and list of properties. Both lists can be easily edited. To delete one or more rows from tables select row using mouse (and ctrl/shift key to select multiple) and hit the 'Del' button on the keyboard.
In the properties list you can also see button to create new interface and the interface properties tab which is not active until any interface is selected.

3.4.5 Create new interface

To create an interface it is required to have opened an editor for frame properties. When frame properties editor is open, then it is needed to click the 'new interface' button and new interface will be automatically added on the border of the currently active frame. By default it is provided (black), it is possible to change its type in the interface properties when the interface is selected.

new interface on frame's border
img 6.4 - new interface on frame's border.


The interface should be selected (its borders should be green) in order for the Interface properties tab to be enabled in the Frame properties editor.

interface properties tab
img 6.5 - interface properties tab.


The interface properties tab allows to change name of the interface, change its type (provided/required) and set interface type which will be assigned to the interface. It is also possible to delete an interface when it is selected just by hitting the 'Del' key on the keyboard.

3.4.6 Create new architecture

After all needed frames are created (and possibly committed to the repository server) we can proceed to the next step and start to create architectures. In fact there is no difference between architecture and frame in calling the appropriate creation wizard from the context menu or from the File->Other->SOFA project->New architecture menu. Except user shell select all menus as for the new architecture instance.

context menu to create new architecture
img 6.6 - context menu to create new architecture.


To create new architecture from the context menu right mouse click on the project's name or any file inside the project. Then select SOFA repository->new Architecture option. This will bring the same wizard as for the File->New->Other->SOFA projects->New Architecture option.
The wizard asks only for name of the newly created architecture. All other properties should be edited via the multi-page properties editor after the frame is created.

new architecture wizard
img 6.7 - new architecture wizard.


The wizard also offers to input version value, but it is really optional. The version will be generated automatically later, when the engine will generate adl.xml file and store changes to the _cushion.cfg file.

It is also possible to select containing project for the architecture. By default this is currently open project. But if user has more than one project open, it is possible to select another project using the Browse: button, or just type project's name in the appropriate text field.

After the architecture is created, it is visible in the list of entities in the package explorer. To edit its properties, expand the frame's folder and double click (or hit the enter key) on the adl.xml file. The multi-page editor should be opened.

architecture properties page
img 6.8 - architecture properties page.


The architecture properties page allows to change mapped properties and set the frame to be implemented by the architecture. The frame must be set in order to commit architecture properly. Mapped properties are optional. The properties editor also provides the 'New subcomponent' button and the subcomponent properties tab. This tab is active only when a subcomponent is selected.

3.4.7 Create new subcomponent

In order to create a new subcomponent is is required to have an architecture opened for editing. When the architecture is open, then click on the 'New subcomponent' button near the save button and new subcomponent will be automatically placed on the architecture.

subcomponent on the architecture
img 6.9 - subcomponent on the architecture.


The subcomponent should be selected (its borders should be green) in order for the Subcomponent properties tab to be enabled on the Architecture properties editor. The selected subcomponent can be easily deleted just by hitting the 'Del' key on the keyboard.

subcomponent properties tab
img 7.0 - subcomponent properties tab.


The subcomponent properties tab allows changing the name of the subcomponent, and setting of the instantiated entity (architecture or frame). The instantiated entity must be set in order to commit architecture properly. As soon as user switches between possible frame and architecture alternatives, the drop down list is refreshed accordingly.

3.4.8 Committing to the repository

When all work is done, it is useful to save it and then commit all changes to the repository. Saving can be done by the save button directly on the property editor pane or by the global save button on the Eclipse toolbar - this is regular save button which is used to save changes to any file changed in the Eclipse IDE, do not mix with save all changes to the repository button.

commiting changes
img 7.1 - commiting changes.


successful commit
img 7.1a - successful commit.


But it is preferable to commit all changes at once - select the root folder (name of the project) and perform all the same things as for the 1 item commit. This means right click on the root folder of the project, then select commit from the SOFA repository menu and wait until a message is shown.



<< Previous | Table of contents | Next >>

Learn More