Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GraphicalEditorWithFlyoutPalette
GraphicalEditorWithFlyoutPalette [message #151500] Mon, 20 September 2004 19:36 Go to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

My palette is currently implemented using GraphicalEditorWithPalette,
however I would like to upgrade this to use
GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
extending a different class and implementing the abstract method
getPalettePreferences(), however I've run into difficulties. I get a null
pointer exception in createPaletteViewerProvider() because
getGraphicalViewer() returns null at that point. Should I be doing
something that I'm not?

Thanks.

James
Re: GraphicalEditorWithFlyoutPalette [message #151507 is a reply to message #151500] Mon, 20 September 2004 22:52 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
That's right, the PaletteViewerProvider is created before the graphical
viewer (look at
GraphicalEditorWithFlyoutPalette#createPartControl(Composite )). Why do you
need the graphical viewer for the PaletteViewerProvider?


"James Willans" <james.willans@xactium.com> wrote in message
news:cinbfg$6n0$1@eclipse.org...
> My palette is currently implemented using GraphicalEditorWithPalette,
> however I would like to upgrade this to use
> GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
> extending a different class and implementing the abstract method
> getPalettePreferences(), however I've run into difficulties. I get a null
> pointer exception in createPaletteViewerProvider() because
> getGraphicalViewer() returns null at that point. Should I be doing
> something that I'm not?
>
> Thanks.
>
> James
>
Re: GraphicalEditorWithFlyoutPalette [message #151513 is a reply to message #151500] Tue, 21 September 2004 01:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The architecture is slightly different because the palette must be created
over and over as it changes locations.

"James Willans" <james.willans@xactium.com> wrote in message
news:cinbfg$6n0$1@eclipse.org...
> My palette is currently implemented using GraphicalEditorWithPalette,
> however I would like to upgrade this to use
> GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
> extending a different class and implementing the abstract method
> getPalettePreferences(), however I've run into difficulties. I get a null
> pointer exception in createPaletteViewerProvider() because
> getGraphicalViewer() returns null at that point. Should I be doing
> something that I'm not?
>
> Thanks.
>
> James
>
Re: GraphicalEditorWithFlyoutPalette [message #151534 is a reply to message #151507] Tue, 21 September 2004 08:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Pratik,

I don't require it, but the body of createPaletteViewerProvider() in the
implementation of GraphicalEditorWithFlyoutPalette requires it:

protected PaletteViewerProvider createPaletteViewerProvider() {
return new PaletteViewerProvider(getGraphicalViewer().getEditDomain());
}

?

Thanks.

James

Pratik Shah wrote:

> That's right, the PaletteViewerProvider is created before the graphical
> viewer (look at
> GraphicalEditorWithFlyoutPalette#createPartControl(Composite )). Why do you
> need the graphical viewer for the PaletteViewerProvider?


> "James Willans" <james.willans@xactium.com> wrote in message
> news:cinbfg$6n0$1@eclipse.org...
> > My palette is currently implemented using GraphicalEditorWithPalette,
> > however I would like to upgrade this to use
> > GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
> > extending a different class and implementing the abstract method
> > getPalettePreferences(), however I've run into difficulties. I get a null
> > pointer exception in createPaletteViewerProvider() because
> > getGraphicalViewer() returns null at that point. Should I be doing
> > something that I'm not?
> >
> > Thanks.
> >
> > James
> >
Re: GraphicalEditorWithFlyoutPalette [message #151568 is a reply to message #151534] Tue, 21 September 2004 14:45 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
That was fixed a while back to: return new
PaletteViewerProvider(getEditDomain());
You can override the method and make this change yourself, or you can move
to the latest GEF integration build.

"James Willans" <james.willans@xactium.com> wrote in message
news:ciooml$94n$1@eclipse.org...
> Pratik,
>
> I don't require it, but the body of createPaletteViewerProvider() in the
> implementation of GraphicalEditorWithFlyoutPalette requires it:
>
> protected PaletteViewerProvider createPaletteViewerProvider() {
> return new PaletteViewerProvider(getGraphicalViewer().getEditDomain());
> }
>
> ?
>
> Thanks.
>
> James
>
> Pratik Shah wrote:
>
> > That's right, the PaletteViewerProvider is created before the graphical
> > viewer (look at
> > GraphicalEditorWithFlyoutPalette#createPartControl(Composite )). Why do
you
> > need the graphical viewer for the PaletteViewerProvider?
>
>
> > "James Willans" <james.willans@xactium.com> wrote in message
> > news:cinbfg$6n0$1@eclipse.org...
> > > My palette is currently implemented using GraphicalEditorWithPalette,
> > > however I would like to upgrade this to use
> > > GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
> > > extending a different class and implementing the abstract method
> > > getPalettePreferences(), however I've run into difficulties. I get a
null
> > > pointer exception in createPaletteViewerProvider() because
> > > getGraphicalViewer() returns null at that point. Should I be doing
> > > something that I'm not?
> > >
> > > Thanks.
> > >
> > > James
> > >
>
>
Re: GraphicalEditorWithFlyoutPalette [message #151594 is a reply to message #151568] Tue, 21 September 2004 16:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Pratik,

Thanks I have now got it working. Just a quick question, I would like to
get rid of the palette's title "Palette" and just have the two lines
shown. However when I change the externalised string to "" it looks odd
because a space is left between the two halfs of the line. Is there any
way of having unbroken lines when the string is ""?

James

Pratik Shah wrote:

> That was fixed a while back to: return new
> PaletteViewerProvider(getEditDomain());
> You can override the method and make this change yourself, or you can move
> to the latest GEF integration build.

> "James Willans" <james.willans@xactium.com> wrote in message
> news:ciooml$94n$1@eclipse.org...
> > Pratik,
> >
> > I don't require it, but the body of createPaletteViewerProvider() in the
> > implementation of GraphicalEditorWithFlyoutPalette requires it:
> >
> > protected PaletteViewerProvider createPaletteViewerProvider() {
> > return new PaletteViewerProvider(getGraphicalViewer().getEditDomain());
> > }
> >
> > ?
> >
> > Thanks.
> >
> > James
> >
> > Pratik Shah wrote:
> >
> > > That's right, the PaletteViewerProvider is created before the graphical
> > > viewer (look at
> > > GraphicalEditorWithFlyoutPalette#createPartControl(Composite )). Why do
> you
> > > need the graphical viewer for the PaletteViewerProvider?
> >
> >
> > > "James Willans" <james.willans@xactium.com> wrote in message
> > > news:cinbfg$6n0$1@eclipse.org...
> > > > My palette is currently implemented using GraphicalEditorWithPalette,
> > > > however I would like to upgrade this to use
> > > > GraphicalEditorWithFlyoutPalette. I thought this would be a matter of
> > > > extending a different class and implementing the abstract method
> > > > getPalettePreferences(), however I've run into difficulties. I get a
> null
> > > > pointer exception in createPaletteViewerProvider() because
> > > > getGraphicalViewer() returns null at that point. Should I be doing
> > > > something that I'm not?
> > > >
> > > > Thanks.
> > > >
> > > > James
> > > >
> >
> >
Re: GraphicalEditorWithFlyoutPalette [message #151602 is a reply to message #151594] Tue, 21 September 2004 16:22 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Not unless you plan to copy the flyout-related classes. I'd recommend
against it, of course. We want all different GEF palettes to look the same
for the end-user.


"James Willans" <james.willans@xactium.com> wrote in message
news:cipj8d$33i$1@eclipse.org...
> Pratik,
>
> Thanks I have now got it working. Just a quick question, I would like to
> get rid of the palette's title "Palette" and just have the two lines
> shown. However when I change the externalised string to "" it looks odd
> because a space is left between the two halfs of the line. Is there any
> way of having unbroken lines when the string is ""?
>
> James
>
> Pratik Shah wrote:
>
> > That was fixed a while back to: return new
> > PaletteViewerProvider(getEditDomain());
> > You can override the method and make this change yourself, or you can
move
> > to the latest GEF integration build.
>
> > "James Willans" <james.willans@xactium.com> wrote in message
> > news:ciooml$94n$1@eclipse.org...
> > > Pratik,
> > >
> > > I don't require it, but the body of createPaletteViewerProvider() in
the
> > > implementation of GraphicalEditorWithFlyoutPalette requires it:
> > >
> > > protected PaletteViewerProvider createPaletteViewerProvider() {
> > > return new
PaletteViewerProvider(getGraphicalViewer().getEditDomain());
> > > }
> > >
> > > ?
> > >
> > > Thanks.
> > >
> > > James
> > >
> > > Pratik Shah wrote:
> > >
> > > > That's right, the PaletteViewerProvider is created before the
graphical
> > > > viewer (look at
> > > > GraphicalEditorWithFlyoutPalette#createPartControl(Composite )). Why
do
> > you
> > > > need the graphical viewer for the PaletteViewerProvider?
> > >
> > >
> > > > "James Willans" <james.willans@xactium.com> wrote in message
> > > > news:cinbfg$6n0$1@eclipse.org...
> > > > > My palette is currently implemented using
GraphicalEditorWithPalette,
> > > > > however I would like to upgrade this to use
> > > > > GraphicalEditorWithFlyoutPalette. I thought this would be a
matter of
> > > > > extending a different class and implementing the abstract method
> > > > > getPalettePreferences(), however I've run into difficulties. I
get a
> > null
> > > > > pointer exception in createPaletteViewerProvider() because
> > > > > getGraphicalViewer() returns null at that point. Should I be
doing
> > > > > something that I'm not?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > James
> > > > >
> > >
> > >
>
>
Re: GraphicalEditorWithFlyoutPalette [message #151626 is a reply to message #151602] Tue, 21 September 2004 19:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

So James, open a bugzilla requesting that ALL palettes not display "Palette"
title when expanded. We'll check with our UI experts for a ruling on this.

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:cipk82$5eq$1@eclipse.org...
> Not unless you plan to copy the flyout-related classes. I'd recommend
> against it, of course. We want all different GEF palettes to look the
same
> for the end-user.
>
>
Re: GraphicalEditorWithFlyoutPalette [message #151640 is a reply to message #151626] Tue, 21 September 2004 22:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Will do. Just for clarification - You can change the word "Palette" since
the string is externalised.

James

Randy Hudson wrote:

> So James, open a bugzilla requesting that ALL palettes not display "Palette"
> title when expanded. We'll check with our UI experts for a ruling on this.

> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:cipk82$5eq$1@eclipse.org...
> > Not unless you plan to copy the flyout-related classes. I'd recommend
> > against it, of course. We want all different GEF palettes to look the
> same
> > for the end-user.
> >
> >
Re: GraphicalEditorWithFlyoutPalette [message #151647 is a reply to message #151640] Tue, 21 September 2004 22:52 Go to previous message
Eclipse UserFriend
Originally posted by: james.willans.xactium.com

Bug: 74493

James Willans wrote:

> Will do. Just for clarification - You can change the word "Palette" since
> the string is externalised.

> James

> Randy Hudson wrote:

> > So James, open a bugzilla requesting that ALL palettes not display
"Palette"
> > title when expanded. We'll check with our UI experts for a ruling on this.

> > "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> > news:cipk82$5eq$1@eclipse.org...
> > > Not unless you plan to copy the flyout-related classes. I'd recommend
> > > against it, of course. We want all different GEF palettes to look the
> > same
> > > for the end-user.
> > >
> > >
Previous Topic:How to run GEF examples
Next Topic:how do i use org.eclipse.gef.ui.parts.TreeViewer
Goto Forum:
  


Current Time: Wed Sep 18 21:56:54 GMT 2024

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

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

Back to the top