problem with undo command [message #132205] |
Fri, 14 May 2004 15:42 |
Eclipse User |
|
|
|
Originally posted by: paolino125.hotmail.com
Hi, I'm building a graphical editor with gef. Look at flow example I've
implemented a deleteCommand; when i delete a figure all works, but when I
try to undo the command I get:
java.lang.NullPointerException
at
org.eclipse.gef.editparts.AbstractEditPart.getRoot(AbstractE ditPart.java:580
)
at
org.eclipse.gef.editparts.AbstractEditPart.getViewer(Abstrac tEditPart.java:6
30)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.createOr FindConnection(A
bstractGraphicalEditPart.java:285)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshT argetConnections
(AbstractGraphicalEditPart.java:640)
at
org.eclipse.dylog.editors.graphical.part.ActivityPart.proper tyChange(Activit
yPart.java:107)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at org.eclipse.dylog.model.Activity.firePropertyChange(Activity .java:81)
at org.eclipse.dylog.model.Activity.addTargetConnection(Activit y.java:99)
at
org.eclipse.dylog.model.command.DeleteCommand.restoreConnect ions(DeleteComma
nd.java:88)
at
org.eclipse.dylog.model.command.DeleteCommand.undo(DeleteCom mand.java:115)
at org.eclipse.gef.commands.CompoundCommand.undo(CompoundComman d.java:169)
at org.eclipse.gef.commands.CommandStack.undo(CommandStack.java :229)
....
It seems that the editPart I've added dosn't have a parent!Idon't understand
how it's possible!
Please help me. Thanks
|
|
|
Re: problem with undo command [message #132350 is a reply to message #132205] |
Mon, 17 May 2004 13:34 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
It sounds like you have a dangling EditPart which is still listening to the
model. Make sure you unhook and model listeners in deactivate(), and allow
the editparts to get GCed.
"funky79" <paolino125@hotmail.com> wrote in message
news:c82ovk$26b$1@eclipse.org...
> Hi, I'm building a graphical editor with gef. Look at flow example I've
> implemented a deleteCommand; when i delete a figure all works, but when I
> try to undo the command I get:
>
> java.lang.NullPointerException
>
> at
>
org.eclipse.gef.editparts.AbstractEditPart.getRoot(AbstractE ditPart.java:580
> )
>
> at
>
org.eclipse.gef.editparts.AbstractEditPart.getViewer(Abstrac tEditPart.java:6
> 30)
>
> at
>
org.eclipse.gef.editparts.AbstractGraphicalEditPart.createOr FindConnection(A
> bstractGraphicalEditPart.java:285)
>
> at
>
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshT argetConnections
> (AbstractGraphicalEditPart.java:640)
>
> at
>
org.eclipse.dylog.editors.graphical.part.ActivityPart.proper tyChange(Activit
> yPart.java:107)
>
> at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
>
> at org.eclipse.dylog.model.Activity.firePropertyChange(Activity .java:81)
>
> at org.eclipse.dylog.model.Activity.addTargetConnection(Activit y.java:99)
>
> at
>
org.eclipse.dylog.model.command.DeleteCommand.restoreConnect ions(DeleteComma
> nd.java:88)
>
> at
> org.eclipse.dylog.model.command.DeleteCommand.undo(DeleteCom mand.java:115)
>
> at org.eclipse.gef.commands.CompoundCommand.undo(CompoundComman d.java:169)
>
> at org.eclipse.gef.commands.CommandStack.undo(CommandStack.java :229)
>
> ...
>
> It seems that the editPart I've added dosn't have a parent!Idon't
understand
> how it's possible!
>
> Please help me. Thanks
>
>
|
|
|
Re: problem with undo command [message #132387 is a reply to message #132350] |
Mon, 17 May 2004 13:41 |
Eclipse User |
|
|
|
Originally posted by: paolino125.hotmail.com
Yes, it's right!
Thanks!
"Randy Hudson" <none@us.ibm.com> ha scritto nel messaggio
news:c8aejs$37q$1@eclipse.org...
> It sounds like you have a dangling EditPart which is still listening to
the
> model. Make sure you unhook and model listeners in deactivate(), and
allow
> the editparts to get GCed.
>
> "funky79" <paolino125@hotmail.com> wrote in message
> news:c82ovk$26b$1@eclipse.org...
> > Hi, I'm building a graphical editor with gef. Look at flow example I've
> > implemented a deleteCommand; when i delete a figure all works, but when
I
> > try to undo the command I get:
> >
> > java.lang.NullPointerException
> >
> > at
> >
>
org.eclipse.gef.editparts.AbstractEditPart.getRoot(AbstractE ditPart.java:580
> > )
> >
> > at
> >
>
org.eclipse.gef.editparts.AbstractEditPart.getViewer(Abstrac tEditPart.java:6
> > 30)
> >
> > at
> >
>
org.eclipse.gef.editparts.AbstractGraphicalEditPart.createOr FindConnection(A
> > bstractGraphicalEditPart.java:285)
> >
> > at
> >
>
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshT argetConnections
> > (AbstractGraphicalEditPart.java:640)
> >
> > at
> >
>
org.eclipse.dylog.editors.graphical.part.ActivityPart.proper tyChange(Activit
> > yPart.java:107)
> >
> > at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
> >
> > at org.eclipse.dylog.model.Activity.firePropertyChange(Activity .java:81)
> >
> > at
org.eclipse.dylog.model.Activity.addTargetConnection(Activit y.java:99)
> >
> > at
> >
>
org.eclipse.dylog.model.command.DeleteCommand.restoreConnect ions(DeleteComma
> > nd.java:88)
> >
> > at
> >
org.eclipse.dylog.model.command.DeleteCommand.undo(DeleteCom mand.java:115)
> >
> > at
org.eclipse.gef.commands.CompoundCommand.undo(CompoundComman d.java:169)
> >
> > at org.eclipse.gef.commands.CommandStack.undo(CommandStack.java :229)
> >
> > ...
> >
> > It seems that the editPart I've added dosn't have a parent!Idon't
> understand
> > how it's possible!
> >
> > Please help me. Thanks
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.01950 seconds