Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366541

Summary: [Compatibility] ICommon is not being correctly adapted
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, remy.suen, rolf.theunissen
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/#/c/138905/
Whiteboard:
Bug Depends on:    
Bug Blocks: 366520    

Description Paul Webster CLA 2011-12-13 09:17:28 EST
org.eclipse.ui.tests.menus.ObjectContributionTest.testAdaptables() shows the test objects are not being adapted to ICommon interface and so the ObjectContribution is not being honoured.

PW
Comment 1 Paul Webster CLA 2011-12-20 13:17:06 EST
One of our service plugins adds an adapter from Object to org.eclipse.e4.examples.services.snippets.adapter.ThingWithId

In 4.2 when we get into org.eclipse.ui.internal.ObjectContributorManager.getCommonClasses(List, List) and are at the "if (otherAdapters.isEmpty() && !adapters.isEmpty()) {...} else {...}" we take the *else*, and then we take the inner *else* and remove ICommon from *adapters*.

In 3.x we take the first if and do a "removeNonCommonAdapters(adapters, classesAndInterfaces);" which leaves the ICommon interface in the *adapters* list.

This problem has existed in the 3.x stream since at least 3.2


PW
Comment 2 Rolf Theunissen CLA 2019-05-26 12:23:00 EDT
Fixed in the context of Bug 485167. It is made sure that org.eclipse.e4.examples.* is no longer in the target platform when running the tests with the available launchers.
Comment 3 Dani Megert CLA 2019-05-29 11:34:51 EDT

*** This bug has been marked as a duplicate of bug 485167 ***