Community
Participate
Working Groups
ObservableMapCellLabelProvider#update methods looks like this: public void update(ViewerCell cell) { Object element = cell.getElement(); Object value = attributeMaps[0].get(element); cell.setText(value == null ? "" : value.toString()); //$NON-NLS-1$ } This code always gets the first element of the attributeMaps array. The result is that the property that is set for the first column in a GUI table is displayed in all table columns. The fix is to use the column index of the argument cell: Object value = attributeMaps[cell.getColumnIndex()].get(element); The work around for this is to extends ObservableMapCellLabelProvider and override update with a version that does this. Link to the source code: https://git.eclipse.org/c/gerrit/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapCellLabelProvider.java?id=008dad8edbf50352221d9e833876a8a4bc2ec573#n91
Thanks for the pointer. Can you please provide a Gerrit patch? https://wiki.eclipse.org/Platform_UI/How_to_Contribute
I plan do some work to solve this. Expect a Gerrit change shortly.
New Gerrit change created: https://git.eclipse.org/r/118112
It turns out that using only the map on index 0 is actually the intended and documented (although weird) behaviour for ObservableMapCellLabelProvider. So I made a change with some added documentation about this and a test case. This bug report can be closed now, both if the change in merged but also if it is not.
I had some problems with getting Mockito to work when launched from Eclipse. I got an error like this: Caused by: java.lang.SecurityException: class "org.eclipse.jface.viewers.ViewerCell$$EnhancerByMockitoWithCGLIB$$df9318f7"'s signer information does not match signer information of other classes in the same package It turned out that this happens if the org.mockito bundle is signed while the org.eclipse.jface bundle is not. I solved it by manually removing the singing stuff from the org.mockito bundle in my target definition. Also, to use Mockito I had to add org.objenesis as an explicit dependency to the test project. That is weird, because org.mockito already depend on that bundle. But I shouldn't hurt anyone, so I guess that is okay.
Gerrit change https://git.eclipse.org/r/118112 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=57a47baac0853b4a8a87404e1f3994997bbfc1ad
This broke the tests completely, see http://download.eclipse.org/eclipse/downloads/drops4/I20180312-2000/testresults/html/org.eclipse.jface.tests.databinding_ep48I-unit-cen64-gtk2_linux.gtk.x86_64_8.0.html From the log: !ENTRY org.mockito 4 0 2018-03-13 22:40:13.551 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.mockito [276] Unresolved requirement: Import-Package: COM.jrockit.reflect; resolution:="optional" Unresolved requirement: Import-Package: jrockit.vm; resolution:="optional" Unresolved requirement: Import-Package: org.hamcrest; version="[1.0.0,2.0.0)" at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1661) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) Several possible issues - version for mockito not indicated - issues wit obenensis (we've never used it directly so far) Take a look at 'org.eclipse.e4.ui.tests' which works fine.
Please fix this so that the official tests run again. I'll revert the change tomorrow if they still fail.
New Gerrit change created: https://git.eclipse.org/r/119509
Gerrit change https://git.eclipse.org/r/119509 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=512017c8db66550018bb67a0da2e5cc7684c4806
(In reply to Eclipse Genie from comment #10) > Gerrit change https://git.eclipse.org/r/119509 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=512017c8db66550018bb67a0da2e5cc7684c4806 > That did not do the trick. ==> !ENTRY org.mockito 4 0 2018-03-15 22:34:39.445 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.mockito [276] Unresolved requirement: Import-Package: COM.jrockit.reflect; resolution:="optional" Unresolved requirement: Import-Package: jrockit.vm; resolution:="optional" Unresolved requirement: Import-Package: org.hamcrest; version="[1.0.0,2.0.0)" at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1661) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
OK, the specified version is not the one used by the other test bundles and probably not available in the official build. I've replaced it with the version we use in the other test bundles: org.mockito;bundle-version="1.8.4" Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=239c4d36bb71344cf0e5619f3292e104059b00a1
Orbit contains Mockito 1.9.5, but suspicious are the import directives for JRockit. They are optional and there is no bundle providing JRockit on Orbit, so it might be that the deployed 1.9.5 version is not valid to use. Mockito 1.8.4 does not have that dependency. But both have a requirement for org.hamcrest package. That bundle is definetely on Orbit and exports the package. I cannot explain why there is a problem for that package, and expect that it now will fail for it. But let's see.
As suspected this did not work. Hence I removed the test and reverted the changes to MANIFEST.MF. Now the tests pass again with I20180316-2000.
There was recently some change regarding Hamcrwst on platform that made all builds fail. Would it be worth to retry the change?
(In reply to Karsten Thoms from comment #15) > There was recently some change regarding Hamcrwst on platform that made all > builds fail. Would it be worth to retry the change? I don't think it would make a difference as the other UI test bundle just worked fine in the official build. If you try it again, please make sure to immediately revert if it fails.
(In reply to Dani Megert from comment #16) > (In reply to Karsten Thoms from comment #15) > > There was recently some change regarding Hamcrwst on platform that made all > > builds fail. Would it be worth to retry the change? > > I don't think it would make a difference as the other UI test bundle just > worked fine in the official build. We also improved the version for some required bundles. So, please try it out and we'll see.
PING!
New Gerrit change created: https://git.eclipse.org/r/122443
Gerrit change https://git.eclipse.org/r/122443 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=42a89fd3f087abb30bfcc40acd69142e11c37df8
Can be closed when test ObservableMapCellLabelProviderTest is performed in next nightly build
New Gerrit change created: https://git.eclipse.org/r/122553
Gerrit change https://git.eclipse.org/r/122553 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6b3953d06060ccb691c9daecdcb60705a0215215
Re-target for 4.9?
(In reply to Karsten Thoms from comment #24) > Re-target for 4.9? Done.
(In reply to Dani Megert from comment #25) > (In reply to Karsten Thoms from comment #24) > > Re-target for 4.9? > > Done. Karsten/Jens, is this still open?
Yes, it is still open. We had a problem last time and reverted it. It is waiting for trying it again. Unfortunately I'm busy ATM. Jens, could you provide the patch again?
(In reply to Karsten Thoms from comment #27) > Yes, it is still open. We had a problem last time and reverted it. It is > waiting for trying it again. Unfortunately I'm busy ATM. Jens, could you > provide the patch again? I think we should just drop this change; it's not worth the effort; there's nothing very valuable in it. The problem I think was to get Mockito (or rather Objenesis) to work with the databinding tests. I don't know exactly what the problem was, I have no idea about how to solve it, and I don't have time to put work into it. I think we should just close it as "WONT_FIX".
(In reply to Jens Lideström from comment #28) > I think we should just close it as "WONT_FIX". As suggested I close this bug as "WONT_FIX".