{
        ViewerPane viewerPane =
          new ViewerPane(getSite().getPage(), Ecore2XMLEditor.this)
          {
            @Override
            public Viewer createViewer(Composite composite)
            {
              return new TreeViewer(composite);
            }
            @Override
            public void requestActivation()
            {
              super.requestActivation();
              setCurrentViewerPane(this);
            }
          };
        viewerPane.createControl(getContainer());
        treeViewer = (TreeViewer)viewerPane.getViewer();
        treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

        new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);

        createContextMenuFor(treeViewer);
        int pageIndex = addPage(viewerPane.getControl());
        setPageText(pageIndex, getString("_UI_TreePage_label")); //$NON-NLS-1$
      }