Preventing Node being added to Diagram [message #183797] |
Tue, 22 April 2008 09:31 |
Eclipse User |
|
|
|
Originally posted by: yagayoga.hotmail.com
Hi there,
When I create a new diagram file from my model, it adds nodes that I don't
want to be represented on the diagram.
There are two nodes in my model; parent and child, with a relation between
them. Ideally I would like the child to appear on my diagram, but not the
parent, or the relation.
At the moment the parent has setEnabled(false) and setVisible(false) on
both figures in the EditPart, but I'd like to prevent it being added to
the diagram altogether, while ensuring I don't get errors about ghost
nodes etc. when building the source from the GMF console.
I'm thinking I have to look at the createCommands, or edit policies to
achieve this? Anyone know where?
Jen
|
|
|
Re: Preventing Node being added to Diagram [message #183807 is a reply to message #183797] |
Tue, 22 April 2008 09:45 |
Eclipse User |
|
|
|
Originally posted by: nico.lammers.gmail.com
Hi,
So, you only want to omit the graphical representation? As in, the views
need to be there but not represented?
I believe a Creation Role EditPolicy might be what you need here. But
that would mean an EditPart would be created anyway. If you don't
want this, I could suggest implementing your own editPartProvider to
check for certain conditions and not create a new EditPart at all. At
least, I would try it this way. I'm not 100% sure if GMF will like this :)
~ Nico
Jennifer LLewelyn wrote:
> Hi there,
>
> When I create a new diagram file from my model, it adds nodes that I
> don't want to be represented on the diagram.
>
> There are two nodes in my model; parent and child, with a relation
> between them. Ideally I would like the child to appear on my diagram,
> but not the parent, or the relation.
>
> At the moment the parent has setEnabled(false) and setVisible(false) on
> both figures in the EditPart, but I'd like to prevent it being added to
> the diagram altogether, while ensuring I don't get errors about ghost
> nodes etc. when building the source from the GMF console.
>
> I'm thinking I have to look at the createCommands, or edit policies to
> achieve this? Anyone know where?
>
> Jen
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02398 seconds