Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Extending VE Palette: EMF problem
Extending VE Palette: EMF problem [message #134752] Fri, 12 January 2007 15:24 Go to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hi,

I am new at using and extending the Visual Editor. I am extending the
palette in the Visual Editor adding my own Custom Widget to it. I am able
to select my Custom Widget class from the "Select Bean" option on the
Palette and it's working fine. But now I am trying to add another
category on the palette and add the Custom Widget entry under it. I am
following the steps provided in the tutorial at:
http://www.eclipse.org/articles/Article-VE-Custom-Widget/cus tomwidget.html

When I perform an Eclipse Application Launch and create a Visual class and
open it using the Visual Editor, the new Category that I added is not
visible on thr palette. I tried checking the ".log" file available in the
runtime-workspace/.metadata and I found the following Exception stack
logged in there:


!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ve.java.core".
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1$Diagno sticWrappedException:
org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:type"
associated with an element type "categoryLabel" is not bound.
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:307)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:268)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)


Can anyone who has experience of such problem or knows where things might
be going wrong will help me to solve it? I am using the sample ".xmi"
file available with the example in the same tutorial and have done
necessary modifications to it. I don't have enough knowledge about
writing ".xmi" files so I am kind of stuck with this problem.

Any sort of help on the problem is appreciated.

Thanks & Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #134793 is a reply to message #134752] Fri, 12 January 2007 20:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

This means your palette xmi is invalid. Attach the palette xmi file and
we can take a look.

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #134831 is a reply to message #134793] Sat, 13 January 2007 07:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey,

Please have a look at the .xmi file below:

<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
<palette:CategoryCmp>
<categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
<cmpGroups xsi:type="palette:GroupCmp">
<cmpEntries xsi:tye="palette:AnnotatedCreationEntry" xmi:id="entry2"
icon16Name=" platform:/plugin/org.eclipse.ve.example.customWidget/icons/c ustom.gif ">
<objectCreationEntry xsi:type="palette:EMFCreationToolEntry"

creationClassURI=" java:/org.eclipse.ve.example.customwidget.prompter#MyCustomP rompter "/>
<entryLabel xsi:type="utility:ConstantString" string="Prompter"/>
<values xmi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="customPrompter"/>
</cmpEntries>
</cmpGroups>
</palette:CategoryCmp>
</xmi:XMI>


The file is almost same as the one provided in the Visual Editor article
on Eclipse site. I have just made necessary modifications for the name
change.
I am working with Eclipse SDK 3.2 and Visual Editor 1.2.

Please let me know where I might be doing wrong in the file.

Thanks & Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #134875 is a reply to message #134831] Mon, 15 January 2007 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

First please try migrating to the new palette format. This version (the
article is unfortunately too old and doesn't contain the new version) is
deprecated.

See:

http://www.eclipse.org/vep/WebContent/docs/migration/migrati on.html

There are instructions on how to migrate.

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #134901 is a reply to message #134875] Tue, 16 January 2007 07:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey!

Thanks for letting me know that I was using the older version. I read
the instructions for migrating to the current version at the link you
pointed at. As instructed there I downloaded the migration utility and
ran for my palette xmi file [ Same as I attached in the earlier post ].
When the migration utility is run for the file I get following exception
at the console:


Exception in thread "main" java.lang.IllegalArgumentException: The class
'Entry' is not a valid classifier
at
org.eclipse.ve.internal.cde.palette.impl.PaletteFactoryImpl. create(PaletteFactoryImpl.java:87)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XM LHelperImpl.java:797)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XM LHelperImpl.java:832)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:1933)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFe atureType(XMLHandler.java:1907)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHa ndler.java:1783)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1587)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:881)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:82)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:860)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:627)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:878)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFra gmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1094)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:900)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
at migrate.MigratePalette11.main(MigratePalette11.java:79)


Can you please help me out with this? Let me know where I am doing wrong.

Thanks & Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #134913 is a reply to message #134901] Tue, 16 January 2007 15:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Did you use the target versions as shown:

Eclipse SDK 3.1, GEF 3.1, EMF 2.1, and VE 1.1

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #134926 is a reply to message #134913] Tue, 16 January 2007 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey,

Thanks for pointing this out. I should have mentioend this earlier. The
target versions that I am using are as follows:

Eclipse SDK 3.2,
GEF 3.2,
EMF 2.2,
Visual Editor [ VE ] 1.2.

Please help me, providing more information regarding migration of the xmi
file to the latest Eclipse versions so that I can successfully extend the
Visual Editor's palette.

Thanks & Regards,
Ruth


Rich Kulp wrote:

> Did you use the target versions as shown:

> Eclipse SDK 3.1, GEF 3.1, EMF 2.1, and VE 1.1
Re: Extending VE Palette: EMF problem [message #134939 is a reply to message #134926] Tue, 16 January 2007 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hi,

I got it working finally!!! It was my fault really that I was using wrong
Eclipse SDKs versions. The version mentioned in the migration tutorial
should only be used. The migration tool doesn't work for the higher
versions. Using the appropriate versions I successfully migrated the xmi
file to be latest version compatible.

I am working on it further right now.

Thanks for the support!
Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #138031 is a reply to message #134752] Thu, 14 June 2007 07:20 Go to previous message
Eclipse UserFriend
Originally posted by: vaibhava.choudhary.gmail.com

Hi Ruth,

can you help me out?
My question is , Once we add composite component to VE pallatte
and use this component in new visual class, i am not able to change the Label text or Button text once we click on the componet a dialog box gets open where we can enetr the text of the component , Can you guide me on this .


Thanking you
Vaibhav.
vaibhava.choudhary@gmail.com
Re: Extending VE Palette: EMF problem [message #614987 is a reply to message #134752] Fri, 12 January 2007 20:50 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

This means your palette xmi is invalid. Attach the palette xmi file and
we can take a look.

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #614990 is a reply to message #134793] Sat, 13 January 2007 07:35 Go to previous message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey,

Please have a look at the .xmi file below:

<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:palette="http:///org/eclipse/ve/internal/cde/palette.ecore"
xmlns:utility="http:///org/eclipse/ve/internal/cde/utility.ecore">
<palette:CategoryCmp>
<categoryLabel xsi:type="utility:ConstantString" string="Custom"/>
<cmpGroups xsi:type="palette:GroupCmp">
<cmpEntries xsi:tye="palette:AnnotatedCreationEntry" xmi:id="entry2"
icon16Name=" platform:/plugin/org.eclipse.ve.example.customWidget/icons/c ustom.gif ">
<objectCreationEntry xsi:type="palette:EMFCreationToolEntry"

creationClassURI=" java:/org.eclipse.ve.example.customwidget.prompter#MyCustomP rompter "/>
<entryLabel xsi:type="utility:ConstantString" string="Prompter"/>
<values xmi:type="ecore:EStringToStringMapEntry"
key="org.eclipse.ve.internal.cde.core.nameincomposition"
value="customPrompter"/>
</cmpEntries>
</cmpGroups>
</palette:CategoryCmp>
</xmi:XMI>


The file is almost same as the one provided in the Visual Editor article
on Eclipse site. I have just made necessary modifications for the name
change.
I am working with Eclipse SDK 3.2 and Visual Editor 1.2.

Please let me know where I might be doing wrong in the file.

Thanks & Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #614993 is a reply to message #134831] Mon, 15 January 2007 14:42 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

First please try migrating to the new palette format. This version (the
article is unfortunately too old and doesn't contain the new version) is
deprecated.

See:

http://www.eclipse.org/vep/WebContent/docs/migration/migrati on.html

There are instructions on how to migrate.

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #614995 is a reply to message #134875] Tue, 16 January 2007 07:20 Go to previous message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey!

Thanks for letting me know that I was using the older version. I read
the instructions for migrating to the current version at the link you
pointed at. As instructed there I downloaded the migration utility and
ran for my palette xmi file [ Same as I attached in the earlier post ].
When the migration utility is run for the file I get following exception
at the console:


Exception in thread "main" java.lang.IllegalArgumentException: The class
'Entry' is not a valid classifier
at
org.eclipse.ve.internal.cde.palette.impl.PaletteFactoryImpl. create(PaletteFactoryImpl.java:87)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XM LHelperImpl.java:797)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XM LHelperImpl.java:832)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:1933)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFe atureType(XMLHandler.java:1907)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHa ndler.java:1783)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1587)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:881)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:82)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:860)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:627)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:878)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFra gmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1094)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:900)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
at migrate.MigratePalette11.main(MigratePalette11.java:79)


Can you please help me out with this? Let me know where I am doing wrong.

Thanks & Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #614996 is a reply to message #134901] Tue, 16 January 2007 15:22 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Did you use the target versions as shown:

Eclipse SDK 3.1, GEF 3.1, EMF 2.1, and VE 1.1

--
Thanks,
Rich Kulp
Re: Extending VE Palette: EMF problem [message #614997 is a reply to message #134913] Tue, 16 January 2007 15:35 Go to previous message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hey,

Thanks for pointing this out. I should have mentioend this earlier. The
target versions that I am using are as follows:

Eclipse SDK 3.2,
GEF 3.2,
EMF 2.2,
Visual Editor [ VE ] 1.2.

Please help me, providing more information regarding migration of the xmi
file to the latest Eclipse versions so that I can successfully extend the
Visual Editor's palette.

Thanks & Regards,
Ruth


Rich Kulp wrote:

> Did you use the target versions as shown:

> Eclipse SDK 3.1, GEF 3.1, EMF 2.1, and VE 1.1
Re: Extending VE Palette: EMF problem [message #614998 is a reply to message #134926] Tue, 16 January 2007 16:32 Go to previous message
Eclipse UserFriend
Originally posted by: ruth.hawkins.yahoo.com

Hi,

I got it working finally!!! It was my fault really that I was using wrong
Eclipse SDKs versions. The version mentioned in the migration tutorial
should only be used. The migration tool doesn't work for the higher
versions. Using the appropriate versions I successfully migrated the xmi
file to be latest version compatible.

I am working on it further right now.

Thanks for the support!
Regards,
Ruth
Re: Extending VE Palette: EMF problem [message #615336 is a reply to message #134752] Thu, 14 June 2007 07:20 Go to previous message
Vaibhav is currently offline VaibhavFriend
Messages: 3
Registered: July 2009
Junior Member
Hi Ruth,

can you help me out?
My question is , Once we add composite component to VE pallatte
and use this component in new visual class, i am not able to change the Label text or Button text once we click on the componet a dialog box gets open where we can enetr the text of the component , Can you guide me on this .


Thanking you
Vaibhav.
vaibhava.choudhary@gmail.com
Previous Topic:Setting a Property of a component programmatically
Next Topic:How to Edit text on swt component at design time.
Goto Forum:
  


Current Time: Thu Mar 28 15:40:18 GMT 2024

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

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

Back to the top