Creating ETypeParameter
Same as
creating EAnnotation.
Import and Export
Import
You can import existing ECore models in Poseidon for ECore.
IMPORTANT:
-
If the imported ecore model references another ecore model by file URI, it is assumed that the referenced ecore model file is located in the same folder as the imported one.
-
Platform URIs are not supported because they can only be resolved (and created) in Eclipse IDE.
If the imported ecore model references another model, than the referenced model is read-only in Poseidon. For example, you created a simple ecore model using Eclipse IDE tree editor for ecore:
This model has an EClass "MyClass" with an attribute "myAttribute". The type of the "myAttribute" is EBoolean which is defined in another Ecore model "Ecore.ecore". So, if you import that model in Poseidon, you will see both "My" and "ecore" packages, but "ecore" package will be read-only. You can drag-drop elements from the "ecore" package to the diagram, but you cannot change their properties.
Export
Poseidon stores its' models in xmi format. You can export your project into standard ecore model (an *.ecore file) using main menu item "Ecore -> Generate Ecore Model"
"Poseidon Metamodel" extension of Poseidon for ECore
Poseidon for ECore has an extension which allows to create metamodels for editor created with Poseidon for DSL framework. There are 2 actions in the "Poseidon Metamodel" menu of Poseidon for Ecore:
Start creating Metamodel for Poseidon
Creating a new editor in Poseidon for DSL framework starts with creating a metamodel for the editor. Elements in that metamodel must be inherited from the "core" Poseidon metamodel. The action "Start creating Metamodel for Poseidon" simplifies creation of such a metamodel. This action creates a new model with several EPackages: "ecore", "dsl" and "user". It also creates a diagram with 3 basic elements on it: "PoseidonCoreNamedElement", "PoseidonCoreNamespace" and "PoseidonCoreDirectedRelationship". Additional tools category "Poseidon Metamodel" is added to palette to allow creation of Poseidon nodes and edges:
When you create a "Poseidon Node" element on the diagram, it is automatically inherited from "PoseidonCoreNamedElement"; "Poseidon Edge" element is automatically inherited from "PoseidonCoredirectedRelationship", etc
Still, you can model the same model using tools from standard "Ecore" tools palette, i.e you can create an EClass and then create an Inheritance from that EClass to, say, "PoseidonCoreNamedElement". It will be exactly tha same as creating a "Poseidon Node" element, but requires more manual actions from you. The EClass_1 from the picture below is exactly the same (except the name) as "PoseidonNode_1" from the picture above.
Load Poseidon Core Metamodel into Project
This action does almost the same thing as
Start creating Metamodel for Poseidon action. The difference is that "Start creating..." action creates a completely new project and "Load Poseidon..." action loads Poseidon core metamodel into existing project.