| Summary: | [Properties] Can't contribute properties page for non IAdaptable | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Keith McQueen <kmcqueen> | ||||||||
| Component: | UI | Assignee: | Tod Creasey <Tod_Creasey> | ||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | jean-michel_lemieux, mdelder, Michael.Valenta, michaelvanmeekeren, Mike_Wilson | ||||||||
| Version: | 3.0.2 | ||||||||||
| Target Milestone: | 3.2 M6 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Keith McQueen
This may have been addressed in the 3.1 stream. The problem is in PropertyDialogAction#createDialogOn (line 170) No - this has always been a limitation. As it is not a regression I am going to downgrade priority as we may not get to it in the 3.1 timeframe. *** Bug 56212 has been marked as a duplicate of this bug. *** This has been fixed in 3.1. Tod please verify and close this bug. See ObjectContributorManager and PropertyPageContributorManager. Moving to RC2 so that you don't forget this one <g> Thanks Jean-Michel. I'll mark it fixed so that it does through our verification pass Jean-Michel the spec for IWorkbenchPropertyPage states that the element must be an IAdaptable and the schema says the page must be an IWorkbenchPropertyPage . Is the schema wrong? This is not possible for the reasons I originally outlined - also the schema specifies that a property page must be an IWorkbenchPropertyPage whose element is an IAdaptable. This is not fixed by the other changes and won't be without an API change - it will be post 3.1. Created attachment 22809 [details]
Zip file of test plug-in
Here is a file that can be used to test any changes.
Why not just see if the Platform's AdapterManager has an appropriate adapter? Even if the class isn't IAdaptable, the Platform's AdapterManager could be consulted to see if anyone else has added it in (by code, rather than necessarily by the plugin schema). Furthermore, this should probably apply to cases where the IAdaptable doesn't provide a PropertyView (i.e. it returns null) as a fall back so that others can add it at a later stage. E.g. I may have a model object that uses adaptable to provide a TreeOutline, but I'd also like to have a Properties view on that object. If they've not provided one, I should be able to add a class to the Platform's AdapterManager that will do the work. I absolutely agree with Alex. There is an extension point (org.eclipse.core.runtime.adapters) specifically for contributing an adapter factory at runtime. Once again, the eclipse team doesn't use their own API. Created attachment 35319 [details] Updated patch Here is the patch from Bug 56212 updated to the current code base Created attachment 35320 [details]
Updated example
Here is an updated version of my test plug-in (it had a couple of bugs).
Fixed in build >20060224 using the algorithm Jean-Michel described in the patch for Bug 56212. Michael Valenta if you could review the changes to RegistryPageContributor to verify that they have not caused any trouble with your fixes for the LegacyResourceSupport I would be most appreciative. BTW this required no API changed so the PMC does not need to look this over. Verified in 20060328 |