Getting Started with Dawn
This getting started describes how to get Dawn started. You will learn how to install the Dawn and we will examine the basic features.
Prepare your Environment
Dawn bases on CDO and thus you need to get CDO running before we can proceed. If you haven’t dealt with CDO before refer to the following tutorial. After you have managed to work through this tutorial you are prepared for the next steps.
If you are already experienced with CDO you can skip this step but you are encouraged to have a look at the tutorial again to make sure that your environment meets the same criteria as described in there. Installing Dawn
To get Dawn open the plug-in manager (Help->Install New Software…)
Because Dawn is a component of CDO which is maintained on the Indigo release train it can be obtained using the Indigo [ http://download.eclipse.org/releases/indigo update site].
After you have installed the SDK all you need is prepared to work with Dawn.
Running the example
Now that you have Dawn installed we will examine a small example to give you a feeling how Dawn works and what you can do with it.
Start the server
First you need to start the server. Do this as decribed in the CDO’s getting started. But add or change the following line in your cdo-server.xml.
<property name="overrideUUID" value=""/>
This is currently a pre-requirement to get Dawn started.
Now that the server is ready we can start working with Dawn. Dawn provides an own View that allows browsing through your repository – the Dawn Explorer. Users familiar with CDO will easily see its relationship to the CDO Sessions View. The Dawn Explorer can be openend as all other views from Window->Show View->others...
The Dawn Explorer opens by default a session to a repository which can be predefined in the Dawn Preferences section. As in the CDO Session View you can open additional sessions to connected to other repositories.
If you like to change the default connection, switch to the Dawn Remote Preferences (Window->Preferences). Here you can configure the connection which will be used by the Dan Explorer when opening.
Work with the editor
Now let us open an example diagram. This can be done using a specialized Wizard which is available for every generated GMF-editor.
We will create a class diagram example which is shipped with the Dawn Examples (Dawn Acore Diagram). Select it from the “Dawn Examples” category.
The next wizard page provides a similar view as the normal diagram creation wizard generated by GMF. But instead of browsing the file system this wizard shows your specified repository. As the GMF wizard it checks your diagram name for existence.
On the second wizard page you can insert the name of the semantic resource. This page is a bit special compared with GMF’s original page. If the resource does not exists, Dawn will create it as normal. But you can also specify an existing resource where you want to connect you new notational resource to. This allows to create different notational views on your existing semantic resource. If you select an existing resource you will notice a small warning in the upper left which gives you a hint that your are going to connect to an existing resource. Dawn can customize this behaviour to remove the warning or even forbid connection to a resource which exists. If you want to learn more about this read the "Generate the Sources Section"
But for now we just create a new resource. Name it default.acore.
A new diagram opens which behaves like a normal GMF diagram. But this stores every change in a CDO repository.
Now that you know how to create a diagram it is time to work collaborative on it. Open a new runtime instance from your eclipse instance.
In the new instance open the Dawn Explorer and move to your diagram resource.
Double click your notational resource as you would do it with its file system relative. The diagram opens and allows to manipulate the content. Create another class in the diagram and save it. While you do this watch your second instance.
Easy, isn't it? But what if both users are working on the same element? Well, let us find it out. Just move the newly created class in both diagrams and same the changes in own instance. The new state of the element is stored in the repository. But the second diagram now has unsaved changes which are not synchronized with the repository anymore. Well, a conflict arose. Dawn marks the conflicted element in the second diagram with a red border.
To solve the conflict right click the diagram pane and open the "Conflict->Solve Conflict" context menu. This allows to rollback the current session and to synchronize your diagram with the resource. Certainly Dawn also detects conflict also on semantic level and marks the related view.
Congratulation. You managed to work through this getting started. If you want to learn more about Dawn go back to the Dawn starting page and read the articles there.