Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to show EClass,EEnum and EDataType in ecore digram?
how to show EClass,EEnum and EDataType in ecore digram? [message #756960] Tue, 15 November 2011 17:50 Go to next message
sohrab Missing name is currently offline sohrab Missing nameFriend
Messages: 17
Registered: November 2011
Junior Member
Hello,

I use this annotated java interfaces for my metamodel, and create new ecore diagram, but my model's box is empty. How I can add EClass, EEnum and EDataType to my diagram?


/**
*
* @model
*/
public interface eXInput {
/**
*
* @model
*/
EList<EDataType> getDataTypes();
/**
*
* @model
*/
EList<EEnum> getEnums();
/**
*
* @model
*/
EList<EClass> getClasses();

}


what I see in ecore diagram:
www.jpg-upload.com/images/491empty_box.jpg
Thanks
Re: how to show EClass,EEnum and EDataType in ecore digram? [message #757858 is a reply to message #756960] Wed, 16 November 2011 10:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31546
Registered: July 2009
Senior Member
Sohrab,

These are non-containment references, so I assume you'd need to show an
EClassifier in the diagram so you can draw a link. You could do that by
loading a *.ecore resource in the outline view and then dragging
classifiers onto the diagram. Keep in mind that an EEnum is an
EEDataType so EEnum instances can be used in both your dataTypes feature
and your enums feature. Maybe you should have just a single classifiers
feature of type EClassifier...


On 15/11/2011 6:50 PM, sohrab wrote:
> Hello,
>
> I use this annotated java interfaces for my metamodel, and create new
> ecore diagram, but my model's box is empty. How I can add EClass,
> EEnum and EDataType to my diagram?
>
>
> /**
> * * @model */
> public interface eXInput {
> /**
> * * @model
> */
> EList<EDataType> getDataTypes();
> /**
> * * @model
> */
> EList<EEnum> getEnums();
> /**
> * * @model
> */
> EList<EClass> getClasses();
>
> }
>
>
> what I see in ecore diagram:
> www.jpg-upload.com/images/491empty_box.jpg
> Thanks
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: how to show EClass,EEnum and EDataType in ecore digram? [message #760104 is a reply to message #757858] Thu, 01 December 2011 10:37 Go to previous messageGo to next message
sohrab Missing name is currently offline sohrab Missing nameFriend
Messages: 17
Registered: November 2011
Junior Member
Thanks, it works well.
Re: how to show EClass,EEnum and EDataType in ecore digram? [message #881822 is a reply to message #760104] Tue, 05 June 2012 10:08 Go to previous message
Luc Touraille is currently offline Luc TourailleFriend
Messages: 3
Registered: June 2012
Junior Member
Hi,

I have the same need as Sohrab, namely I'd like to show Ecore elements on my diagram. I have an ecore model with a class having a reference to an EClassifier:

//in OCLinEcore:
property type : ecore::EClassifier[1] { !ordered,!unique };

//in XMI
<eStructuralFeatures xsi:type="ecore:EReference" name="type" ordered="false" unique="false"
    lowerBound="1" eType="ecore:EClass <ecore namespace>//EClassifier"/>


I generated an ecorediag file from my model, but this reference to EClassifier does not appear. I tried to load the Ecore metamodel by using "Load resource" from the contextual menu, but it is not possible to browse registered packages. I also tried to create a shortcut, but I can only select a model element from my workspace.

How can I make EClassifier appear on my diagram, so that the connections between my elements and EClassifier are shown?

Thanks,

Luc
Previous Topic:Adding new context menu option to a palette entry
Next Topic:[GMF Notation] Why reason ViewImpl.getElement() is customized
Goto Forum:
  


Current Time: Sat Oct 24 15:53:28 GMT 2020

Powered by FUDForum. Page generated in 0.01755 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top