Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » labels incorrect
labels incorrect [message #197750] Thu, 17 July 2008 14:40 Go to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Hi, I have a model made up of many classes with inheritance from abstract
classes!

For some reason my node labels reference the name of the abstract class
that it inherits from rather than the name of the class its self!

Any ideas why this could be happening?
Any ideas how to fix it?

Thanks In Advance,
Gary
Re: labels incorrect [message #197774 is a reply to message #197750] Thu, 17 July 2008 15:04 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

> For some reason my node labels reference the name of the abstract
> class that it inherits from rather than the name of the class its
> self!
And what is the problem with this reference?

-----------------
Alex Shatalin
Re: labels incorrect [message #197790 is a reply to message #197774] Thu, 17 July 2008 15:13 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Sorry bad explination of the problem!
...Ok, Say I have 2 classes A and B
...A = Abstract class
...B = Inherits from A
...Both these classes have a unique Diagram Label

However for some reason class B is displaying the Diagram lable of its
parent class A!

any ideas?

Thanks,
Gary
Re: labels incorrect [message #197796 is a reply to message #197790] Thu, 17 July 2008 15:25 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

So, you have two EClasses: A and B both having EAttribute and incorrect attribute
was used to display label of B (instance of B). Looks like you have to correct
LabelMapping in .gmfmap model to point to the proper attribute of EClass
B instead of EClass A..

-----------------
Alex Shatalin
Re: labels incorrect [message #197804 is a reply to message #197796] Thu, 17 July 2008 15:29 Go to previous messageGo to next message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Yeh thats right, however i have got the label mapping correct!
Thats why this problem makes no sence
...Could it be something to do with the fact that some of my classes are
in different packages? (though this shouldn't be a problem, as far as i'm
aware)
Re: labels incorrect [message #197884 is a reply to message #197804] Fri, 18 July 2008 09:12 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gary,

You can check generated ???ParserProvider class - this class should has a
method named like "createXXXXParser" returning the parser used to represent
text of the corresponding label. EAttribute specified in mapping file should
be referenced there. If you've specified correct attribute then proper value
should be injected into this place and the rest is a metter of EMF (you can
debug corresponding methods returning string value to see the reason why
incorrect value was returned). If you have proper attribute specified in
mapping, but incorrect reference injected into the generated ParserProvider
then this is a problem of code generator and we have to investigate it a
little bit more.

-----------------
Alex Shatalin
P.S. Did I get it right - both super-class and sub-class du has attributes
with the same name?
Re: labels incorrect [message #198012 is a reply to message #197884] Mon, 21 July 2008 09:57 Go to previous message
Gary is currently offline GaryFriend
Messages: 125
Registered: July 2009
Senior Member
Hi, just to let you know I still havent found a solution to this problem
however I may have descovered the cause! When i've tested this I will let
you know the results,
Thanks,
Gary
Previous Topic:Recursive Hierarchy of Packages - I want compartment with ListLayout=False, but that does not work a
Next Topic:tool stack?
Goto Forum:
  


Current Time: Sat Jun 06 12:07:47 GMT 2020

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

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

Back to the top