Skip to main content



      Home
Home » Eclipse Projects » GEF » how to refresh the view after a part was added?
how to refresh the view after a part was added? [message #50846] Mon, 23 December 2002 17:21 Go to next message
Eclipse UserFriend
Originally posted by: HeinzGraalfs.web.de

I tried to change the model for the GEF 6 sample.

I added a selection pane entry to add a new node.

Basically it works 'fine', but I don't know how to refresh the view to see
the
added node element.
When I debug the model I see my newly added EditPart in the Model (the
Model now has an ArrayList not the fixed size Vector) but the added node
doesn't show up in the actual view.

How does the Framework works? Is there some more documentation available?
I can debug thru GEF, but that can't be the solution in order to get
familiar with this framework.

Perhaps somebody can help?

Heinz
Re: how to refresh the view after a part was added? [message #50902 is a reply to message #50846] Tue, 24 December 2002 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eric_to_jeff.hotmail.com

Hi Heinz,

I think your model should add property change listener to your editpart,
just like Logic Designer Example:
getLogicSubpart().addPropertyChangeListener(this);
if the properties of your model changed, the model should broadcast the
event to all its listener.
and the editpart should handle PropertyChangeEvent event use
propertyChange method.

Regards

Eric Suen

"Heinz " <HeinzGraalfs@web.de> ??????:au82a6$mgo$1@rogue.oti.com...
| I tried to change the model for the GEF 6 sample.
|
| I added a selection pane entry to add a new node.
|
| Basically it works 'fine', but I don't know how to refresh the view to see
| the
| added node element.
| When I debug the model I see my newly added EditPart in the Model (the
| Model now has an ArrayList not the fixed size Vector) but the added node
| doesn't show up in the actual view.
|
| How does the Framework works? Is there some more documentation available?
| I can debug thru GEF, but that can't be the solution in order to get
| familiar with this framework.
|
| Perhaps somebody can help?
|
| Heinz
|
Re: how to refresh the view after a part was added? [message #51093 is a reply to message #50902] Wed, 25 December 2002 12:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: HeinzGraalfs.web.de

Hi Eric, thanks for the answer, I'll try ASAP and let you know if it
helped.

Merry Christmas to all GEF enthusiasts!

Heinz

Eric Suen wrote:

> Hi Heinz,

> I think your model should add property change listener to your editpart,
> just like Logic Designer Example:
> getLogicSubpart().addPropertyChangeListener(this);
> if the properties of your model changed, the model should broadcast the
> event to all its listener.
> and the editpart should handle PropertyChangeEvent event use
> propertyChange method.

> Regards

> Eric Suen

> "Heinz " <HeinzGraalfs@web.de> ??????:au82a6$mgo$1@rogue.oti.com...
> | I tried to change the model for the GEF 6 sample.
> |
> | I added a selection pane entry to add a new node.
> |
> | Basically it works 'fine', but I don't know how to refresh the view to see
> | the
> | added node element.
> | When I debug the model I see my newly added EditPart in the Model (the
> | Model now has an ArrayList not the fixed size Vector) but the added node
> | doesn't show up in the actual view.
> |
> | How does the Framework works? Is there some more documentation available?
> | I can debug thru GEF, but that can't be the solution in order to get
> | familiar with this framework.
> |
> | Perhaps somebody can help?
> |
> | Heinz
> |
Re: how to refresh the view after a part was added? [message #51231 is a reply to message #51093] Thu, 26 December 2002 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: HeinzGraalfs.web.de

Hi Eric,

I was finally able to add rectangle objects thru an additional palette
CreationTool entry.

As I said I had the added object within my model.
I had already the code you suggested. But the refresh on the TopEditPart
was
missing. The refresh() causes to call the getModelChildren() of the the
TopEditPart and that performs the activate() on the EditPart. That was it.

Now I want to
1. be able to delete a current selection (part or connection)
2. display names for the parts and connectors
3. create a right mouse click popup menu for a current selection and
implement
some functionality for the current selection
4. display properties of the parts and connections in a property pane

Do you have some simple samples or hints in order to do these kinds of
trivial things? Unfortunately it doesn't seem to be that simple without
any kind of additional documentation.

Heinz


Heinz wrote:

> Hi Eric, thanks for the answer, I'll try ASAP and let you know if it
> helped.

> Merry Christmas to all GEF enthusiasts!

> Heinz

> Eric Suen wrote:

> > Hi Heinz,

> > I think your model should add property change listener to your
editpart,
> > just like Logic Designer Example:
> > getLogicSubpart().addPropertyChangeListener(this);
> > if the properties of your model changed, the model should broadcast the
> > event to all its listener.
> > and the editpart should handle PropertyChangeEvent event use
> > propertyChange method.

> > Regards

> > Eric Suen

> > "Heinz " <HeinzGraalfs@web.de> ??????:au82a6$mgo$1@rogue.oti.com...
> > | I tried to change the model for the GEF 6 sample.
> > |
> > | I added a selection pane entry to add a new node.
> > |
> > | Basically it works 'fine', but I don't know how to refresh the view to
see
> > | the
> > | added node element.
> > | When I debug the model I see my newly added EditPart in the Model (the
> > | Model now has an ArrayList not the fixed size Vector) but the added node
> > | doesn't show up in the actual view.
> > |
> > | How does the Framework works? Is there some more documentation available?
> > | I can debug thru GEF, but that can't be the solution in order to get
> > | familiar with this framework.
> > |
> > | Perhaps somebody can help?
> > |
> > | Heinz
> > |
Re: how to refresh the view after a part was added? [message #51258 is a reply to message #51231] Thu, 26 December 2002 22:20 Go to previous message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Heinz" <HeinzGraalfs@web.de> wrote in message
news:aufsda$dbr$1@rogue.oti.com...
> Hi Eric,
>
> I was finally able to add rectangle objects thru an additional palette
> CreationTool entry.
>
> As I said I had the added object within my model.
> I had already the code you suggested. But the refresh on the TopEditPart
> was
> missing. The refresh() causes to call the getModelChildren() of the the
> TopEditPart and that performs the activate() on the EditPart. That was it.
>
> Now I want to
> 1. be able to delete a current selection (part or connection)

See DeleteAction

> 2. display names for the parts and connectors

This is non-trivial, depending on the flexibility of such labels.

> 3. create a right mouse click popup menu for a current selection and
> implement
> some functionality for the current selection

We are currently looking at reworking the context menu. See
contextMenuProvider for now.

> 4. display properties of the parts and connections in a property pane

Read the workbench documentation on the property sheet and IPropertySource.
AbstractEditPart is IAdaptable, and will implement getAdapter properly.
Look at the model in logic example.

>
> Do you have some simple samples or hints in order to do these kinds of
> trivial things? Unfortunately it doesn't seem to be that simple without
> any kind of additional documentation.
>
> Heinz
>
>
> Heinz wrote:
>
> > Hi Eric, thanks for the answer, I'll try ASAP and let you know if it
> > helped.
>
> > Merry Christmas to all GEF enthusiasts!
>
> > Heinz
>
> > Eric Suen wrote:
>
> > > Hi Heinz,
>
> > > I think your model should add property change listener to your
> editpart,
> > > just like Logic Designer Example:
> > > getLogicSubpart().addPropertyChangeListener(this);
> > > if the properties of your model changed, the model should broadcast
the
> > > event to all its listener.
> > > and the editpart should handle PropertyChangeEvent event use
> > > propertyChange method.
>
> > > Regards
>
> > > Eric Suen
>
> > > "Heinz " <HeinzGraalfs@web.de> ??????:au82a6$mgo$1@rogue.oti.com...
> > > | I tried to change the model for the GEF 6 sample.
> > > |
> > > | I added a selection pane entry to add a new node.
> > > |
> > > | Basically it works 'fine', but I don't know how to refresh the view
to
> see
> > > | the
> > > | added node element.
> > > | When I debug the model I see my newly added EditPart in the Model
(the
> > > | Model now has an ArrayList not the fixed size Vector) but the added
node
> > > | doesn't show up in the actual view.
> > > |
> > > | How does the Framework works? Is there some more documentation
available?
> > > | I can debug thru GEF, but that can't be the solution in order to get
> > > | familiar with this framework.
> > > |
> > > | Perhaps somebody can help?
> > > |
> > > | Heinz
> > > |
>
>
>
>
>
>
>
>
Previous Topic:Connection Anchor question in Logic Editor Example
Next Topic:GUI-Editor with GEF
Goto Forum:
  


Current Time: Mon Jul 21 21:01:17 EDT 2025

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

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

Back to the top