Skip to main content



      Home
Home » Eclipse Projects » GEF » Palette View Problem in a MultiPageEdit
Palette View Problem in a MultiPageEdit [message #169624] Thu, 24 February 2005 21:26 Go to next message
Eclipse UserFriend
Hi,

I have a MultiPageEditorPart as my editor. A GEF editor is just one of the
page of the multipage editor. When i am in the GEF canvas, and then go to
Show View -> Basic -> Palette View, it displays an empty palette View. Note
that i can display the flyout palette embedded within the editor correctly.

I traced the code and then i found that this condition is return false in
the class PaletteView:

/**
* @see PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
*/
protected boolean isImportant(IWorkbenchPart part) {
return part.getSite().getPage().findViewReference(ID) != null
}

The part passed in as the argument to the isImportant() method, happens to
be the MultiPageEditorPart and not the GEF Editor. So, the
findViewReference() is returning back as null on the MultiPageEditorPart.
When i try the logic example, the part is the GEF editor, and so
findViewReference(ID) works correctly.

Is this a potential bug or am i making a design mistake ?

thanks,
-Ravi
Re: Palette View Problem in a MultiPageEdit [message #169844 is a reply to message #169624] Sun, 27 February 2005 17:27 Go to previous message
Eclipse UserFriend
You might be having an older version of the code. Are you running 3.1?

I think you might be barking up the wrong tree. The code you pointed out
determines whether or not the PaletteView is open in the page where the
given Editor is. Look at bugs# 69098 and 70510. While there is a problem
there, it's not what you describe.

I think the real cause of your problem is that when your MultiPageEditorPart
is asked for a palette page, it is not forwarding that request to the
graphical editor. Override getAdapter() in your MultiPageEditorPart and
delegate PalettePage.class requests to the graphical editor.

If you have multiple GEF editors in your MultiPageEditorPart, each with its
own palette, you're in line for some more grief. Look for the platform bug
entitled something like "combine and compose nested workbench parts."

"Ravi" <rshankark@hotmail.com> wrote in message
news:cvm2g3$d7l$1@www.eclipse.org...
> Hi,
>
> I have a MultiPageEditorPart as my editor. A GEF editor is just one of the
> page of the multipage editor. When i am in the GEF canvas, and then go to
> Show View -> Basic -> Palette View, it displays an empty palette View.
Note
> that i can display the flyout palette embedded within the editor
correctly.
>
> I traced the code and then i found that this condition is return false in
> the class PaletteView:
>
> /**
> * @see PageBookView#isImportant(org.eclipse.ui.IWorkbenchPart)
> */
> protected boolean isImportant(IWorkbenchPart part) {
> return part.getSite().getPage().findViewReference(ID) != null
> }
>
> The part passed in as the argument to the isImportant() method, happens to
> be the MultiPageEditorPart and not the GEF Editor. So, the
> findViewReference() is returning back as null on the MultiPageEditorPart.
> When i try the logic example, the part is the GEF editor, and so
> findViewReference(ID) works correctly.
>
> Is this a potential bug or am i making a design mistake ?
>
> thanks,
> -Ravi
>
>
>
Previous Topic:Diagram in GEF editor
Next Topic:Using generated Edit code for the property sheet of a custom GEF application
Goto Forum:
  


Current Time: Sat Jun 21 20:38:30 EDT 2025

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

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

Back to the top