how to refresh the view after a part was added? [message #50846] |
Mon, 23 December 2002 17:21  |
Eclipse User |
|
|
|
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 #51258 is a reply to message #51231] |
Thu, 26 December 2002 22:20  |
Eclipse User |
|
|
|
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
> > > |
>
>
>
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07524 seconds