Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Figure not drawn!
Figure not drawn! [message #200756] Wed, 06 August 2008 11:01 Go to next message
Eclipse UserFriend
Originally posted by: florin.botis.gmail.com

Hi all,

I have this class structure: A<>---1-----------B
A<>---1-----------C
B is superclass for C.
D<>----------------E
A is superclass for D.

In my diagram application when I choose the creational tool for C and I'm
trying to draw a C figure on the sheet doesn't appear anything.For other
nodes (B,E,D) there is no problem. What can be the problem?

Best regards,
Florin Botis
Re: Figure not drawn! [message #200820 is a reply to message #200756] Wed, 06 August 2008 12:36 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Florin,

> I'm trying to draw a C figure on the sheet doesn't appear anything.For
> other nodes (B,E,D) there is no problem. What can be the problem?
Try adding following OCL constraint to NodeMapping for node B:
"not oclIsKindOf(<model>::C)"

The problem is in inconsistency of existing .gmfmap figure - GMF can not
decide with type of diagram node (B or C) should be created for this particular
instance of domain model element C.

-----------------
Alex Shatalin
Re: Figure not drawn! [message #200879 is a reply to message #200756] Wed, 06 August 2008 13:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: florin.botis.gmail.com

Thanks!
It works!:D
"Florin Botis" <florin.botis@gmail.com> wrote in message
news:g7c09r$tdp$1@build.eclipse.org...
> Hi all,
>
> I have this class structure: A<>---1-----------B
> A<>---1-----------C
> B is superclass for C.
> D<>----------------E
> A is superclass for D.
>
> In my diagram application when I choose the creational tool for C and I'm
> trying to draw a C figure on the sheet doesn't appear anything.For other
> nodes (B,E,D) there is no problem. What can be the problem?
>
> Best regards,
> Florin Botis
>
What about elements of a class? [message #200887 is a reply to message #200756] Wed, 06 August 2008 14:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: florin.botis.gmail.com

And what about if a class has 2 elements of the same kind like in the next
example:

<xs:element name="Scenario">
<xs:complexType>
<xs:sequence>
<xs:element name="StepTime" type="DurationType">
</xs:element>
<xs:element name="StepPause" type="DurationType" minOccurs="0">
<xs:annotation>
</xs:element>
.......



In this example I can draw StepTime but I can't draw StepPause?
What kind of OCL constraint I must use?

Thanks for your time,
Florin
Re: Figure not drawn! [message #200903 is a reply to message #200756] Wed, 06 August 2008 14:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: florin.botis.gmail.com

I have also a problem with make the link beetwen A and C in the first
example shown above:

"Florin Botis" <florin.botis@gmail.com> wrote in message
news:g7c09r$tdp$1@build.eclipse.org...
> Hi all,
>
> I have this class structure: A<>---1-----------B
> A<>---1-----------C
> B is superclass for C.
> D<>----------------E
> A is superclass for D.
>
> In my diagram application when I choose the creational tool for C and I'm
> trying to draw a C figure on the sheet doesn't appear anything.For other
> nodes (B,E,D) there is no problem. What can be the problem?
>
> Best regards,
> Florin Botis
>
Re: What about elements of a class? [message #200990 is a reply to message #200887] Thu, 07 August 2008 08:43 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Florin,

> In this example I can draw StepTime but I can't draw StepPause? What
> kind of OCL constraint I must use?
well something like: name.endsWith('Time')/name.endsWith('Pause') ? ;-)
In general it should be possible to determine a type of the element using
domain model only. So, in this situation I suggest you adding new attribute
(.type) having two different values - one for StepTime another for StepPause...

-----------------
Alex Shatalin
Re: Figure not drawn! [message #200998 is a reply to message #200903] Thu, 07 August 2008 08:47 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Florin,

> I have also a problem with make the link beetwen A and C in the first
> example shown above:
It should be just one lnk from A to B connecting A with B/C instances OR
you have to add link constraint (limiting link target to instances of B only)
and create two different link mapping for these two links.

-----------------
Alex Shatalin
Previous Topic:size and format of tool icons????
Next Topic:Printing GMF diagram
Goto Forum:
  


Current Time: Fri Apr 26 10:28:04 GMT 2024

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

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

Back to the top