Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Manage non-graphical nodes
Manage non-graphical nodes [message #516307] Tue, 23 February 2010 14:52 Go to next message
Pantelis Petridis is currently offline Pantelis PetridisFriend
Messages: 10
Registered: February 2010
Junior Member
Hello,

i need my gmf editor to be able to add/view/modify elements that are
part of my model but are not graphically defined.

For example, my diagram has nodeA elements and link elements that
connect two nodesA. Each nodeA belongs to a 'nodeType' class, so i have
a reference in nodeA to a 'nodeType' class. So far so good.

My problem is I do not want the 'nodeType' to be displayed in the
diagram, but have a way to add/remove and modify nodeTypes (something
like a custom menu action 'create nodeType' that opens a managing
window) and then asign each nodeA to a nodeType from the nodeA's
properties.. Using Initializers i was able to asign predefined nodeTypes
but i need to do add nodeTypes at runtime.. Is there such a
functionality or do i have to implement this from scratch?
Re: Manage non-graphical nodes [message #517881 is a reply to message #516307] Tue, 02 March 2010 12:44 Go to previous messageGo to next message
Pantelis Petridis is currently offline Pantelis PetridisFriend
Messages: 10
Registered: February 2010
Junior Member
Anyone plz? I have read almost any thread in this forum, and tried
several approaches but did not succeed so far. Someone on this newsgroup
mentioned something about a "table view" but I think it was his own
implementation. Can I have elements in my ecore model that are not part
of the canvas but used as properties of another element? Any help would
be much appreciated, my thesis is in danger! :)


Pantelis Petridis wrote:
> Hello,
>
> i need my gmf editor to be able to add/view/modify elements that are
> part of my model but are not graphically defined.
>
> For example, my diagram has nodeA elements and link elements that
> connect two nodesA. Each nodeA belongs to a 'nodeType' class, so i have
> a reference in nodeA to a 'nodeType' class. So far so good.
>
> My problem is I do not want the 'nodeType' to be displayed in the
> diagram, but have a way to add/remove and modify nodeTypes (something
> like a custom menu action 'create nodeType' that opens a managing
> window) and then asign each nodeA to a nodeType from the nodeA's
> properties.. Using Initializers i was able to asign predefined nodeTypes
> but i need to do add nodeTypes at runtime.. Is there such a
> functionality or do i have to implement this from scratch?
Re: Manage non-graphical nodes [message #519141 is a reply to message #517881] Sun, 07 March 2010 02:13 Go to previous message
daniele Mising name is currently offline daniele Mising nameFriend
Messages: 48
Registered: July 2009
Member
Yes, I've done it too. You can, but all the elements have to be contained (aggregated) at least in one graphical element ( the map it's ok too). You can add an extension point for a menu or a poup up, and create an input form to set properties of the object.
So you create programaticaly an ImplElement with XXX.XXXFactory.createElement(), set its properties and add it to the map throught a write transaction.

Anyway... it doesn't work all (yet) for me. I have this issue : when I change an element not graphical, its references aren't updated automatically (http:// www.eclipse.org/forums/index.php?t=msg&th=163981&sta rt=0&)

[Updated on: Sun, 07 March 2010 11:25]

Report message to a moderator

Previous Topic:saving error: object xyz is not contained in a resource[SOLVED]
Next Topic:Link Mapping without Source or Target Feature
Goto Forum:
  


Current Time: Tue Mar 19 06:16:39 GMT 2024

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

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

Back to the top