Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problems with TableViewer and ComboboxCellEditors
Problems with TableViewer and ComboboxCellEditors [message #462827] Thu, 01 February 2007 11:02 Go to next message
Marcus is currently offline MarcusFriend
Messages: 7
Registered: July 2009
Junior Member
Hi all!

I have some problems with ComboboxCellEditors in a TableViewer. The
problems occurs when I try to change the value in the combo. When I do so,
Eclipse shows an error dialog which displays the message: "An error has
occurred. See error log for more details". When I try to close this one it
immediately pops up again and this behavior is repeated around 25 times.

The error log gives me the following information:

!ENTRY org.eclipse.ui.workbench 4 2 2007-01-28 11:27:55.000
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.ui.part.MultiPageSelectionProvider.getSelection( MultiPageSelectionProvider.java:129)
at
org.eclipse.ui.internal.AbstractSelectionService.getSelectio n(AbstractSelectionService.java:220)
at
org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der.swapListeners(CurrentSelectionSourceProvider.java:141)
at
org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der.access$0(CurrentSelectionSourceProvider.java:131)
at
org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der$1.windowActivated(CurrentSelectionSourceProvider.java:54 )
at org.eclipse.ui.internal.Workbench$8.run(Workbench.java:606)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbe nch.java:604)
at
org.eclipse.ui.internal.WorkbenchWindow$7.shellActivated(Wor kbenchWindow.java:2683)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:164)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1576)
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1714)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3244 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DestroyWindow(Native Method)
at org.eclipse.swt.widgets.Control.destroyWidget(Control.java:5 57)
at org.eclipse.swt.widgets.Widget.release(Widget.java:753)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:415)
at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java :397)
at org.eclipse.swt.widgets.Shell.dispose(Shell.java:627)
at org.eclipse.jface.window.Window.close(Window.java:330)
at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:1014)
at
org.eclipse.jface.dialogs.MessageDialog.buttonPressed(Messag eDialog.java:167)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.jav a:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.jface.dialogs.MessageDialog.openError(MessageDia log.java:322)
at
org.eclipse.jface.util.SafeRunnable.handleException(SafeRunn able.java:60)
at org.eclipse.core.runtime.SafeRunner.handleException(SafeRunn er.java:68)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:39)
at
org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbe nch.java:604)
at
org.eclipse.ui.internal.WorkbenchWindow$7.shellActivated(Wor kbenchWindow.java:2683)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:164)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1576)
at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1714)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3244 )
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2389)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2963)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.crimar.calx.Application.run(Application.java:18)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

The strange thing with this problem is that I have debugged my code and it
behaves as expected so I wonder if this might be a bug?

My CellModifier that handles the mapping between the table and the model
is partly shown below:
public Object getValue(Object element, String property) {
IProjectRow row = (IProjectRow) element;
int index = getIndexOf(property);

switch(index) {
case(0): ..
int i = unitTypes.indexOf(row.getUnit());
return new Integer(i);
case(4): ..
default: return null;
}
}

Where case 0 is retrieves the current value of the model (which also is a
selectable item in the combobox). My modify code is given below:

public void modify(Object element, String property, Object value) {

...

switch(index) {
case(0):
String val = (String) unitTypes.get(((Integer)value).intValue());
default:
;
}

tableViewer.update(row, null);
}

Remember that I have debugged the code and I haven't found any bugs. It
behaves as expected. I'm developing a RCP application using Eclipse 3.2 on
Windows XP SP2. Is it my code that might be erronous or might it be an
Eclipse bug?

// Marcus
Re: Problems with TableViewer and ComboboxCellEditors [message #462870 is a reply to message #462827] Thu, 01 February 2007 17:27 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
I suppose that the reason for your issue is because your getValue method
returns null.
The Combo value mustn't be null.

Snjeza

Marcus wrote:
> Hi all!
>
> I have some problems with ComboboxCellEditors in a TableViewer. The
> problems occurs when I try to change the value in the combo. When I do
> so, Eclipse shows an error dialog which displays the message: "An error
> has occurred. See error log for more details". When I try to close this
> one it immediately pops up again and this behavior is repeated around 25
> times.
>
> The error log gives me the following information:
>
> !ENTRY org.eclipse.ui.workbench 4 2 2007-01-28 11:27:55.000
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.ui.workbench".
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.ui.part.MultiPageSelectionProvider.getSelection( MultiPageSelectionProvider.java:129)
>
> at
> org.eclipse.ui.internal.AbstractSelectionService.getSelectio n(AbstractSelectionService.java:220)
>
> at
> org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der.swapListeners(CurrentSelectionSourceProvider.java:141)
>
> at
> org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der.access$0(CurrentSelectionSourceProvider.java:131)
>
> at
> org.eclipse.ui.internal.services.CurrentSelectionSourceProvi der$1.windowActivated(CurrentSelectionSourceProvider.java:54 )
>
> at org.eclipse.ui.internal.Workbench$8.run(Workbench.java:606)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at
> org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbe nch.java:604)
> at
> org.eclipse.ui.internal.WorkbenchWindow$7.shellActivated(Wor kbenchWindow.java:2683)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:164)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
> at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1576)
> at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1714)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3244 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1920 )
> at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:443)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3334 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DestroyWindow(Native Method)
> at org.eclipse.swt.widgets.Control.destroyWidget(Control.java:5 57)
> at org.eclipse.swt.widgets.Widget.release(Widget.java:753)
> at org.eclipse.swt.widgets.Widget.dispose(Widget.java:415)
> at org.eclipse.swt.widgets.Decorations.dispose(Decorations.java :397)
> at org.eclipse.swt.widgets.Shell.dispose(Shell.java:627)
> at org.eclipse.jface.window.Window.close(Window.java:330)
> at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:1014)
> at
> org.eclipse.jface.dialogs.MessageDialog.buttonPressed(Messag eDialog.java:167)
>
> at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.jav a:660)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
> at org.eclipse.jface.window.Window.open(Window.java:796)
> at
> org.eclipse.jface.dialogs.MessageDialog.openError(MessageDia log.java:322)
> at
> org.eclipse.jface.util.SafeRunnable.handleException(SafeRunn able.java:60)
> at org.eclipse.core.runtime.SafeRunner.handleException(SafeRunn er.java:68)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:39)
> at
> org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbe nch.java:604)
> at
> org.eclipse.ui.internal.WorkbenchWindow$7.shellActivated(Wor kbenchWindow.java:2683)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:164)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:933)
> at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations. java:1576)
> at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:1714)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3244 )
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.j ava:1539)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1634)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2389)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2963)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at com.crimar.calx.Application.run(Application.java:18)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
> The strange thing with this problem is that I have debugged my code and
> it behaves as expected so I wonder if this might be a bug?
>
> My CellModifier that handles the mapping between the table and the model
> is partly shown below:
> public Object getValue(Object element, String property) {
> IProjectRow row = (IProjectRow) element;
> int index = getIndexOf(property);
>
> switch(index) {
> case(0): ..
> int i = unitTypes.indexOf(row.getUnit());
> return new Integer(i);
> case(4): ..
> default: return null;
> }
> }
>
> Where case 0 is retrieves the current value of the model (which also is
> a selectable item in the combobox). My modify code is given below:
>
> public void modify(Object element, String property, Object value) {
>
> ..
>
> switch(index) {
> case(0):
> String val = (String) unitTypes.get(((Integer)value).intValue());
> default:
> ;
> }
>
> tableViewer.update(row, null);
> }
>
> Remember that I have debugged the code and I haven't found any bugs. It
> behaves as expected. I'm developing a RCP application using Eclipse 3.2
> on Windows XP SP2. Is it my code that might be erronous or might it be
> an Eclipse bug?
>
> // Marcus
>
>
Previous Topic:delete-key doesn't work
Next Topic:Table row colors
Goto Forum:
  


Current Time: Tue Oct 08 19:27:08 GMT 2024

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

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

Back to the top