"Invalid referenced element is selected" message by "Import Metamodel"

155 views
Skip to first unread message

Emre Taspolatoglu

unread,
Mar 24, 2014, 4:53:38 AM3/24/14
to emf-pr...@googlegroups.com
Hello there, hope you can help with the following issue.

I have created a EMF profile with the epfprofile_diagram editor and saved it. There are two elements "EClass" and "EObject" in it as imported meta model elements from the ECore metamodel. After a save and reopening, I am somehow unable to import further metamodel elements. The dialog, that is being opened from the context menu "Import Metamodel" via right-click, tells upon choosing any metamodel the following error:

Referenced element:  Invalid referenced element is selected

It doesn't matter what kind of a metamodel it is. I have also tried deleting the two already imported metamodels and reimporting them. The same result. Maybe to mention is that I have checked the EMF Profiles from GIT and I am on the develop-kit branch, so every action above is being done in runtime Eclipse instance.

Do you have any idea, what the problem might be? If necessary I can try to deliver more information.

Thanks and best regards!

Emre

Emre Taspolatoglu

unread,
Apr 3, 2014, 8:38:36 AM4/3/14
to emf-pr...@googlegroups.com
Hello again,

I just wanted to remind that the mentioned problem still exists and that I would be very glad to get a response from you. Thanks again!

Best regards,
Emre

Emre Taspolatoglu

unread,
Apr 3, 2014, 9:22:32 AM4/3/14
to emf-pr...@googlegroups.com
Hello again,

so I was just able to reproduce the problem. The first time creating a profile application I can import all the possible elements from registered meta-models and as many times possible. I can save the profile application, or close the graphical editor and open it again, or close and open the whole project. It is then still possible to import new meta-model elements. But as soon as the workspace in which the profile application and its project reside in is closed and opened again later, the profile application becomes somehow locked and I couldn't import further meta-model elements. With the previous error message "Referenced element:  Invalid referenced element is selected".

Hope this information helps further. Have you also experienced such a problem before? Or maybe this is intently so?

Thanks and best regards,
Emre

Emre Taspolatoglu

unread,
Aug 28, 2014, 11:11:43 AM8/28/14
to emf-pr...@googlegroups.com
Hi there again,

it's been awhile since I have reported the problem above. But the issue still exist, and was hoping to get a feedback regarding it.

Thanks in advance!

Cheers,
Emre

philip...@gmx.de

unread,
Aug 12, 2015, 12:39:05 PM8/12/15
to EMF Profiles
I've just found a workaround for this issue:
  1. Choose File -> Initialize EMF profile diagram file
  2. Select your *.emfprofile_diagram file where you encounter the error message
  3. Next -> Finish
  4. Delete the newly generated diagram file (this diagram is missing referenced elements anyway)
  5. In the original diagram file, you should be able now to "Import Metamodel element..." without the error message being shown
Reply all
Reply to author
Forward
0 new messages