Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GmfMap allowed types for metric expression
GmfMap allowed types for metric expression [message #783890] Thu, 26 January 2012 17:05 Go to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hello!

I've created a gmf editor and I've notice the Metric Container in the .gmfmap file. I would like to use this to expose some metrics, such as counts and percentages. When the ocl expression returns a integer, every thing works well, but if it's a double an error is thrown saying that is not possible to cast from double to integer.

It seems that this metric expression only allow integer types. I was hopping there is some file in the gmf editor project that i could modify to suport double types.

Does anyone knows how to do this?
Re: GmfMap allowed types for metric expression [message #784276 is a reply to message #783890] Fri, 27 January 2012 09:34 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

can you identify where the class cast exception happens? You could use the stack trace for this. The place of the generated code is of interest for you. Try to fix it there. If this I can help you to modify the templates in a way that this does not happen again.

Ralph
Re: GmfMap allowed types for metric expression [message #784525 is a reply to message #784276] Fri, 27 January 2012 16:58 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
I'm sorry Ralph, I should have put here some feedback. I found the file that parse the MetricRule in the gmfmap (KAOSStandardMetricProvider.java), and in fact every ocl query is cast to double, or it seems so.
So I think my problem is in the ocl queries. I'm revisiting them and see if they are all correct.
Re: GmfMap allowed types for metric expression [message #784553 is a reply to message #784525] Fri, 27 January 2012 17:36 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi again,

Now something strange is happening. I have three metric defined. At the star of the gmf editor instance every metric is correct. If I make Edit->Metrics, the second metric change to zero, this with the same nodes and links. If i change the position of the second metric with the third, everything seems fine, even after I make Edit->Metrics, and again with no alteration to the diagram.
Does anyone have an idea to why this is happening?
Re: GmfMap allowed types for metric expression [message #784610 is a reply to message #784553] Fri, 27 January 2012 19:24 Go to previous message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
I think the problem is that my metrics are based upon some operations defined into the Ecore. Does this make any sense? Because many of these errors disappear if I put the body of the operation instead of calling that operation.
Previous Topic:Disregard prefix/postfix-setting from genmodel
Next Topic:[GMF] draw2d RelativeBendpoint computation changes from GMF Runtime 1.3.0
Goto Forum:
  


Current Time: Fri Apr 26 12:06:36 GMT 2024

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

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

Back to the top