Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » NullPointerException with ScrollableThumbnail
NullPointerException with ScrollableThumbnail [message #141760] Tue, 06 July 2004 17:46 Go to next message
Eclipse UserFriend
Originally posted by: nbeckman.NOSPAM.usc.edu

Hello everyone,
I have a GEF plugin running in RCP and it has a thumbnail view.
Unfortunately, every time that I open up a document with my editor, I get a
null pointer exception. Check it out:

java.lang.NullPointerException
at org.eclipse.draw2d.geometry.Point.getDifference(Point.java:1 11)
at
org.eclipse.draw2d.parts.ScrollableThumbnail$ScrollSynchroni zer.mouseDragged
(ScrollableThumbnail.java:159)
at org.eclipse.draw2d.Figure.handleMouseDragged(Figure.java:727 )
at
org.eclipse.draw2d.SWTEventDispatcher.dispatchMouseMoved(SWT EventDispatcher.
java:228)
(The most important lines.)

Now what is happening is that mouseDragged gets called immediately when the
file is opened and it calls getDifference on "private Point startLocation;"
But startLocation is null when the application is first launched. Anyone
have an idea why?
Thanks a lot,
Nels
Re: NullPointerException with ScrollableThumbnail [message #141848 is a reply to message #141760] Tue, 06 July 2004 23:56 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Look into why mouseDragged is being invoked when the application is first
launched. Obviously, that should not be happening.

"Nels Beckman" <nbeckman@NOSPAM.usc.edu> wrote in message
news:cceosq$so$1@eclipse.org...
> Hello everyone,
> I have a GEF plugin running in RCP and it has a thumbnail view.
> Unfortunately, every time that I open up a document with my editor, I get
a
> null pointer exception. Check it out:
>
> java.lang.NullPointerException
> at org.eclipse.draw2d.geometry.Point.getDifference(Point.java:1 11)
> at
>
org.eclipse.draw2d.parts.ScrollableThumbnail$ScrollSynchroni zer.mouseDragged
> (ScrollableThumbnail.java:159)
> at org.eclipse.draw2d.Figure.handleMouseDragged(Figure.java:727 )
> at
>
org.eclipse.draw2d.SWTEventDispatcher.dispatchMouseMoved(SWT EventDispatcher.
> java:228)
> (The most important lines.)
>
> Now what is happening is that mouseDragged gets called immediately when
the
> file is opened and it calls getDifference on "private Point
startLocation;"
> But startLocation is null when the application is first launched. Anyone
> have an idea why?
> Thanks a lot,
> Nels
>
>
Previous Topic:How to change the distance a Fgiure is moved when using "." with arrow keys
Next Topic:Error after adding RCP SDK to Eclipse SDK
Goto Forum:
  


Current Time: Thu Mar 28 22:47:53 GMT 2024

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

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

Back to the top