[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: accessing / subclassing workbench standard components

The outline view is a PageBookView. It displays contributed pages (it has 
a default page which simply shows the "An outline is not available" 
message). Outline pages can only be contributed by editors. Editors 
contribute outline pages by extending their getAdapter method to return an 
instance of IContentOutlinePage. 
ex.

public Object getAdapter(Class adapter) {
        if (adapter.equals(IContentOutlinePage.class)) {
                        return getContentOutline();
        }
        return super.getAdapter(adapter);
}

Typically the IContentOutlinePage would be your subclass of 
ContentOutlinePage in which you create and populate your "tree view of an 
XML file".

In general, views which determine their contents based on the currently 
active part and/or current selection do so by implementing IPartListener 
and ISelectionListener respectively. 

> How does one access the outline view? If I want to populate the outline
> view with a tree view of an XML file, how do I go about getting access
> to thr outline's tree so I can populate it with a DOM tree?
> 
> In general - how do I access all of the worbench standard components?
> 
> Thanks,
> Judah