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

Bug 78552

Summary: [Properties] IWorkbenchPropertyPage too restrictive
Product: [Eclipse Project] Platform Reporter: Brian Hudson <brian.hudson>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P2    
Version: 3.0.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Brian Hudson CLA 2004-11-12 16:36:55 EST
IWorkbenchPropertyPage declares the following methods:

IAdaptable getElement();
void setElement(IAdaptable element);

This forces anyone who would like to use the org.eclipse.ui.propertyPages
extension to implement the IAdaptable interface.

Often, especially in RCP applications, the classes/interfaces that the developer
would like to implement propertyPages for are from some underlying data structure. 

The developer may not even have access to these data structures in order to
modify them and make them implement IAdaptable. At this point the developer
could create a wrapper class that implemented IAdaptable, but this if far from
ideal. Especially if the selection provider is powered from a content provider 
which is pulling its data from the underlying model.

If the IWorkbenchPropertyPage were changed to:

Object getElement();
void setElement(Object element);

it would be much easier to work with, and would not be a breaking change to
current implementors.
Comment 1 Jean-Michel Lemieux CLA 2004-12-06 15:21:03 EST

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