Rather than have two content pages you could have one page that can show both of your outlines. To do this you cannot extend the normal ContentOutlinePage
, instead you need a class like this:
public class MyContentOutlinePage extends Page
implements IContentOutlinePage, ISelectionChangedListener
The amount of code in the standard ContentOutlinePage
is quite small so it is not much extra work to implement a page which meets your needs.
Update:
You would have one top level control containing the SashForm and TreeViewer and always return the top control in getControl()
. You would hide either the SashForm or TreeViewer depending on which you want to show.
The top level control could be something like PageBook
or a Composite
using StackLayout
.