| Redbook example error - Unable to create part: [message #149511] | 
Tue, 31 August 2004 14:52   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: jsk_lam.hotmail.com 
 
I have Eclipse 3.0 running "org.eclipse.draw2d_3.0.1" and 
"org.eclipse.gef_3.0.1".  I also ported the redbook Network example (see 
chapter 5, p. 167) to run on this new build.  However, I got the following 
errors when running the Network example: 
 
Error: "Unable to create part:" 
 
The same example runs greate on Eclipse 3.0 with 
"org.eclipse.draw2d_3.0.0" and "org.eclipse.gef_3.0.0" 
 
Does anyone has the clue? 
 
Thanks 
SL
 |  
 |  
  | 
 | 
 | 
 | 
 | 
| Re: Redbook example error - Unable to create part: [message #149630 is a reply to message #149523] | 
Wed, 01 September 2004 13:05   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
java.lang.IllegalArgumentException: This container can not contain this type 
of child: $Palette Tool 
 at  org.eclipse.gef.palette.PaletteContainer.add(PaletteContaine r.java:77) 
 at  org.eclipse.gef.palette.PaletteContainer.add(PaletteContaine r.java:67) 
 at 
com.ibm.itso.sal330r.network.editor.NetworkPaletteRoot.<init >(NetworkPalette 
Root.java:65) 
 at 
 com.ibm.itso.sal330r.network.editor.NetworkEditor.getPalette Root(NetworkEdit 
or.java:662) 
 
 
I am not familiar with the network example, but it seems that an attempt is 
being made to add a tool directly to the palette root (in NetworkPaletteRoot 
constructor).  The tool needs to be put inside a group or drawer.  This has 
always been the recommended way of putting tools in the palette.  Now, 
apparently, there are checks in place to prevent incorrect behaviour. 
 
So, to fix this problem, create a group or drawer and put the tools inside 
that.  Look at LogicPlugin#createPalette() if you are not sure how to do 
that. 
 
BTW, these checks were added before the 3.0 release.  You had a 3.0 
integration build that was not the final 3.0 release. 
 
 
"SL" <jsk_lam@hotmail.com> wrote in message news:ch2sja$2gm$1@eclipse.org... 
> Hi Pratik, 
> 
> I have sent you 2 error log files, one is from the development workspace, 
> and the other is from the runtime workspace environment. 
> 
> Thanks 
> Sang 
> 
> 
> Pratik Shah wrote: 
> 
> > What does the error log have to say about this?  (Windows -> Show 
View -> 
> > Other -> PDE Runtime -> Error Log) 
> 
> > "SL" <jsk_lam@hotmail.com> wrote in message 
news:ch2hdq$h2q$1@eclipse.org... 
> > > I have Eclipse 3.0 running "org.eclipse.draw2d_3.0.1" and 
> > > "org.eclipse.gef_3.0.1".  I also ported the redbook Network example 
(see 
> > > chapter 5, p. 167) to run on this new build.  However, I got the 
following 
> > > errors when running the Network example: 
> > > 
> > > Error: "Unable to create part:" 
> > > 
> > > The same example runs greate on Eclipse 3.0 with 
> > > "org.eclipse.draw2d_3.0.0" and "org.eclipse.gef_3.0.0" 
> > > 
> > > Does anyone has the clue? 
> > > 
> > > Thanks 
> > > SL 
> > > 
> > > 
> 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.04212 seconds