Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Unable to Edit Dynamic Ecore Model Instance(Dropdown arrow doesn't appear on dynamic instance after loading several resources.)
Unable to Edit Dynamic Ecore Model Instance [message #1837081] Thu, 21 January 2021 17:31 Go to next message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Everyone,

I have been trying to create example dynamic instances from a model I designed based on a system presented in a research paper, relevant to study regarding some of my own work. I am editing in Ecore context with Eclipse, creating dynamic instances of classes from the model here.

I loaded several resources into a few instances and have been able to edit those instances afterward. However, after several resource loads on different instances, I find that the dropdown arrow in the editor for changing attribute values in a given instance disappears. When I load a resource, I right-click on the top file (the instance itself), select "Load Resource..." and then proceed to do so.

The odd issue here is I find only some instances affected by this issue, but not all. I have attached an image for the Requirment class instance (called cameraRequirement) I have created, showing the arrow is missing, but also expanding the ecore model showing that there should be attributes to edit.

I am wondering if there may be something I am performing incorrectly with the instance resource loading step? Any insights would be greatly appreciated.

Thank you,
Ioannis Nearchou
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837097 is a reply to message #1837081] Fri, 22 January 2021 05:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
It looks like some of the resources (all the top-level objects in your view are resources) don't have any contents that were successfully loaded. Normally when you load and there are failures, an additional tab would be available/presented showing those problems. Perhaps the resources are literally just empty. I can't say from a picture. You might want to inspect the Error Log view to see if there are exceptions being logged while opening the editor.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837421 is a reply to message #1837097] Fri, 29 January 2021 16:38 Go to previous messageGo to next message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Mr. Merks,

How are you? Thank you for the suggestions. Unfortunately, my error logs contain no information regarding loading errors. I tried this with a simpler model with just three classes: System, Analyzer, and Configuration. System has bidirectional composition relationships with both Analyzer and Configuration, while Analyzer and Configuration have a bidirectional association between them.

I get the same loading issue when loading my Configuration instance into an Analyzer instance, after connecting the Analyzer instance to System. It is at this time where the issue occurs. However, due to the association to System, which still has an arrow on its file to access its associations, I am able to change the values of Configuration and Analyzer attributes in the editor. I tried looking at the files themselves, and all of them seem to have association references written to each other. I am wondering if there are any further screenshots or other information that I could provide to help constrain the possible issues or where else I can check to find the resource loading issues?

Thank you,
Ioannis Nearchou

Re: Unable to Edit Dynamic Ecore Model Instance [message #1837444 is a reply to message #1837421] Sat, 30 January 2021 06:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
I'm not sure if these "associations" you refer to are containment or non-containment references. If they are containment references, they probably should not be, or should have Resolve Proxies set to true so that the referenced object can be contained at the root of a different resource.

Of course there is always the debugger you can use to track down what's going on . You can launch a self-host Eclipse IDE in debug mode for that purpose...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837763 is a reply to message #1837444] Fri, 05 February 2021 15:42 Go to previous messageGo to next message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Mr. Merks,

Thank you for the suggestion! The connections from System to the other classes were compositions, so the other classes had the containment set to true. Changing the class associations by setting containment to false solved the issue.

However, this leaves me with a related question on the ability to change attributes of resources that have containment set to true. There is another ecore project that came from my predecessor which has composition relationships between classes. When I create instances of the classes and connect them, I am able to change attribute values on resource files that have containment.

I am wondering why resources in my example project cannot be updated from their files if they have containment, but the resources in the other project can be updated in their own files if they have containment too?

Thank you,
Ioannis Nearchou
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837768 is a reply to message #1837763] Fri, 05 February 2021 20:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
In your example is Resolve Proxies true? A containment reference can cross resource boundaries (i.e., the container is in one resource and the contained object is in another) only if Resolve Proxies is true.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837855 is a reply to message #1837768] Mon, 08 February 2021 16:41 Go to previous messageGo to next message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Mr. Merks,

Yes, in my example all connections have Resolve Proxies set to true.

Thank you,
Ioannis Nearchou
Re: Unable to Edit Dynamic Ecore Model Instance [message #1837857 is a reply to message #1837855] Mon, 08 February 2021 19:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Unfortunately I am not a ble to debug your problem via the forum.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Unable to Edit Dynamic Ecore Model Instance [message #1838007 is a reply to message #1837857] Fri, 12 February 2021 18:58 Go to previous message
Ioannis Nearchou is currently offline Ioannis NearchouFriend
Messages: 18
Registered: February 2018
Junior Member
Hello Mr. Merks,

Thank you again for giving me some ideas where to start with finding the reasons for the differences. I can constrain what to search when looking for those reasons and hopefully find them in reduced time from here.

Thank you,
Ioannis Nearchou
Previous Topic:[CDO] Basic use of CDO programmatically
Next Topic:generate USE specifications form EMF metamodels or .ucls UML class diagrams
Goto Forum:
  


Current Time: Fri Mar 29 15:11:29 GMT 2024

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

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

Back to the top