VE dinner example [message #92385] |
Mon, 30 May 2005 11:04  |
Eclipse User |
|
|
|
Originally posted by: peter_lundgren.swipnet.se
Hello,
I try to use the 'dinner' visual editor example that can be found in the
ve package. I copied the source into a new plug-in and hooked the dinner
editor into the editor extension point. If I try to open a file called
test.dinner, then I always get the error message below. Is this my problem
or do I have to use the 'dinner' editor differently? Thanks for your help.
Peter
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
org.eclipse.ve.examples.cdm.dept.dinner.ui.DinnerGraphicalEd itorPart.fillPalette(DinnerGraphicalEditorPart.java:65)
at
org.eclipse.ve.examples.cdm.dept.dinner.ui.DinnerGraphicalEd itorPart.getPaletteRoot(DinnerGraphicalEditorPart.java:52)
at
org.eclipse.ve.internal.cde.emf.EMFGraphicalEditorPart.setPa letteRoot(EMFGraphicalEditorPart.java:819)
at
org.eclipse.ve.internal.cde.emf.EMFGraphicalEditorPart.primC reatePaletteControl(EMFGraphicalEditorPart.java:459)
at
org.eclipse.ve.internal.cde.emf.EMFGraphicalEditorPart.creat ePaletteControl(EMFGraphicalEditorPart.java:445)
at
org.eclipse.ve.internal.cde.emf.EMFGraphicalEditorPart.creat ePartControl(EMFGraphicalEditorPart.java:472)
at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at org.eclipse.ui.internal.PartPane.createChildControl(PartPane .java:133)
at org.eclipse.ui.internal.PartPane.createControl(PartPane.java :205)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:939)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:921)
at org.eclipse.ui.internal.EditorStack.setSelection(EditorStack .java:196)
at
org.eclipse.ui.internal.EditorStack.setVisibleEditor(EditorS tack.java:200)
at
org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(Ed itorAreaHelper.java:338)
at
org.eclipse.ui.internal.EditorAreaHelper.openEditor(EditorAr eaHelper.java:268)
|
|
|
|
|
|
|
Re: VE dinner example [message #92713 is a reply to message #92519] |
Tue, 31 May 2005 19:46  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We don't really do much with the Dinner example. It's kind of lame so we
didn't test recently with the latest EMF 2.0.x. A change had been made
that caused the error.
For you, change the DinnerGraphicalEditpart.fillPallete method to:
private void fillPalette(PaletteRoot root) {
fillControlGroup(root);
PaletteGroup dinnerGroup = new PaletteGroup("Dinner Group");
root.add(dinnerGroup);
// Create the prototype of a entree (which is a DiagramFigure, and
type is set to DinnerConstants.ENTREE_CHILD_TYPE).
DiagramFigure proto = CDMFactory.eINSTANCE.createDiagramFigure();
proto.setType(DinnerConstants.ENTREE_CHILD_TYPE);
CreationToolEntry tool =
new CreationToolEntry("Entree", "Create a new entree", new
EMFPrototypeFactory(proto), null, null);
dinnerGroup.add(tool);
// Create the prototype of a employee (which is a DiagramFigure, and
type is set to DinnerConstants.EMPLOYEE_CHILD_TYPE).
proto = CDMFactory.eINSTANCE.createDiagramFigure();
proto.setType(DinnerConstants.EMPLOYEE_CHILD_TYPE);
tool =
new CreationToolEntry("Employee", "Add an employee", new
EMFPrototypeFactory(proto), null, null);
dinnerGroup.add(tool);
}
--
Thanks,
Rich Kulp
|
|
|
|
Re: VE dinner example [message #607853 is a reply to message #92477] |
Tue, 31 May 2005 10:13  |
Eclipse User |
|
|
|
Originally posted by: peter_lundgren.swipnet.se
Hi Rich,
I'm using GEF 3.0.1.
-- Peter
Rich Kulp wrote:
> What version of GEF are you using? This should not of occured.
|
|
|
Re: VE dinner example [message #607854 is a reply to message #92491] |
Tue, 31 May 2005 10:56  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I should of asked for more info the first time. :-) Also, what
Eclipse,EMF, and VE is it.
Peter Lundgren wrote:
> Hi Rich, I'm using GEF 3.0.1.
> -- Peter
>
> Rich Kulp wrote:
>
>> What version of GEF are you using? This should not of occured.
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Re: VE dinner example [message #607855 is a reply to message #92505] |
Tue, 31 May 2005 11:20  |
Eclipse User |
|
|
|
Originally posted by: peter_lundgren.swipnet.se
I use Eclipse 3.0.2, EMF 2.0.1 and VE 1.0.2.1 (buildID: 200503171200).
Hope this helps, Peter
Rich Kulp wrote:
> I should of asked for more info the first time. :-) Also, what
> Eclipse,EMF, and VE is it.
> Peter Lundgren wrote:
>> Hi Rich, I'm using GEF 3.0.1.
>> -- Peter
>>
>> Rich Kulp wrote:
>>
>>> What version of GEF are you using? This should not of occured.
>>
>>
>>
|
|
|
Re: VE dinner example [message #607868 is a reply to message #92519] |
Tue, 31 May 2005 19:46  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We don't really do much with the Dinner example. It's kind of lame so we
didn't test recently with the latest EMF 2.0.x. A change had been made
that caused the error.
For you, change the DinnerGraphicalEditpart.fillPallete method to:
private void fillPalette(PaletteRoot root) {
fillControlGroup(root);
PaletteGroup dinnerGroup = new PaletteGroup("Dinner Group");
root.add(dinnerGroup);
// Create the prototype of a entree (which is a DiagramFigure, and
type is set to DinnerConstants.ENTREE_CHILD_TYPE).
DiagramFigure proto = CDMFactory.eINSTANCE.createDiagramFigure();
proto.setType(DinnerConstants.ENTREE_CHILD_TYPE);
CreationToolEntry tool =
new CreationToolEntry("Entree", "Create a new entree", new
EMFPrototypeFactory(proto), null, null);
dinnerGroup.add(tool);
// Create the prototype of a employee (which is a DiagramFigure, and
type is set to DinnerConstants.EMPLOYEE_CHILD_TYPE).
proto = CDMFactory.eINSTANCE.createDiagramFigure();
proto.setType(DinnerConstants.EMPLOYEE_CHILD_TYPE);
tool =
new CreationToolEntry("Employee", "Add an employee", new
EMFPrototypeFactory(proto), null, null);
dinnerGroup.add(tool);
}
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.09843 seconds