Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Using the PaletteView with multiple editor instances
Using the PaletteView with multiple editor instances [message #214709] Thu, 20 April 2006 18:33
Eclipse UserFriend
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
Previous Topic:Re: How to Undo/Redo model changes?
Next Topic:Zooming problem
Goto Forum:
  


Current Time: Sat Apr 20 00:52:50 GMT 2024

Powered by FUDForum. Page generated in 0.02520 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top