| 
| Please help! [message #58501] | Mon, 27 January 2003 20:15  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: jim.azeltine.indus.com 
 I am trying very hard to get a grip on GEF, but this is getting very
 frustrating. I am unable to get some of the examples to work. The first is
 the Shapes example. In the following:
 import com.ibm.etools.gef.examples.shapes.model.Ellipse;
 import com.ibm.etools.gef.examples.shapes.model.Rectangle;
 import com.ibm.etools.gef.examples.shapes.model.RoundedRectangle;
 import com.ibm.etools.gef.palette.*;
 import com.ibm.etools.gef.requests.CreateRequest;
 import com.ibm.etools.gef.tools.CreationTool;
 I do not have the same packages in my Eclipse install of GEF. Instead of
 com.ibm.etools.gef, I have org.eclipse.gef.
 So once I change all the package names, I still have an error:
 The method shown is undefined for type DefaultPaletteCategory:
 category.setChildren(groups);
 I think there is probably more. Is there any possibility of getting a
 version of this that works without modification?
 |  |  |  | 
|  | 
|  | 
|  | 
| 
| Re: Please help! [message #59929 is a reply to message #59275] | Wed, 29 January 2003 16:39  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: jim.azeltine.indus.com 
 You are exactly right. I had started to do what you said, but decided I
 didn't have the time to mess with it. I contacted Eric Bordeau, and he
 pointed me to an old version of gef and draw2d that would work, so I
 installed this in an isolated version of eclipse, and got it working.
 
 Jim
 
 AbdElRazik wrote:
 
 > Hi,
 
 > In ShapePlugin class
 > in createComponentsCategory() method
 > change both
 >  category.setChildren(groups);
 > to be
 >  category.addAll(groups);
 > &
 >  group.setChildren(entries);
 > to be
 >  group.addAll(entries);
 
 > The reason for this is
 > category is an instance of DefaultPaletteCategory &
 > group is an instance of DefaultPaletteGroup
 > both of these classes inherit from DefaultPaletteContainer where addAll
 > seems to replace the setChildren
 
 > Also u will need to make another change at ShapeEditPolicy
 > DeleteRequest seems to be deprected also.
 > So u will need to change the parameter passed to the createDeleteCommand
 > method
 > to be GroupRequest (and of course import
 > org.eclipse.gef.requests.GroupRequest)
 > Notice that this parameter is never used inside the method.
 
 > I wish the previous will help u.
 
 > "Jim Azeltine" <jim.azeltine@indus.com> wrote in message
 > news:b14lk3$vm8$1@rogue.oti.com...
 > > I am trying very hard to get a grip on GEF, but this is getting very
 > > frustrating. I am unable to get some of the examples to work. The first is
 > > the Shapes example. In the following:
 > > import com.ibm.etools.gef.examples.shapes.model.Ellipse;
 > > import com.ibm.etools.gef.examples.shapes.model.Rectangle;
 > > import com.ibm.etools.gef.examples.shapes.model.RoundedRectangle;
 > > import com.ibm.etools.gef.palette.*;
 > > import com.ibm.etools.gef.requests.CreateRequest;
 > > import com.ibm.etools.gef.tools.CreationTool;
 > > I do not have the same packages in my Eclipse install of GEF. Instead of
 > > com.ibm.etools.gef, I have org.eclipse.gef.
 > > So once I change all the package names, I still have an error:
 > > The method shown is undefined for type DefaultPaletteCategory:
 > > category.setChildren(groups);
 > > I think there is probably more. Is there any possibility of getting a
 > > version of this that works without modification?
 > >
 > >
 > >
 > >
 > >
 > >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03690 seconds