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.3 Direct work with repository

In this chapter we will discuss the work with entities which are taken directly from the repository server. This includes creation of a frame, architecture, interfaces, and subcomponents, switching between architecture and frame centric views, and refreshing the repository tree. Also this includes linking of interfaces ob borders of subcomponents and architectures.

3.3.1 Frame centric and architecture centric modes of the repository view.

There are 2 modes of possible views of the repository tree - frame centric and architecture centric. This is done for possibility of multiple points of views on the repository tree. The main difference between those two modes is that the frame centric shows frames firs and attaches implemented architectures as nodes to parent frames. On the other hand the architecture view gives possibility to view all architectures first and see all implemented frames attached to architectures as nodes. For example, if there are several architectures generated via the cushion extension they do not implement any frame until they are finally committed from the local cushion files. Thus those architectures are not visible on the frame centric mode because the frame centric mode assumes that all architectures implemented at least one frame. But the architecture centric mode shows all architectures independently if they implement a frame or not. But in the architecture centric mode there are no frames which are not implemented by any of architectures.

frame/architecture centric switch buttons
img 3.7 - frame/architecture centric switch buttons.


The frame centric mode is on by default.

3.3.2 Create frame

There are several ways to create a frame. This includes: create frame from the frame centric view - very simple way to create a frame, create frame from the architecture centric view and at the same time create new architecture which will implement new frame, and the last way is to create frame from the architecture centric view and select an existing architecture from the list of architectures, the selected architecture will implement new frame.

The first simple method of the frame creation should be done in this way: make sure the frame centric mode is the current repository view mode, then click the 'New frame' (new frame button) button which is located a bit higher then the 'Frame centric' (frame centric) switch button and then follow the steps in the frame creation wizard.

Frame creation wizard
img 3.8 - Frame creation wizard.

The Frame creation wizard includes two simple steps - the first is to type the name for the new frame and the 2nd is to click the 'Finish' button or press Enter key to finish the wizard. After frame is created, it is added to the list of frames at the Repository tree view and it can be accessed as well as all other frames from the tree.

The next way of the frame creation is to create a frame from the architecture centric mode and at once make it implemented by some architecture in order to be visible from the architecture centric view. To create frame it is required to follow these steps: make sure the architecture centric mode is on (architecture centric), then click the 'New frame' button (new frame button) and follow the steps of the frame creation wizard.

Frame creation wizard (arch. centric mode)
img 3.9 - Frame creation wizard (arch. centric mode).


This wizard includes 4 steps in order to create new frame along with the new architecture. First step is to tick the check box (the drop down list with names of architectures gets disabled), then type name of the new architecture, then type the name of the new frame. Then click finish or press the enter key to finish wizard and get the frame created. This frame will not be visible just from top because we are currently viewing the tree from the architecture centric mode. To see it we will need to expand the implementing architecture and then click on the name of the newly created frame. Then we will see its graphic representation on the draw area.

The last way of creating the new frame is shown below. Make sure the architecture centric mode is on (architecture centric), then click the 'New frame' button (new frame button) and follow the steps of the frame creation wizard.

Frame creation wizard (arch. centric mode)
img 4.0 - Frame creation wizard (arch. centric mode).


This wizard can be done in 3 easy steps. Make sure the check box is unchecked and the drop down list with names of architectures is enabled (the text field to type architecture name is disabled). Then select the name of an architecture from the drop down list, then type in the name of the new frame and then click 'Finish' or press the enter key to finish the wizard.

This frame will be visible at the 2nd level of nesting in the repository tree view. It will be accessible after the appropriate architecture node is expanded.

3.3.3 Create architecture

Creating of architecture does not provide such many possibilities as for the frame creation. The wizard for the architecture creation is the same both for the frame and architecture centric modes. This is because according to the meta-model requirements any architecture which is created using direct repository access must implement a frame. That is why the wizard provides possibility to select or create a frame to implement for both views. To start creation procedure just click the 'New architecture' button (new architecture button), it is located near the 'New frame' button.

Architecture creation wizard
img 4.1 - Architecture creation wizard.


The wizard gives 2 possibilities of the architecture creation - the first is to select frame to implement from the list, and the 2nd one is to create new frame to implement using the text field to type new name for the new frame. Any way each choice leads to the architecture creation.

3.3.4 Create interface

Interfaces can be created on frames, architectures and subcomponents. But the frame in fact is the interface container, and interfaces on architectures and subcomponents are just references to the frame which originally contains interfaces. This means that architecture which implements a frame with interfaces shows the same interfaces on its borders. The same is valid for a subcomponent. But on the other hand two different subcomponents can use interface from the same frame to create links to different entities. One interface can link to the containing architecture and another can link to the next subcomponent.

Now let's start from the interface creation on the frame borders. Click on a desired frame do get it drawn on the draw area. Then on the toolbar over the draw area select and interface of the appropriate type. When the interface is selected, the cursor is changed to the cross. Point by this cross some where on the frame area. The interface will appear on the nearest border.

selected frame in the list
img 4.2 - selected frame in the list.


The image 4.2 shows selected frame from the list of frames available in the repository. When any frame is selected, it is drawn in the GUI editor draw area.
drawn frame in the draw area
img 4.3 - drawn frame in the draw area.


Now, after frame is drown it is possible to put interfaces on it. The toolbar with interface buttons is visible on the screenshot.
the toolbar
img 4.4 - the toolbar.


The toolbar gives possibility to draw only interfaces. This is because frame does not support any other kinds of entities. Only interfaces can be put on frame. Please note, that the provided interface is drawn as a black rectangle and the required interface is drawn as the white one.
the interface is drawn
img 4.5 - the interface is drawn.


Now the interface is drawn. As soon as it is drawn we are able to change its properties. Interface properties includes name of the interface, interface's type (required or provided), communication style, collection property, factory property (which is available only when there are more than one interface on a border), list of features, and interface type properties - name, signature, and version of an interface type.

list of interface properties
img 4.6 - list of interface properties (Properties view).


The main here are interface type properties. It is possible to save interface without any interface type, but then it will be useless for any further actions. That is why it is very preferable to set interface type just after the interface is created. Also the list of properties can be collapsed and there is no need to make it such a big. The screen shot is done just for demonstration purposes.

The next way to create an interface is to create it on architecture's border. Now it is required to select architecture from the list of architectures. Then perform about the same steps as for the interface creation on the frame's border.

selected and drawn architecture
img 4.7 - selected and drawn architecture.


The architecture 'Arch7' is selected, it implements the frame 'Frame6', that is why already there is the interface on it. As you see, there are more available tools on the toolbar now. The architecture provides wider choice of tolls to operate.

architecture with interfaces
img 4.8 - architecture with interfaces.


Now the required (white) interface is added. It is simultaneously assigned to the implemented frame. It has totally same properties as the provided one. The only difference is type. But in fact both required and provided interfaces are instances of the same class. They are used for different purposes.

The last way of adding interface is to add it on subcomponent's border. The creation of the subcomponent will be described in the next chapter. Now we will illustrate how to add an interface to a subcomponent.

We instantiated subcomponent by a frame without interfaces. So, the subcomponent is empty now.

interface on a subcomponent
img 4.9a - interface on a subcomponent.


This was the last way of creating interfaces. Interfaces on a subcomponent are directly connected with instantiated entities. This means that as soon as a new interface is added, it is assigned to instantiated architecture and/or frame. But as was told before, it is possible to use the one interface instance on different entities for different connections.

3.3.5 Create subcomponent

The only possibility to create a subcomponent is to create it on architecture. Subcomponent's creation does not depend on architecture or frame centric view. It is just required to have an architecture drawn on the draw area. Then we should have the 'Subcomponent' button active. Click on this button and the cursor is changed to the cross sign. Then click over any place above the architecture. This will bring subcomponent creation wizard.

subcomponent creation wizard (1st page)
img 4.9 - subcomponent creation wizard (1st page).


The first page of the wizard asks to input name of the subcomponent and select type of entity (architecture or frame), which will instantiate the new subcomponent. When all data is set we c an proceed to the next page. Now we instantiate subcomponent by architecture.

subcomponent creation wizard (2nd page)
img 5.0 - subcomponent creation wizard (2nd page).


The second page offers to select an existing architecture from the drop down list or create a new one. It is recommended to use existing architectures for instantiation. Now let's come one step back and try to instantiate a subcomponent by a frame. To do this we should just switch radio button to the 'instantiate by frame' position.

subcomponent creation wizard (3d page)
img 5.1 - subcomponent creation wizard (3d page).


Here we can choose to create new frame or to select existing one. This is not really important. The drop down list is filtered and it is possible to select only frames which do not make any collision in existing repository. Now we click finish and the subcomponent is created.

subcomponent is created
img 5.2 - subcomponent is created.


The subcomponent is created and allocated on the architecture. It has only 3 properties and all of them are read only. So this is not too much of interest. You should remember that subcomponent's name can not be changed after it is created. This is valid for frames, architectures, and interface types. All of them have read only name properties.

subcomponent's properties
img 5.3 - subcomponent's properties.

3.3.6 Links

The link is created in this way. It is required to click on the link button (), which is located near the required interface button on the GUI editor toolbar. The click on an interface and drag mouse (do not release button after the click on the first interface is done) to another interface. When the mouse cursor is over other interface then release mouse's button. This should create a link with a square in the middle. Square means that link is multi-connectional. This means than many interfaces can be connected by one link. To add an interface to the connection you should click the link button, then click on the interface which should be added and do not release clicked mouse button. Then drag the mouse over link's square. When the cursor is over the square - release the button.

new link is added
img 5.4 - new link is added.


new interface is connected
img 5.5 - new interface is connected.


Link does not have properties. When a link is selected, only its type is shown. And all links in the repository are connectors.

3.3.7 Frame properties

Each frame has properties. This includes name, which is read only. The name can not be changed after the frame is created. Then it includes version. The version is important property. When version is changed, the entity is updates as versioned in the repository. Each version of an entity is stored in the repository. So, it is possible to checkout repository using cushion tool and receive needed version. Also frame has top level property. This is Boolean flag . When it is raised, the frame is declared as a top level frame.

frame properties
img 5.6 - frame properties.


Then there is list of behaviors. This list is introduced instead of one protocol property. Now it is possible to set many protocols for one frame. To add a behavior to the list it is necessary to click on the table. To remove a behavior it is enough to select a behavior (or many behaviors) by a mouse click and press the 'Del' key. The properties list works in the same way the behavior list works. The only difference - it has two columns.

3.3.8 Architecture properties

architecture properties
img 5.7 - architecture properties.



<< Previous | Table of contents | Next >>

Learn More