Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EVL diagnostics in Problems View, but no decorators on Diagram(I cannot get decoration to show in my GMF generated diagram editor.)
EVL diagnostics in Problems View, but no decorators on Diagram [message #1060065] Wed, 22 May 2013 19:39 Go to next message
Greg Jansen is currently offline Greg Jansen
Messages: 22
Registered: July 2010
Junior Member
So I followed the recipe here:
http://www.eclipse.org/epsilon/doc/articles/evl-gmf-integration/

I am working with a GMF editor created outside of Eugenia. The validation errors are showing in my problems view. However, there are never any decorators on my diagram.

I've tried to track this down in the debugger and I found an interesting mismatch.

In my CrosswalkValidationDecoratorProvider (Crosswalk is my package), we see a block of generated code like this:

if (attribute.equals(elementId)) {


These two strings are never equal in my implementation. The attribute value comes from the marker and at runtime for me it shows a notation model path, like this:
"/1/@children.0/@children.2/@children.0/@children.2/@children.0"

Meanwhile, the elementId is an empty string. I suppose it is empty because I am not using GUID identifiers in my notation model (or the rest of it for that matter). Are GUIDs required for this?

String elementId = ViewUtil.getIdStr(view);


ViewUtil.getIdStr is looking for an identifier that I don't think exists in my model.

Am I on the right track?
Re: EVL diagnostics in Problems View, but no decorators on Diagram [message #1060227 is a reply to message #1060065] Thu, 23 May 2013 15:28 Go to previous messageGo to next message
Greg Jansen is currently offline Greg Jansen
Messages: 22
Registered: July 2010
Junior Member
FYI, I have another major clue in this puzzle. I see proper decor in one model, but not in another. Before anyone else helps me out, I shall explore this..

thanks,
Greg
Re: EVL diagnostics in Problems View, but no decorators on Diagram [message #1060229 is a reply to message #1060227] Thu, 23 May 2013 15:49 Go to previous messageGo to next message
Greg Jansen is currently offline Greg Jansen
Messages: 22
Registered: July 2010
Junior Member
It certainly is related to the xmi:id being present in one model file, but not in another. The decor uses the ID it seems. Now I just need to figure out why my other models do not have a generated UUID..
Re: EVL diagnostics in Problems View, but no decorators on Diagram [message #1060235 is a reply to message #1060229] Thu, 23 May 2013 15:59 Go to previous messageGo to next message
Greg Jansen is currently offline Greg Jansen
Messages: 22
Registered: July 2010
Junior Member
Solved it. The two models that were not showing decor had different file extensions. They were being persisted by the default XMIResourceFactory instead of the GMFResourceFactory. After associating these other file extensions with the correct resource factory, new models showed the decor:
   <extension
         id="resource-factory"
         point="org.eclipse.emf.ecore.extension_parser">
      <parser
            class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"
            type="crosswalk">
      </parser>
      <parser
            class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"
            type="form">
      </parser>
      <parser
            class="org.eclipse.gmf.runtime.emf.core.resources.GMFResourceFactory"
            type="dictionary">
      </parser>
   </extension>


This will probably only happen to folks who have somehow managed to get away from the GMFResourceFactory. However I think this may also explain some other errors I have encountered in the past with persistence of edge notation.

thanks for listening!
Greg
Re: EVL diagnostics in Problems View, but no decorators on Diagram [message #1060388 is a reply to message #1060235] Fri, 24 May 2013 12:06 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 883
Registered: July 2009
Senior Member
Hi Greg,

I'm glad to see that you've managed to get this working. Thanks for sharing your solution!

Cheers,
Dimitris
Previous Topic:qualified names on referance labels
Next Topic:Property Selection Filter on Property Section
Goto Forum:
  


Current Time: Thu Oct 23 01:49:34 GMT 2014

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

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