New File for the UMLX Editors

You may create KM3, OCL, QVTc or QVTr files in any project, however you should add the corresponding nature to the project in order to get consistent conversion of text (concrete syntax) to XML (abstract syntax) and useful error markers. You may therefore skip the create project step and use an existing project.

Step 1: Create Project

From the Eclipse main menu invoke File->New->Project...
Select General->Project, then Next
Enter a project name such as Temp and then Finish.

Step 2: Add KM3 or OCL or QVTcore or QVTrelation Nature to Project

Select your project (Temp) and from the right button menu invoke UMLX Natures->Add *** Nature for each concrete syntax for which you require automatic conversion of concrete syntax text to abstract syntax XML.

Step 3: Create New File

From the Eclipse main menu (or project right button menu) invoke File->New->Other...
Select UMLX File Creation Wizards->QVTrelation text File (or QVTcore or KM3 or OCL) then Next
Select your project (Temp) as the container and new_file.qvtr as the file name then Finish.

For a new QVTr file the editor should open up showing

The example uses the leftMM and rightMM meta-models, neither of which exist, so these contribute the first two errors. These are presumed to supply the Left and Right classes, whose absence produces two further problems.

Step 4: Create a Meta-Model File

You may remedy the missing meta-models by:

From the Eclipse main menu (or project right button menu) invoke File->New->Other...
Select Example EMF Model Creation Wizards->Ecore Model then Next
Select your project (Temp) as the container and Left.ecore as the file then Finish.

Within the editor for Left.ecore, select Show Properties View (from the right button menu).
Rename the root package to left (from null), by opening the root resource to show the null package, selecting it and changing its Name to left (in the Properties View).
Create the Left class, by invoking New Child->EClass from the right button menu of the left package. Specify its Name as Left in the Properties View.
Save and close left.ecore.

Step 5: Bind a Meta-Model Accessor Name to a Meta-Model File

This model may now be used to resolve the leftMM reference.

Invoke UMLX Natures->Add Model Registry Nature from the right button menu of your project (Temp), so that the project has a Model Registry Property Page.

Invoke Properties, Model Registry from the right button menu of your project (Temp) to open up the Model Registry Property Page.

In the Property Page for the Model Name Accessor, invoke New...
Enter leftMM, and use Browse Workspace... to locate left.ecore.

Hit OK and OK to complete the registration.

The errors associated with the leftMM should now disappear.

You may repeat for the rightMM, but by now you are probably ready to use your own models.