Bug 155873 [PropertiesView] PropertySheetPage Help Integration Does Not Work In a Wizard
I've created a wizard page that uses a PropertySheetPage. If the PSP has focus and I press F1 to open help, a NPE occurs. The NPE occurs in the PropertySheetPage class on line 233 which is this: getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE); getSite() returns null because the PSP is not in a view. From what I can tell, getSite() is only being called to get the help system, which can be done in another way. If the help system was acquired in a different way that didn't involve getting the site I think this would work. Here's an example I tried which works: PlatformUI.getWorkbench().getHelpSystem().displayHelp(HELP_CONTEXT_PROPERTY_SHEET_PAGE); So, I think only a minor change in the eclipse UI is required to resolve the issue I have. I will attach a patch that contains this fix.
bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheetPage.java
import org.eclipse.ui.part.CellEditorActionHandler;
import org.eclipse.ui.part.Page;
/**
 * The standard implementation of property sheet page which presents
 * a table of property names and values obtained from the current selection
 * in the active workbench part.
 * <p>
 * This page obtains the information about what properties to display from 
 * the current selection (which it tracks). 
 * </p>
 * <p>
 * The model for this page is a hierarchy of <code>IPropertySheetEntry</code>.
 * The page may be configured with a custom model by setting the root entry.
 * <p>
 * If no root entry is set then a default model is created which uses the
 * <code>IPropertySource</code> interface to obtain the properties of
 * the current selection. This requires that the selected objects provide an
 * <code>IPropertySource</code> adapter (or implement 
 * <code>IPropertySource</code> directly). This restiction can be overcome
 * by providing this page with an <code>IPropertySourceProvider</code>. If
 * supplied, this provider will be used by the default model to obtain a
 * property source for the current selection 
 * </p>
 * <p>
 * This class may be instantiated; it is not intended to be subclassed.
 * </p>
 *
 * @see IPropertySource
 */
public class PropertySheetPage extends Page implements IPropertySheetPage, IAdaptable {