Using the PaletteView with multiple editor instances [message #214709] |
Thu, 20 April 2006 18:33 |
Eclipse User |
|
|
|
Originally posted by: ben.vitale.precipia.com
Hi all,
I have a perspective that contains my GEF editor, and I want it to also
contain a PaletteView. Currently my palette is located on the left side
of my editor canvas (I presume this is the default).
So in my perspective createInitialLayout()..
ScenarioBuilderPaletteView sbPaletteView = new ScenarioBuilderPaletteView();
layout.addView(sbPaletteView.ID, IPageLayout.RIGHT, 1.0f,
layout.getEditorArea());
For ScenarioBuilderPaletteView extends PaletteView,
public void createPartControl(Composite parent)
{
PaletteViewer viewer = new PaletteViewer();
viewer.createControl(parent);
// Presumably, I would assign the viewer to an EditDomain here.
}
What I don't understand is how to hook this into my editor. If I were
to open multiple instances of my editor, then I will have multiple
EditDomains. Which one do I assign the paletteViewer to? Which one do
I assign the PaletteRoot to? Do I need to maintain a reference to the
"active" editor instance? What is the best way to manage this?
Thanks for any help.
Regards,
Ben
|
|
|
Powered by
FUDForum. Page generated in 0.02995 seconds