Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom Figure
Custom Figure [message #632372] Tue, 12 October 2010 17:21 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi,

I wonder how i could add some extra figures and if its possible to extand those that are available by the the editor, like some lists or checkboxes.

Thanks
Re: Custom Figure [message #632521 is a reply to message #632372] Wed, 13 October 2010 09:59 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi,

what i want to do is to replace a figure (for example a rectangle) with a self-made GUI (with radio buttons, checkboxes and more).

When the user drag&drops an element from the palette toolbar I want a little GUI to appear in the editor field.

thanks
Mahmoud
Re: Custom Figure [message #632536 is a reply to message #632521] Wed, 13 October 2010 10:53 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Am 13.10.10 11:59, schrieb elhamlaoui:
> what i want to do is to replace a figure (for example a rectangle) with
> a self-made GUI (with radio buttons, checkboxes and more).
>
> When the user drag&drops an element from the palette toolbar I want a
> little GUI to appear in the editor field.

I guess this would be rather difficult, as the Canvas uses Draw2D, which
is a lightweight drawing toolkit. It does not support embedding SWT
widgets into the canvas.

However, you could have look at org.eclipse.draw2d.Clickable and its
subclasses. There are some Draw2D Figures that can be used in the Draw2D
Canvas and are lightweight implementations of Buttons. However, there is
not very much different stuff available.

An alternative would be to use a hover-Editor that shows in front of the
Draw2D canvas and can contain any SWT stuff you want. But I'm not
familiar with that.

Hauke
page source viewer [message #632997 is a reply to message #632536] Thu, 14 October 2010 23:24 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi Hauke,

thanks for the reply, i understand better now the problem with canvas.
if you dont mind, i have 2 other questions:

- what the object that is used in gef reffering to a cavas?

- i have create a mutipage editor and in one of those pages i want to have like an xml source viewer its possible to do so with ss.wst plug-in in gef but in gmf i dont know how to do so.

Thanks for your help
Mahmoud
Re: page source viewer [message #633106 is a reply to message #632997] Fri, 15 October 2010 11:49 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi Mahmoud,

> - what the object that is used in gef reffering to a cavas?

You should have a look at the Draw2D documentation:
http://help.eclipse.org/helios/topic/org.eclipse.draw2d.doc. isv/guide/overview.html

From that I understand a "LightweightSystem" is the top-level class
that can contain a Canvas. I think you can also use such Lightweight
System yourself as an Widget in any arbitrary SWT Components.

> - i have create a mutipage editor and in one of those pages i want to
> have like an xml source viewer its possible to do so with ss.wst plug-in
> in gef but in gmf i dont know how to do so.

Sorry, I don't know how to do that. I guess you cannot use the GMF code
directly to do that, but you could use your own Multipage Editor and
there embed the generated GMF Viewer as one Tab. I think the MDT/Papyrus
Editor does it that way. You could have a look at that or directly ask
the Papyrus guys how they did it.

Hauke
icon14.gif  Re: page source viewer [message #633550 is a reply to message #633106] Mon, 18 October 2010 11:36 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi Hauke,

thanks a lot for your help
mahmoud
Previous Topic:error in graphical model
Next Topic:Automatic validation.
Goto Forum:
  


Current Time: Sat Apr 27 01:31:01 GMT 2024

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

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

Back to the top