Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] ContentOutlinePage - help?

Trying to create a new Outliner for a custom editor.  Here is the relevant
code snippet from createControl in a class that is a subClass of
ContentOutlinePage
================================
      public void createControl(Composite parent)
      {
            parent.setLayout(new FillLayout());
            viewer = new TreeViewer(parent, SWT.MULTI);

            //TreeViewer viewer = getTreeViewer();
            drillDownAdapter = new DrillDownAdapter(viewer);
            viewer.setContentProvider(new ViewContentProvider());
            viewer.setLabelProvider(new ViewLabelProvider());
            viewer.setSorter(new NameSorter());
            viewer.setInput(ResourcesPlugin.getWorkspace());

      }
==========================================

With the code as shown, I get my tree view display in the "right hand" half
of the outline window.  Commenting out the setLayout yields shows nothing.
As does commenting out the creation of the TreeViewer in the next line and
trying to access the "internally created TreeViewer" documented in the
ContentOutlinePage.  Has Eclipse already created a TreeViewer that I should
be using or do I need to create one?  Any help would be appreciated.

Mike McGowan
mike.mcgowan@xxxxxxxxxx




Back to the top