ECP SWT ViewRenderer [message #1410315] |
Wed, 20 August 2014 07:52  |
Eclipse User |
|
|
|
Hello,
I'm developing an RCP App with the corresponding EMF Forms for every tableViewer entry.
As I checked if the shown informations are correct(by clicking on every single one of them), I got a java.lang.ArrayIndexOutOfBoundsException.
Somehow everytime I get the EMF Forms for my entries and I click away, it deletes the before clicked entry.
To be able to tell why, I did this: System.err.println(elements.length + " " + selectedIndex);
By clicking the entries I get different elements.length values and at the end its value was 0.
Why does the render method remove the object from its parent?Does anybody know how can I fix this?
!ENTRY org.eclipse.ui 4 0 2014-08-20 13:43:56.659
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 2
at reiseapp.swt.TableClass$5.handleEvent(TableClass.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at reiseapp.swt.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
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.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
TableClass row 414: EObject selected = (EObject) elements[selectedIndex];
[Updated on: Wed, 20 August 2014 08:23] by Moderator
|
|
|
|
|
|
|
Re: ECP SWT ViewRenderer [message #1412594 is a reply to message #1412571] |
Tue, 26 August 2014 10:48  |
Eclipse User |
|
|
|
Hi,
has your TableViewer Databinding?
EMFForms uses databinding and thus changes the domain model when you change the values in the ui. TextFields trigger the update on focusout. Please check if your model is really not changed, e.g. add a contentAdapter to your model.
EMFForms also has a TableViewer build in which is databound. A new feature for the TableViewer which does exactly what you want to achieve will be available with the 1.4.0 release see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=442068
The RC1 will be available on friday.
Cheers,
|
|
|
Powered by
FUDForum. Page generated in 0.03633 seconds