Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » refreshChildren
refreshChildren [message #120251] Wed, 03 March 2004 11:03 Go to next message
Eclipse UserFriend
Originally posted by: bbdaffy.hotmail.com

Hi,

Using LogicDnd example as a reference, I wrote a plugin which is somewhat
similar. I have a TreeViewer of objects from which I can drag the object
onto a graphical editor and it will appear in the editor as a UML Class
Figure. I used the standard DragSupport in the TreeViewer and a
AbstractTransferDropTargetListener in the editor. All works well and the
new object gets added as a child to the container which I am editing.
However, although the Model (MVC paradigm) gets updated, and the update is
propagated to the EditPart via PropertyChangeListener, the View does not
get updated instantly. I need to either switch to another view and back,
or minimise the workbench and then restore it, in other words, I have to
somehow force the editor to refresh itself. I know something is wrong with
my code somewhere but I am not sure where to look. I tried using a
refreshVisual() after I called refreshChildren(), but it din work. Please
help. Thanks.

Rgds,
Lee
Re: refreshChildren [message #120348 is a reply to message #120251] Wed, 03 March 2004 15:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

If you drag another window across your diagram, does it repaint the newly
created object?

"Lee" <bbdaffy@hotmail.com> wrote in message
news:c24e2d$d6m$1@eclipse.org...
> Hi,
>
> Using LogicDnd example as a reference, I wrote a plugin which is somewhat
> similar. I have a TreeViewer of objects from which I can drag the object
> onto a graphical editor and it will appear in the editor as a UML Class
> Figure. I used the standard DragSupport in the TreeViewer and a
> AbstractTransferDropTargetListener in the editor. All works well and the
> new object gets added as a child to the container which I am editing.
> However, although the Model (MVC paradigm) gets updated, and the update is
> propagated to the EditPart via PropertyChangeListener, the View does not
> get updated instantly. I need to either switch to another view and back,
> or minimise the workbench and then restore it, in other words, I have to
> somehow force the editor to refresh itself. I know something is wrong with
> my code somewhere but I am not sure where to look. I tried using a
> refreshVisual() after I called refreshChildren(), but it din work. Please
> help. Thanks.
>
> Rgds,
> Lee
>
Re: refreshChildren [message #120435 is a reply to message #120348] Thu, 04 March 2004 00:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbdaffy.hotmail.com

Yes...

Rgds,
Lee

Randy Hudson wrote:

> If you drag another window across your diagram, does it repaint the newly
> created object?

> "Lee" <bbdaffy@hotmail.com> wrote in message
> news:c24e2d$d6m$1@eclipse.org...
> > Hi,
> >
> > Using LogicDnd example as a reference, I wrote a plugin which is somewhat
> > similar. I have a TreeViewer of objects from which I can drag the object
> > onto a graphical editor and it will appear in the editor as a UML Class
> > Figure. I used the standard DragSupport in the TreeViewer and a
> > AbstractTransferDropTargetListener in the editor. All works well and the
> > new object gets added as a child to the container which I am editing.
> > However, although the Model (MVC paradigm) gets updated, and the update is
> > propagated to the EditPart via PropertyChangeListener, the View does not
> > get updated instantly. I need to either switch to another view and back,
> > or minimise the workbench and then restore it, in other words, I have to
> > somehow force the editor to refresh itself. I know something is wrong with
> > my code somewhere but I am not sure where to look. I tried using a
> > refreshVisual() after I called refreshChildren(), but it din work. Please
> > help. Thanks.
> >
> > Rgds,
> > Lee
> >
Re: refreshChildren [message #121752 is a reply to message #120435] Thu, 11 March 2004 01:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbdaffy.hotmail.com

Errr, can someone please further enlighten me on this issue? Thanks....

Rgds,
Lee


Lee wrote:

> Yes...

> Rgds,
> Lee

> Randy Hudson wrote:

> > If you drag another window across your diagram, does it repaint the newly
> > created object?

> > "Lee" <bbdaffy@hotmail.com> wrote in message
> > news:c24e2d$d6m$1@eclipse.org...
> > > Hi,
> > >
> > > Using LogicDnd example as a reference, I wrote a plugin which is somewhat
> > > similar. I have a TreeViewer of objects from which I can drag the object
> > > onto a graphical editor and it will appear in the editor as a UML Class
> > > Figure. I used the standard DragSupport in the TreeViewer and a
> > > AbstractTransferDropTargetListener in the editor. All works well and the
> > > new object gets added as a child to the container which I am editing.
> > > However, although the Model (MVC paradigm) gets updated, and the update
is
> > > propagated to the EditPart via PropertyChangeListener, the View does not
> > > get updated instantly. I need to either switch to another view and back,
> > > or minimise the workbench and then restore it, in other words, I have to
> > > somehow force the editor to refresh itself. I know something is wrong
with
> > > my code somewhere but I am not sure where to look. I tried using a
> > > refreshVisual() after I called refreshChildren(), but it din work. Please
> > > help. Thanks.
> > >
> > > Rgds,
> > > Lee
> > >
Re: refreshChildren [message #121765 is a reply to message #121752] Thu, 11 March 2004 03:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Post a code snippet showing the problem.

"Lee" <bbdaffy@hotmail.com> wrote in message
news:c2oe5n$ejc$1@eclipse.org...
> Errr, can someone please further enlighten me on this issue? Thanks....
>
> Rgds,
> Lee
>
>
> Lee wrote:
>
> > Yes...
>
> > Rgds,
> > Lee
>
> > Randy Hudson wrote:
>
> > > If you drag another window across your diagram, does it repaint the
newly
> > > created object?
>
> > > "Lee" <bbdaffy@hotmail.com> wrote in message
> > > news:c24e2d$d6m$1@eclipse.org...
> > > > Hi,
> > > >
> > > > Using LogicDnd example as a reference, I wrote a plugin which is
somewhat
> > > > similar. I have a TreeViewer of objects from which I can drag the
object
> > > > onto a graphical editor and it will appear in the editor as a UML
Class
> > > > Figure. I used the standard DragSupport in the TreeViewer and a
> > > > AbstractTransferDropTargetListener in the editor. All works well and
the
> > > > new object gets added as a child to the container which I am
editing.
> > > > However, although the Model (MVC paradigm) gets updated, and the
update
> is
> > > > propagated to the EditPart via PropertyChangeListener, the View does
not
> > > > get updated instantly. I need to either switch to another view and
back,
> > > > or minimise the workbench and then restore it, in other words, I
have to
> > > > somehow force the editor to refresh itself. I know something is
wrong
> with
> > > > my code somewhere but I am not sure where to look. I tried using a
> > > > refreshVisual() after I called refreshChildren(), but it din work.
Please
> > > > help. Thanks.
> > > >
> > > > Rgds,
> > > > Lee
> > > >
>
>
Re: refreshChildren [message #121962 is a reply to message #121765] Fri, 12 March 2004 06:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bbdaffy.hotmail.com

Hi,

I totally have no clue where the problem could be. And I dun think I can
possibly post the entire plugin here. So I just post a few snippets,
hopefully it shows the problem....

If my children has been changed, I will fire an event...

public void addModel(Model mod) {
this.models.add(mod);
fireStructureChange(CHILDREN, mod);
}

This will be captured by the following method in the EditPart.

public void propertyChange(PropertyChangeEvent arg0) {
// TODO Auto-generated method stub
String propName = arg0.getPropertyName();
if(Entity.CHILDREN.equals(propName))
{
refresh();
}
else
{
System.err.println(this.getClass().getName() + ".propertyChange unknown
propName: " + propName);
}
}

Is there anything else I need to post to be helpful? Thanks...

Rgds,
Lee


Randy Hudson wrote:

> Post a code snippet showing the problem.

> "Lee" <bbdaffy@hotmail.com> wrote in message
> news:c2oe5n$ejc$1@eclipse.org...
> > Errr, can someone please further enlighten me on this issue? Thanks....
> >
> > Rgds,
> > Lee
> >
> >
> > Lee wrote:
> >
> > > Yes...
> >
> > > Rgds,
> > > Lee
> >
> > > Randy Hudson wrote:
> >
> > > > If you drag another window across your diagram, does it repaint the
> newly
> > > > created object?
> >
> > > > "Lee" <bbdaffy@hotmail.com> wrote in message
> > > > news:c24e2d$d6m$1@eclipse.org...
> > > > > Hi,
> > > > >
> > > > > Using LogicDnd example as a reference, I wrote a plugin which is
> somewhat
> > > > > similar. I have a TreeViewer of objects from which I can drag the
> object
> > > > > onto a graphical editor and it will appear in the editor as a UML
> Class
> > > > > Figure. I used the standard DragSupport in the TreeViewer and a
> > > > > AbstractTransferDropTargetListener in the editor. All works well and
> the
> > > > > new object gets added as a child to the container which I am
> editing.
> > > > > However, although the Model (MVC paradigm) gets updated, and the
> update
> > is
> > > > > propagated to the EditPart via PropertyChangeListener, the View does
> not
> > > > > get updated instantly. I need to either switch to another view and
> back,
> > > > > or minimise the workbench and then restore it, in other words, I
> have to
> > > > > somehow force the editor to refresh itself. I know something is
> wrong
> > with
> > > > > my code somewhere but I am not sure where to look. I tried using a
> > > > > refreshVisual() after I called refreshChildren(), but it din work.
> Please
> > > > > help. Thanks.
> > > > >
> > > > > Rgds,
> > > > > Lee
> > > > >
> >
> >
Re: refreshChildren [message #121999 is a reply to message #121962] Fri, 12 March 2004 15:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Does the same function work in the Logic example? BTW, you can drag and
drop items form the logic palette into the diagram.
I would suggest putting breakpoints in things that you expect to be
happening. Such as Figure.repaint(), DeferredUpdateManager.repairDamage(),
etc.

"Lee" <bbdaffy@hotmail.com> wrote in message
news:c2rlq1$4u1$1@eclipse.org...
> Hi,
>
> I totally have no clue where the problem could be. And I dun think I can
> possibly post the entire plugin here. So I just post a few snippets,
> hopefully it shows the problem....
>
> If my children has been changed, I will fire an event...
>
> public void addModel(Model mod) {
> this.models.add(mod);
> fireStructureChange(CHILDREN, mod);
> }
>
> This will be captured by the following method in the EditPart.
>
> public void propertyChange(PropertyChangeEvent arg0) {
> // TODO Auto-generated method stub
> String propName = arg0.getPropertyName();
> if(Entity.CHILDREN.equals(propName))
> {
> refresh();
> }
> else
> {
> System.err.println(this.getClass().getName() + ".propertyChange unknown
> propName: " + propName);
> }
> }
>
> Is there anything else I need to post to be helpful? Thanks...
>
> Rgds,
> Lee
>
>
> Randy Hudson wrote:
>
> > Post a code snippet showing the problem.
>
> > "Lee" <bbdaffy@hotmail.com> wrote in message
> > news:c2oe5n$ejc$1@eclipse.org...
> > > Errr, can someone please further enlighten me on this issue?
Thanks....
> > >
> > > Rgds,
> > > Lee
> > >
> > >
> > > Lee wrote:
> > >
> > > > Yes...
> > >
> > > > Rgds,
> > > > Lee
> > >
> > > > Randy Hudson wrote:
> > >
> > > > > If you drag another window across your diagram, does it repaint
the
> > newly
> > > > > created object?
> > >
> > > > > "Lee" <bbdaffy@hotmail.com> wrote in message
> > > > > news:c24e2d$d6m$1@eclipse.org...
> > > > > > Hi,
> > > > > >
> > > > > > Using LogicDnd example as a reference, I wrote a plugin which is
> > somewhat
> > > > > > similar. I have a TreeViewer of objects from which I can drag
the
> > object
> > > > > > onto a graphical editor and it will appear in the editor as a
UML
> > Class
> > > > > > Figure. I used the standard DragSupport in the TreeViewer and a
> > > > > > AbstractTransferDropTargetListener in the editor. All works well
and
> > the
> > > > > > new object gets added as a child to the container which I am
> > editing.
> > > > > > However, although the Model (MVC paradigm) gets updated, and the
> > update
> > > is
> > > > > > propagated to the EditPart via PropertyChangeListener, the View
does
> > not
> > > > > > get updated instantly. I need to either switch to another view
and
> > back,
> > > > > > or minimise the workbench and then restore it, in other words, I
> > have to
> > > > > > somehow force the editor to refresh itself. I know something is
> > wrong
> > > with
> > > > > > my code somewhere but I am not sure where to look. I tried using
a
> > > > > > refreshVisual() after I called refreshChildren(), but it din
work.
> > Please
> > > > > > help. Thanks.
> > > > > >
> > > > > > Rgds,
> > > > > > Lee
> > > > > >
> > >
> > >
>
>
Re: refreshChildren [message #122238 is a reply to message #121999] Mon, 15 March 2004 05:40 Go to previous message
Eclipse UserFriend
Originally posted by: bbdaffy.hotmail.com

Hi,

Thanks. I will try doing that first to narrow down my area for debugging.
:)

Rgds,
Lee


Randy Hudson wrote:

> Does the same function work in the Logic example? BTW, you can drag and
> drop items form the logic palette into the diagram.
> I would suggest putting breakpoints in things that you expect to be
> happening. Such as Figure.repaint(), DeferredUpdateManager.repairDamage(),
> etc.

> "Lee" <bbdaffy@hotmail.com> wrote in message
> news:c2rlq1$4u1$1@eclipse.org...
> > Hi,
> >
> > I totally have no clue where the problem could be. And I dun think I can
> > possibly post the entire plugin here. So I just post a few snippets,
> > hopefully it shows the problem....
> >
> > If my children has been changed, I will fire an event...
> >
> > public void addModel(Model mod) {
> > this.models.add(mod);
> > fireStructureChange(CHILDREN, mod);
> > }
> >
> > This will be captured by the following method in the EditPart.
> >
> > public void propertyChange(PropertyChangeEvent arg0) {
> > // TODO Auto-generated method stub
> > String propName = arg0.getPropertyName();
> > if(Entity.CHILDREN.equals(propName))
> > {
> > refresh();
> > }
> > else
> > {
> > System.err.println(this.getClass().getName() + ".propertyChange unknown
> > propName: " + propName);
> > }
> > }
> >
> > Is there anything else I need to post to be helpful? Thanks...
> >
> > Rgds,
> > Lee
> >
> >
> > Randy Hudson wrote:
> >
> > > Post a code snippet showing the problem.
> >
> > > "Lee" <bbdaffy@hotmail.com> wrote in message
> > > news:c2oe5n$ejc$1@eclipse.org...
> > > > Errr, can someone please further enlighten me on this issue?
> Thanks....
> > > >
> > > > Rgds,
> > > > Lee
> > > >
> > > >
> > > > Lee wrote:
> > > >
> > > > > Yes...
> > > >
> > > > > Rgds,
> > > > > Lee
> > > >
> > > > > Randy Hudson wrote:
> > > >
> > > > > > If you drag another window across your diagram, does it repaint
> the
> > > newly
> > > > > > created object?
> > > >
> > > > > > "Lee" <bbdaffy@hotmail.com> wrote in message
> > > > > > news:c24e2d$d6m$1@eclipse.org...
> > > > > > > Hi,
> > > > > > >
> > > > > > > Using LogicDnd example as a reference, I wrote a plugin which is
> > > somewhat
> > > > > > > similar. I have a TreeViewer of objects from which I can drag
> the
> > > object
> > > > > > > onto a graphical editor and it will appear in the editor as a
> UML
> > > Class
> > > > > > > Figure. I used the standard DragSupport in the TreeViewer and a
> > > > > > > AbstractTransferDropTargetListener in the editor. All works well
> and
> > > the
> > > > > > > new object gets added as a child to the container which I am
> > > editing.
> > > > > > > However, although the Model (MVC paradigm) gets updated, and the
> > > update
> > > > is
> > > > > > > propagated to the EditPart via PropertyChangeListener, the View
> does
> > > not
> > > > > > > get updated instantly. I need to either switch to another view
> and
> > > back,
> > > > > > > or minimise the workbench and then restore it, in other words, I
> > > have to
> > > > > > > somehow force the editor to refresh itself. I know something is
> > > wrong
> > > > with
> > > > > > > my code somewhere but I am not sure where to look. I tried using
> a
> > > > > > > refreshVisual() after I called refreshChildren(), but it din
> work.
> > > Please
> > > > > > > help. Thanks.
> > > > > > >
> > > > > > > Rgds,
> > > > > > > Lee
> > > > > > >
> > > >
> > > >
> >
> >
Previous Topic:ScrollPane and PolylineConnection problem whith Draw2D
Next Topic:Incompatibility between XYLayout and ScrollPane ?
Goto Forum:
  


Current Time: Thu Dec 26 16:06:23 GMT 2024

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

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

Back to the top