Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore Model Editor help
Ecore Model Editor help [message #1802626] Tue, 12 February 2019 23:26 Go to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 38
Registered: September 2009
Member
I am having two problems that probably have easy solutions.

1. I have right clicked the Sample Ecore Model Editor and selected "Load Resource..." I've loaded several resources while trying to solve problem #2. How do I unload these resources? I have searched the source for the .ecore file and the .genmodel file and can't find any mention of the resources I've loaded. However, when I close and reopen the ecore file, there they are. How do I remove resources I don't need?

2. I want one of my generated EClasses to inherit from org.eclipse.emf.common.notify.Adapter so that I can add it to another EObject's eAdapters collection. What resource do I need to load to put Adapter in the scope necessary to add it to the list of my EClass' ESuper Types.

Thanks for the help!
Re: Ecore Model Editor help [message #1802673 is a reply to message #1802626] Wed, 13 February 2019 18:18 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6537
Registered: July 2009
Senior Member
Hi

1. Referenced resources will perist, so you need to remove your experimental references. Sometimes I find it easier to edit the XMI with a text editor and delete XML elements there.

2. There is no Resource with an Adapter, since it is a Java class. You can reference any Java class by defining an EClass and specifying its instanceClassName. Or you manually annotate the generated Java with an @extends. Adding an EObject as an eAdapter seems like a really bad idea. I suggest a rethink, perhaps using a regular reference.

Regards

Ed Willink
Re: Ecore Model Editor help [message #1802681 is a reply to message #1802673] Wed, 13 February 2019 22:21 Go to previous messageGo to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 38
Registered: September 2009
Member
Quote:
1. Referenced resources will perist, so you need to remove your experimental references.


But, how do I do that? For example, I loaded platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore. When I search the XMI contained in my ecore model, I cannot find anything containing "emf.ecore." There must be some other place that Eclipse stores which resources have been loaded into the .ecore model.

Re: Ecore Model Editor help [message #1802682 is a reply to message #1802681] Wed, 13 February 2019 22:27 Go to previous message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 38
Registered: September 2009
Member
Never mind. I had to restart Eclipse and the unused references disappeared... That's annoying.

Previous Topic:[CDO]
Next Topic:[CDO]
Goto Forum:
  


Current Time: Wed Dec 11 00:50:03 GMT 2019

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

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

Back to the top