Bug 86362 [PropertiesView] Can not access AdapterFactory, when plugin is not loaded
I added propertysheet support to my application. When I had it working more or less ok, I refactored this support to a separate plugin and suddenly my property sheet stopped working. No error messages or log - my view just did not manage to get the IPropertySheetPage for my view. Closer inspection and debugging lead me to conclude that the problem lies in the overzealously lazy loading of the AdapterFactory, which avoids loading of the plugin bundle at any cost when retrieving adapters. The lazy loading in AdapterFactoryProxy should either force the plugin to be loaded, or if this behavior is intentional, there should be a (preferably declarative) way of forcing the plugin to be loaded.
bundles/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
protected IWorkbenchPart getBootstrapPart() {
        IWorkbenchPage page = getSite().getPage();
        if (page != null) {
            bootstrapSelection = page.getSelection();
            return page.getActivePart();
        } 
        return null;
    }
    /* (non-Javadoc)
     * Method declared on IViewPart.
     */
    public void init(IViewSite site) throws PartInitException {
        site.getPage().addSelectionListener(this);
        super.init(site);
    }
    /* (non-Javadoc)
     * Method declared on PageBookView.
     * The property sheet may show properties for any view other than this view.
     */
    protected boolean isImportant(IWorkbenchPart part) {
        return part != this;
    }
    /**
     * The <code>PropertySheet</code> implementation of this <code>IPartListener</code>
     * method first sees if the active part is an <code>IContributedContentsView</code>
     * adapter and if so, asks it for its contributing part.
     */
    public void partActivated(IWorkbenchPart part) {
        IContributedContentsView view = (IContributedContentsView) part
                .getAdapter(IContributedContentsView.class);