Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » NPE when model implements IPropertySource
NPE when model implements IPropertySource [message #153849] Wed, 13 October 2004 16:08 Go to next message
Eclipse UserFriend
Originally posted by: gayatri.us.ibm.com

Hi,
I have made my model objects as implementors of IPropertySource. These
model objects are actually adapters that are wrappering the actual EMF
model objects.
My problem is, when I make them implement the IPropertySource, when I
click on the corresponding editpart I get the following NPException. I
am not able to figure out what is causing this, but somehow when I
remove the IPropertySource implementation from the model adapters, I
don't get this error. Help!!
java.lang.NullPointerException
at
org.eclipse.gef.tools.ToolUtilities.getSelectionWithoutDepen dants(ToolUtilities.java:36)
at
org.eclipse.gef.tools.DragEditPartsTracker.createOperationSe t(DragEditPartsTracker.java:150)
at
org.eclipse.gef.tools.AbstractTool.getOperationSet(AbstractT ool.java:574)
at
org.eclipse.gef.tools.DragEditPartsTracker.captureSourceDime nsions(DragEditPartsTracker.java:108)
at
org.eclipse.gef.tools.DragEditPartsTracker.setState(DragEdit PartsTracker.java:526)
at
org.eclipse.gef.tools.AbstractTool.stateTransition(AbstractT ool.java:1245)
at
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown (SelectEditPartTracker.java:93)
at org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.ja va:965)
at
org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool. java:481)
at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:197)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Pressed(DomainEventDispatcher.java:312)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown( LightweightSystem.java:491)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code))
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:371)
at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)
Re: NPE when model implements IPropertySource [message #153859 is a reply to message #153849] Wed, 13 October 2004 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The GraphicalViewer is getting a FocusLost event during the callback for
MouseDown. Find out why focus is being lost. Put a breakpoint in
SelectionTool#handleFocusLost(), and find out what is causing the canvas to
lose focus.

We will fix this bug in 3.1 such that the NPE will not occur. However, if
the canvas looses focus, the mouse drag/press is aborted. So it would not
be possible to select and drag an editpart all at once if you are losing
focus when the part is selected.

"Gayatri Renganathan" <gayatri@us.ibm.com> wrote in message
news:ckjjji$oi2$1@eclipse.org...
> Hi,
> I have made my model objects as implementors of IPropertySource. These
> model objects are actually adapters that are wrappering the actual EMF
> model objects.
> My problem is, when I make them implement the IPropertySource, when I
> click on the corresponding editpart I get the following NPException. I
> am not able to figure out what is causing this, but somehow when I
> remove the IPropertySource implementation from the model adapters, I
> don't get this error. Help!!
> java.lang.NullPointerException
> at
>
org.eclipse.gef.tools.ToolUtilities.getSelectionWithoutDepen dants(ToolUtilit
ies.java:36)
> at
>
org.eclipse.gef.tools.DragEditPartsTracker.createOperationSe t(DragEditPartsT
racker.java:150)
> at
> org.eclipse.gef.tools.AbstractTool.getOperationSet(AbstractT ool.java:574)
> at
>
org.eclipse.gef.tools.DragEditPartsTracker.captureSourceDime nsions(DragEditP
artsTracker.java:108)
> at
>
org.eclipse.gef.tools.DragEditPartsTracker.setState(DragEdit PartsTracker.jav
a:526)
> at
> org.eclipse.gef.tools.AbstractTool.stateTransition(AbstractT ool.java:1245)
> at
>
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown (SelectEditPartT
racker.java:93)
> at
org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.ja va:965)
> at
> org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool. java:481)
> at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:197)
> at
>
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Pressed(DomainEv
entDispatcher.java:312)
> at
>
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown( LightweightSyste
m.java:491)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
Code))
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
> at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:335)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:41)
> at java.lang.reflect.Method.invoke(Method.java:371)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
> at org.eclipse.core.launcher.Main.run(Main.java:644)
> at org.eclipse.core.launcher.Main.main(Main.java:628)
>
>
Re: NPE when model implements IPropertySource [message #153867 is a reply to message #153859] Wed, 13 October 2004 17:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gayatri.us.ibm.com

Hi Randy,
Thanks for the quick response. I put a stop at the focusLost method in
Selection tool and I am attaching the stack trace at that point. Is
there any way to fix this problem without having to upgrade to the
latest version? If so, how? thanks!!

> SelectionTool.handleFocusLost() line: 227
> SelectionTool(AbstractTool).focusLost(FocusEvent, EditPartViewer) line: 420
> DefaultEditDomain(EditDomain).focusLost(FocusEvent, EditPartViewer) line: 89
> DomainEventDispatcher.dispatchFocusLost(FocusEvent) line: 215
> LightweightSystem$EventHandler.focusLost(FocusEvent) line: 341
> TypedListener.handleEvent(Event) line: 108
> EventTable.sendEvent(Event) line: 82
> FigureCanvas(Widget).sendEvent(Event) line: 796
> FigureCanvas(Widget).sendEvent(int, Event, boolean) line: 820
> FigureCanvas(Widget).sendEvent(int) line: 801
> FigureCanvas(Control).sendFocusEvent(int, int) line: 1756
> FigureCanvas(Control).WM_KILLFOCUS(int, int) line: 3614
> FigureCanvas(Canvas).WM_KILLFOCUS(int, int) line: 233
> FigureCanvas(Control).windowProc(int, int, int, int) line: 2999
> Display.windowProc(int, int, int, int) line: 3338
> OS.DefWindowProcW(int, int, int, int) line: not available [native method]
> OS.DefWindowProc(int, int, int, int) line: 1462
> Shell.callWindowProc(int, int, int) line: 398
> Shell(Control).windowProc(int, int, int, int) line: 3050
> Shell(Decorations).windowProc(int, int, int, int) line: 1391
> Display.windowProc(int, int, int, int) line: 3338
> OS.BringWindowToTop(int) line: not available [native method]
> Shell(Decorations).bringToTop() line: 180
> Shell.open() line: 757
> MessageDialog(Window).open() line: 644
> MessageDialog.openError(Shell, String, String) line: 295
> AbstractSelectionService$3(SafeRunnable).handleException(Thr owable) line: 52
> InternalPlatform.handleException(ISafeRunnable, Throwable) line: 349
> InternalPlatform.run(ISafeRunnable) line: 617
> Platform.run(ISafeRunnable) line: 747
> PageSelectionService(AbstractSelectionService).fireSelection (IWorkbenchPart, ISelection) line: 151
> AbstractSelectionService$1.selectionChanged(SelectionChanged Event) line: 66
> MultiPageSelectionProvider$1.run() line: 70
> InternalPlatform.run(ISafeRunnable) line: 615
> Platform.run(ISafeRunnable) line: 747
> MultiPageSelectionProvider.fireSelectionChanged(SelectionCha ngedEvent) line: 68
> MultiPageEditorSite.handleSelectionChanged(SelectionChangedE vent) line: 299
> MultiPageEditorSite$1.selectionChanged(SelectionChangedEvent ) line: 247
> TuiGraphicalViewer(AbstractEditPartViewer).fireSelectionChan ged() line: 220
> TuiGraphicalViewer(AbstractEditPartViewer).appendSelection(E ditPart) line: 151
> TuiGraphicalViewer(AbstractEditPartViewer).select(EditPart) line: 538
> DragEditPartsTracker(SelectEditPartTracker).performSelection () line: 205
> DragEditPartsTracker(SelectEditPartTracker).performCondition alSelection() line: 151
> DragEditPartsTracker(SelectEditPartTracker).handleButtonDown (int) line: 85
> DragEditPartsTracker(AbstractTool).mouseDown(MouseEvent, EditPartViewer) line: 965
> SelectionTool.mouseDown(MouseEvent, EditPartViewer) line: 481
> DefaultEditDomain(EditDomain).mouseDown(MouseEvent, EditPartViewer) line: 197
> DomainEventDispatcher.dispatchMousePressed(MouseEvent) line: 312
> LightweightSystem$EventHandler.mouseDown(MouseEvent) line: 491
> TypedListener.handleEvent(Event) line: 132
> EventTable.sendEvent(Event) line: 82
> FigureCanvas(Widget).sendEvent(Event) line: 796
> Display.runDeferredEvents() line: 2772
> Display.readAndDispatch() line: 2431
> Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1377
> Workbench.runUI() line: 1348
> Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 254
> PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 141
> IDEApplication.run(Object) line: 96
> PlatformActivator$1.run(Object) line: 335
> EclipseStarter.run(Object) line: 273
> EclipseStarter.run(String[], Runnable) line: 129
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 79
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 41
> Method.invoke(Object, Object[]) line: 371
> Main.basicRun(String[]) line: 183
> Main.run(String[]) line: 644
> Main.main(String[]) line: 628




Randy Hudson wrote:

> The GraphicalViewer is getting a FocusLost event during the callback for
> MouseDown. Find out why focus is being lost. Put a breakpoint in
> SelectionTool#handleFocusLost(), and find out what is causing the canvas to
> lose focus.
>
> We will fix this bug in 3.1 such that the NPE will not occur. However, if
> the canvas looses focus, the mouse drag/press is aborted. So it would not
> be possible to select and drag an editpart all at once if you are losing
> focus when the part is selected.
>
> "Gayatri Renganathan" <gayatri@us.ibm.com> wrote in message
> news:ckjjji$oi2$1@eclipse.org...
>
>>Hi,
>>I have made my model objects as implementors of IPropertySource. These
>>model objects are actually adapters that are wrappering the actual EMF
>>model objects.
>>My problem is, when I make them implement the IPropertySource, when I
>>click on the corresponding editpart I get the following NPException. I
>>am not able to figure out what is causing this, but somehow when I
>>remove the IPropertySource implementation from the model adapters, I
>>don't get this error. Help!!
>>java.lang.NullPointerException
>> at
>>
>
> org.eclipse.gef.tools.ToolUtilities.getSelectionWithoutDepen dants(ToolUtilit
> ies.java:36)
>
>> at
>>
>
> org.eclipse.gef.tools.DragEditPartsTracker.createOperationSe t(DragEditPartsT
> racker.java:150)
>
>> at
>> org.eclipse.gef.tools.AbstractTool.getOperationSet(AbstractT ool.java:574)
>> at
>>
>
> org.eclipse.gef.tools.DragEditPartsTracker.captureSourceDime nsions(DragEditP
> artsTracker.java:108)
>
>> at
>>
>
> org.eclipse.gef.tools.DragEditPartsTracker.setState(DragEdit PartsTracker.jav
> a:526)
>
>> at
>> org.eclipse.gef.tools.AbstractTool.stateTransition(AbstractT ool.java:1245)
>> at
>>
>
> org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown (SelectEditPartT
> racker.java:93)
>
>> at
>
> org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.ja va:965)
>
>> at
>> org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool. java:481)
>> at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:197)
>> at
>>
>
> org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Pressed(DomainEv
> entDispatcher.java:312)
>
>> at
>>
>
> org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown( LightweightSyste
> m.java:491)
>
>> at
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
>> at
>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
>
> Code))
>
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
>> at
>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
>
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
>> at
>
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
>
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
>> at
>>
>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
>
>> at
>
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
>
>> at
>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
>> at
>>
>
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:335)
>
>> at
>>
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
>
>> at
>>
>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79
> )
>
>> at
>>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> ..java:41)
>
>> at java.lang.reflect.Method.invoke(Method.java:371)
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
>> at org.eclipse.core.launcher.Main.run(Main.java:644)
>> at org.eclipse.core.launcher.Main.main(Main.java:628)
>>
>>
>
>
>
Re: NPE when model implements IPropertySource [message #153883 is a reply to message #153867] Wed, 13 October 2004 17:34 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It looks like a previous exception is in the process of being logged and
shown to the user, which is causing a secondary exception to occur.

to reproduce the *real* exception, try changing selection using the keyboard
instead of the mouse. Use the arrow keys processed by
GRaphicalViewerKeyHandler.

"Gayatri Renganathan" <gayatri@us.ibm.com> wrote in message
news:ckjmq5$vjp$1@eclipse.org...
> Hi Randy,
> Thanks for the quick response. I put a stop at the focusLost method in
> Selection tool and I am attaching the stack trace at that point. Is
> there any way to fix this problem without having to upgrade to the
> latest version? If so, how? thanks!!
>
> > SelectionTool.handleFocusLost() line: 227
> > SelectionTool(AbstractTool).focusLost(FocusEvent, EditPartViewer) line:
420
> > DefaultEditDomain(EditDomain).focusLost(FocusEvent, EditPartViewer)
line: 89
> > DomainEventDispatcher.dispatchFocusLost(FocusEvent) line: 215
> > LightweightSystem$EventHandler.focusLost(FocusEvent) line: 341
> > TypedListener.handleEvent(Event) line: 108
> > EventTable.sendEvent(Event) line: 82
> > FigureCanvas(Widget).sendEvent(Event) line: 796
> > FigureCanvas(Widget).sendEvent(int, Event, boolean) line: 820
> > FigureCanvas(Widget).sendEvent(int) line: 801
> > FigureCanvas(Control).sendFocusEvent(int, int) line: 1756
> > FigureCanvas(Control).WM_KILLFOCUS(int, int) line: 3614
> > FigureCanvas(Canvas).WM_KILLFOCUS(int, int) line: 233
> > FigureCanvas(Control).windowProc(int, int, int, int) line: 2999
> > Display.windowProc(int, int, int, int) line: 3338
> > OS.DefWindowProcW(int, int, int, int) line: not available [native
method]
> > OS.DefWindowProc(int, int, int, int) line: 1462
> > Shell.callWindowProc(int, int, int) line: 398
> > Shell(Control).windowProc(int, int, int, int) line: 3050
> > Shell(Decorations).windowProc(int, int, int, int) line: 1391
> > Display.windowProc(int, int, int, int) line: 3338
> > OS.BringWindowToTop(int) line: not available [native method]
> > Shell(Decorations).bringToTop() line: 180
> > Shell.open() line: 757
> > MessageDialog(Window).open() line: 644
> > MessageDialog.openError(Shell, String, String) line: 295
> > AbstractSelectionService$3(SafeRunnable).handleException(Thr owable)
line: 52
> > InternalPlatform.handleException(ISafeRunnable, Throwable) line: 349
> > InternalPlatform.run(ISafeRunnable) line: 617
> > Platform.run(ISafeRunnable) line: 747
> >
PageSelectionService(AbstractSelectionService).fireSelection (IWorkbenchPart,
ISelection) line: 151
> > AbstractSelectionService$1.selectionChanged(SelectionChanged Event) line:
66
> > MultiPageSelectionProvider$1.run() line: 70
> > InternalPlatform.run(ISafeRunnable) line: 615
> > Platform.run(ISafeRunnable) line: 747
> > MultiPageSelectionProvider.fireSelectionChanged(SelectionCha ngedEvent)
line: 68
> > MultiPageEditorSite.handleSelectionChanged(SelectionChangedE vent) line:
299
> > MultiPageEditorSite$1.selectionChanged(SelectionChangedEvent ) line: 247
> > TuiGraphicalViewer(AbstractEditPartViewer).fireSelectionChan ged() line:
220
> > TuiGraphicalViewer(AbstractEditPartViewer).appendSelection(E ditPart)
line: 151
> > TuiGraphicalViewer(AbstractEditPartViewer).select(EditPart) line: 538
> > DragEditPartsTracker(SelectEditPartTracker).performSelection () line: 205
> >
DragEditPartsTracker(SelectEditPartTracker).performCondition alSelection()
line: 151
> > DragEditPartsTracker(SelectEditPartTracker).handleButtonDown (int) line:
85
> > DragEditPartsTracker(AbstractTool).mouseDown(MouseEvent, EditPartViewer)
line: 965
> > SelectionTool.mouseDown(MouseEvent, EditPartViewer) line: 481
> > DefaultEditDomain(EditDomain).mouseDown(MouseEvent, EditPartViewer)
line: 197
> > DomainEventDispatcher.dispatchMousePressed(MouseEvent) line: 312
> > LightweightSystem$EventHandler.mouseDown(MouseEvent) line: 491
> > TypedListener.handleEvent(Event) line: 132
> > EventTable.sendEvent(Event) line: 82
> > FigureCanvas(Widget).sendEvent(Event) line: 796
> > Display.runDeferredEvents() line: 2772
> > Display.readAndDispatch() line: 2431
> > Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1377
> > Workbench.runUI() line: 1348
> > Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 254
> > PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 141
> > IDEApplication.run(Object) line: 96
> > PlatformActivator$1.run(Object) line: 335
> > EclipseStarter.run(Object) line: 273
> > EclipseStarter.run(String[], Runnable) line: 129
> > NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
> > NativeMethodAccessorImpl.invoke(Object, Object[]) line: 79
> > DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 41
> > Method.invoke(Object, Object[]) line: 371
> > Main.basicRun(String[]) line: 183
> > Main.run(String[]) line: 644
> > Main.main(String[]) line: 628
>
>
>
>
> Randy Hudson wrote:
>
> > The GraphicalViewer is getting a FocusLost event during the callback for
> > MouseDown. Find out why focus is being lost. Put a breakpoint in
> > SelectionTool#handleFocusLost(), and find out what is causing the canvas
to
> > lose focus.
> >
> > We will fix this bug in 3.1 such that the NPE will not occur. However,
if
> > the canvas looses focus, the mouse drag/press is aborted. So it would
not
> > be possible to select and drag an editpart all at once if you are losing
> > focus when the part is selected.
> >
> > "Gayatri Renganathan" <gayatri@us.ibm.com> wrote in message
> > news:ckjjji$oi2$1@eclipse.org...
> >
> >>Hi,
> >>I have made my model objects as implementors of IPropertySource. These
> >>model objects are actually adapters that are wrappering the actual EMF
> >>model objects.
> >>My problem is, when I make them implement the IPropertySource, when I
> >>click on the corresponding editpart I get the following NPException. I
> >>am not able to figure out what is causing this, but somehow when I
> >>remove the IPropertySource implementation from the model adapters, I
> >>don't get this error. Help!!
> >>java.lang.NullPointerException
> >> at
> >>
> >
> >
org.eclipse.gef.tools.ToolUtilities.getSelectionWithoutDepen dants(ToolUtilit
> > ies.java:36)
> >
> >> at
> >>
> >
> >
org.eclipse.gef.tools.DragEditPartsTracker.createOperationSe t(DragEditPartsT
> > racker.java:150)
> >
> >> at
>
>> org.eclipse.gef.tools.AbstractTool.getOperationSet(AbstractT ool.java:574)
> >> at
> >>
> >
> >
org.eclipse.gef.tools.DragEditPartsTracker.captureSourceDime nsions(DragEditP
> > artsTracker.java:108)
> >
> >> at
> >>
> >
> >
org.eclipse.gef.tools.DragEditPartsTracker.setState(DragEdit PartsTracker.jav
> > a:526)
> >
> >> at
>
>> org.eclipse.gef.tools.AbstractTool.stateTransition(AbstractT ool.java:1245)
> >> at
> >>
> >
> >
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown (SelectEditPartT
> > racker.java:93)
> >
> >> at
> >
> > org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.ja va:965)
> >
> >> at
> >> org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool. java:481)
> >> at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:197)
> >> at
> >>
> >
> >
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Pressed(DomainEv
> > entDispatcher.java:312)
> >
> >> at
> >>
> >
> >
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown( LightweightSyste
> > m.java:491)
> >
> >> at
>
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
> >> at
> >> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled
> >
> > Code))
> >
> >> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> >> at
> >
> > org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
> >
> >> at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
> >> at
> >
> > org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
> >
> >> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
> >> at
> >>
> >
> >
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
> >
> >> at
> >
> > org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> >
> >> at
> >> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
> >> at
> >>
> >
> >
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> > java:335)
> >
> >> at
> >>
> >
> >
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
> >
> >> at
> >>
> >
> >
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
> >
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >>
> >
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:79
> > )
> >
> >> at
> >>
> >
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> > ..java:41)
> >
> >> at java.lang.reflect.Method.invoke(Method.java:371)
> >> at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
> >> at org.eclipse.core.launcher.Main.run(Main.java:644)
> >> at org.eclipse.core.launcher.Main.main(Main.java:628)
> >>
> >>
> >
> >
> >
>
Previous Topic:ConnectionEditPart not in EditPartRegistry ?
Next Topic:About TitleAreaDialog
Goto Forum:
  


Current Time: Mon Jul 22 22:32:46 GMT 2024

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

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

Back to the top