Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Shared palette in MultiPageEditor
Shared palette in MultiPageEditor [message #174915] Fri, 01 April 2005 15:09 Go to next message
No real name is currently offline No real nameFriend
Messages: 29
Registered: July 2009
Junior Member
Dear all,

i'm trying to create a MultiPageEditor with a Flyout Palette shared
between the different pages.

I would like to have one single editDomain for all the various editor
pages (one single command stack) and a palette that change contents based
on the current selected page. There would be one PaletteRoot with children
swapped in/out on page activation.

I'm having some trouble in setting up the palette viewer correctly (only
the last added palette page works), but more important i don't know if i'm
taking the right approach.

Are there some guidelines to follow? Is it there a (simple) example to
study?


Thanks in advance
Re: Shared palette in MultiPageEditor [message #174964 is a reply to message #174915] Fri, 01 April 2005 17:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are you trying to share the palette viewer instance across the pages? you
could do this. The FlyoutPaletteComposite is designed to host any Control
as the "diagram", so your tabfolder could be the diagram center.

"sf76" <sf76@hotmail.com> wrote in message
news:a8d827b9c287f1936404036531769e47$1@www.eclipse.org...
> Dear all,
>
> i'm trying to create a MultiPageEditor with a Flyout Palette shared
> between the different pages.
> I would like to have one single editDomain for all the various editor
> pages (one single command stack) and a palette that change contents based
> on the current selected page. There would be one PaletteRoot with children
> swapped in/out on page activation.
>
> I'm having some trouble in setting up the palette viewer correctly (only
> the last added palette page works), but more important i don't know if i'm
> taking the right approach.
>
> Are there some guidelines to follow? Is it there a (simple) example to
> study?
>
>
> Thanks in advance
>
Re: Shared palette in MultiPageEditor [message #175303 is a reply to message #174964] Mon, 04 April 2005 13:46 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 29
Registered: July 2009
Junior Member
Yes, i would like to come up with a single palette viewer shared between
the various pages of the editor. The elements of the palette would be
inserted/removed when a page is changed on the editor gui.

At the moment inside the editor page code i've got the following logic:
public void createPartControl(Composite parent) {
//the single shared pvp created by the owner editor
PaletteViewerProvider pvp = getPaletteViewerProvider();

splitter = new FlyoutPaletteComposite(parent, SWT.NONE,
getSite().getPage(), pvp, getPalettePreferences());

Composite composite = new Composite(splitter, SWT.NONE);

splitter.setGraphicalControl(composite);
...
}
but this come out with different palette viewer for the various page...
Should i create a shared FlyoutPaletteComposite instead?

Regards
Re: Shared palette in MultiPageEditor [message #175333 is a reply to message #175303] Mon, 04 April 2005 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> but this come out with different palette viewer for the various page...
> Should i create a shared FlyoutPaletteComposite instead?

The Flyout should be created by the MPE, not each page.
Re: Shared palette in MultiPageEditor [message #175608 is a reply to message #175333] Tue, 05 April 2005 15:14 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 29
Registered: July 2009
Junior Member
OK.

The point is that the flyout is asking for a parent composite in its
constructor.
How could i select a right one taking into account the fact that the same
viewer should then be reused inside the different pages? (every page has
its own parent composite under which new page's elements are attached,
given in the createPageControl method)

Thanks in advance
Re: Shared palette in MultiPageEditor [message #175646 is a reply to message #175608] Tue, 05 April 2005 17:40 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
The palette's parent composite should be the multipage editor's control, not
the pages' controls.

"sf76" <sf76@hotmail.com> wrote in message
news:d289471d69b24f9b0567dc6ed9af09b8$1@www.eclipse.org...
> OK.
>
> The point is that the flyout is asking for a parent composite in its
> constructor.
> How could i select a right one taking into account the fact that the same
> viewer should then be reused inside the different pages? (every page has
> its own parent composite under which new page's elements are attached,
> given in the createPageControl method)
>
> Thanks in advance
>
>
Re: Shared palette in MultiPageEditor [message #176051 is a reply to message #175646] Thu, 07 April 2005 17:01 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Actually, it can just be the Composite that the workbench passes to the
Editor.

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d2uio9$ni1$1@news.eclipse.org...
> The palette's parent composite should be the multipage editor's control,
> not
> the pages' controls.
>
> "sf76" <sf76@hotmail.com> wrote in message
> news:d289471d69b24f9b0567dc6ed9af09b8$1@www.eclipse.org...
>> OK.
>>
>> The point is that the flyout is asking for a parent composite in its
>> constructor.
>> How could i select a right one taking into account the fact that the same
>> viewer should then be reused inside the different pages? (every page has
>> its own parent composite under which new page's elements are attached,
>> given in the createPageControl method)
>>
>> Thanks in advance
>>
>>
>
>
Previous Topic:Expand/Collapse Node Refresh Issue
Next Topic:build I20050331 GTK2 problem
Goto Forum:
  


Current Time: Wed Feb 08 08:35:18 GMT 2023

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

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

Back to the top