* @throws CoreException
* thrown if there is a problem creating the apge
*/
public IWorkbenchPropertyPage createPage(Object element)
throws CoreException {
IWorkbenchPropertyPage ppage = null;
ppage = (IWorkbenchPropertyPage) WorkbenchPlugin.createExtension(
pageElement, IWorkbenchRegistryConstants.ATT_CLASS);
ppage.setTitle(getPageName());
Object adapted = element;
if (adaptable) {
adapted = getAdaptedElement(element);
if (adapted == null) {
String message = "Error adapting selection to Property page " + pageId + " is being ignored"; //$NON-NLS-1$ //$NON-NLS-2$
throw new CoreException(new Status(IStatus.ERROR,
WorkbenchPlugin.PI_WORKBENCH, IStatus.ERROR, message,
null));
}
}
if (adapted instanceof IAdaptable)
ppage.setElement((IAdaptable) adapted);
else
ppage.setElement(new AdaptableForwarder(adapted));
return ppage;
}