Context Menus

Home > Development Kit > Context Menus

There are various context menus provided for certain tasks. If you right-click e.g. on the entry MetamodelFolder metamodels of a repository project then you will see the following menu items in the popup window.

This is not the complete set of OOMEGA-specific menu items, but you can see quite a lot of them on the screenshot. Others appear in different contexts. The following paragraphs describe all specific menu items in detail.

Create ... as ...

Appears for:

  • Entity Object

Whenever you right-click on an entity object there will be several submenus that are called "Create ... as ..." – dependent on the composition relationships of the entity’s class.

If you right-click e.g. on the entry "MetamodelFolder Metamodels" then there will be exactly one "Create ... as ..." submenu available because the entity class MetamodelFolder owns only one composition relationship, namely children. Hence the submenu is actually called "Create ... as children".

Within those submenus you will notice at least one submenu item – dependent on the type of the composition relationship. They will contain the referenced entity class itself – if it isn’t abstract – and all concrete subclasses of that entity class.

In our example the composition children is of type FolderItem which is an abstract class with several concrete subclasses, namely Folder, ModelFolder, MetamodelFolder, File and Metamodel.

If you finally click on such a submenu item, a respective entity object will be instantiated and put into the correct composition relationship.

Find in Model Navigator

Appears for:

  • Entity Object

The "Find in Model Navigator" menu item is meant to locate an entity object in the Model Navigator's tree view.

If you right-click on e.g. an entity class representative in a graphical diagram and choose the "Find in Model Navigator" menu item, the tree in the Model Navigator will be expanded accordingly.

Search...

Appears for:

  • Entity Object

"Search..." offers a search for entity objects by prefix or pattern within the selected model repository. The results are shown in the "Search Result" view. A double-click on a search result will expand the tree in the Model Navigator accordingly.

Resolve...

Appears for:

  • Entity Object

"Resolve..." offers the possibility to search for a specific entity object by object identifier (OID) within the selected model repository. If the entity is contained in the repository the tree in the Model Navigator will be expanded accordingly.

Metamodel Import

Appears for:

  • Folder

If you right-click on a folder within a model repository you might notice the submenu "Metamodel Import" with one or more menu items. Each menu item represents a previously designed metamodel. Metamodels will only appear if you have generated code for the persistency domain and created the respective Eclipse plug-ins in the workspace of the first Eclipse workbench.

If you click on a menu item in the "Metamodel Import" submenu then the metamodel will be imported into the selected folder of the model repository. This is a pre-requisite to create model instances within the same repository.

XML and XSD

The "XML and XSD" submenu provides menu items for OOMEGA's XML support.

Import XML as ...

Appears for:

  • Entity Object

Whenever you right-click on an entity object there will be several menu items that are called "Import XML as ..." – dependent on the composition relationships of the entity’s class.

If you right-click e.g. on the entry "MetamodelFolder Metamodels" then there will be an "Import XML as children" menu item available because the entity class MetamodelFolder owns the composition relationship children.

If you finally click on such a menu item, a file browser will appear and you can select a XML file that must represent an instance of the entity class referenced by the aformentioned composition. In our example the XML content must represent a FolderItem.

Import XML-File...

Appears for:

  • Repository Project
  • SDF File

You can import a XML document to a repository project or SDF file. If you right-click on one of those and select the menu item "Import XML-File..." a file browser will appear. Then select the XML document that should be imported into the repository.

Export to XML-File...

Appears for:

  • Repository Project
  • SDF File
  • Entity Object

You can export the contents of a repository project, SDF file or entity object to XML. If you right-click on one of those and select the menu item "Export to XML-File..." a file browser will appear. Then specify the file location where the XML content should be stored.

Import XSD-File(s)...

Appears for:

  • Folder
  • Metamodel

You can import a XML schema (XSD) into a repository folder or metamodel. If you right-click on one of those and select the menu item "Import XSD-File(s)..." a file browser will appear. Then select the XSD document that should be imported into the repository. By the way, that XSD document might reference other XSD documents as well.

Export to XSD-File(s)...

Appears for:

  • Metamodel
  • Metapackage

You can export the contents of a metamodel or metapackage to XML Schema (XSD). If you right-click on one of those and select the menu item "Export to XSD-File(s)..." a file browser will appear. Then specify the file location where the XSD content should be stored.

SDL

The "SDL" submenu provides menu items for importing and exporting metamodels from and to SDL - OOMEGA's Java-based syntax for metamodels.

Import SDL...

Appears for:

  • Folder

You can import a filesystem's folder containing SDL definitions into a repository folder. If you right-click on a repository folder and select the menu item "Import SDL..." a file browser will appear. Then select the filesystem's folder containing SDL definitions that should be imported into the repository's folder.

Export to SDL...

Appears for:

  • Folder
  • Metamodel

You can export the contents of a repository's folder or metamodel to SDL. If you right-click on one of those and select the menu item "Export to SDL..." a file browser will appear. Then specify the filesystem's folder location where the SDL content should be stored.

Statistics...

Appears for:

  • Entity Object

You can choose the menu item "Statistics..." for an entity object. Then a window will pop up that shows how many entity objects are contained within the selected entity object. Apart from the total sum the occurences with respect to types are shown.

OOMEGA Incubator...

Appears for:

  • Repository Project
  • Folder with SDL content
  • SDF File

The context menu item "OOMEGA Incubator..." appears for repository projects, folders with SDL content and SDF files. Use that entry to start the metamodelling tool OOMEGA Incubator.

When started the first time there will be a prompt for connecting to the internet in order to request an evaluation or activation license. After the creation of some metamodels you can get back to Eclipse. Then you will notice a new Eclipse project, namely OOMEGA with a licenses folder in it. This is the place where the evaluation or activation license has been stored.

OOMEGA Generator

The "OOMEGA Generator" submenu's purpose is to generate code for your metamodels, i.e. for the persistency domain. Please notice that the product OOMEGA Generator is capable of generating code for your models as well, but this can only be done with the provided Ant tasks, namely jgenc and jgen.

Generate Core Sources

Appears for:

  • Repository Project
  • Folder with SDL content
  • SDF File

"Generate Core Sources" generates the Java code for all metamodels within your model repository. That code is always needed when you want to instantiate your metamodel, i.e. to create a model. The result is stored within the "build/temp/generate/metamodel" folder of the "OOMEGA" project.

Generate Hibernate Sources

Appears for:

  • Repository Project
  • Folder with SDL content
  • SDF File

"Generate Hibernate Sources" generates the Hibernate mapping for all metamodels within your model repository. That mapping is always needed when you want to instantiate your metamodel and store the model within a SQL database. The result is stored within the "build/temp/generate/metamodel" folder of the "OOMEGA" project.

Delete Generated Sources

Appears for:

  • Repository Project
  • Folder with SDL content
  • SDF File

"Delete Generated Sources" deletes the generated Java code and Hibernate mapping for all metamodels within your model repository.

Create Plug-in in Workspace

Appears for:

  • Eclipse Folder ("*-Plugin")

The "OOMEGA" project contains an Ant script within the "etc" subfolder. That script can be executed to build the previously generated source code. The result is stored within the "build/output" folder of the "OOMEGA" project.

  • "build/output/lib" contains the generated JAR files
  • "build/output/plugin" contains the generated Eclipse plug-in projects

You can right-click on such a generated Eclipse plug-in project folder and select the menu item "Create Plug-in in Workspace". The plug-in project will then be plugged into your workspace - which is a prerequisite for modelling within a second Eclipse workbench.

Next chapter: Metamodelling Concepts

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.