Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem using XMI Resource type
Problem using XMI Resource type [message #168202] Tue, 15 January 2008 12:07 Go to next message
Eclipse UserFriend
Originally posted by: zzhangh.cn.ibm.com

Hi,
I have generated a GMF application, after that I changed GenPackage
element in .genmodel to use "XMI" as Resource Type, and overrode
MyResourceImpl#useUUIDs() to return true, so that EMF will automatically
generate an ID for every object in my model.

The problem is I can't create any visual element in diagram editor, the
editor reports "Invalid view - remove from diagram." every time I tried
to drop a node, even after I re-generated the .gmfgen and the code.

Is there anything I need to specify in gmfgen?

Regards,
Hao
Re: Problem using XMI Resource type [message #168211 is a reply to message #168202] Tue, 15 January 2008 12:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Hao,

Note that for EMF's generator the plugin.xml is not regenerated once it
exists so it's likely that your specialized resource type has not been
properly registered for your model in the plugin.xml for the model. Try
removing the MANIFEST.MF and plugin.xml of your model project and
regenerating the model again to regenerate these two artifacts. There
might be other issues, but this seems a likely one...


Hao Zhang wrote:
> Hi,
> I have generated a GMF application, after that I changed GenPackage
> element in .genmodel to use "XMI" as Resource Type, and overrode
> MyResourceImpl#useUUIDs() to return true, so that EMF will automatically
> generate an ID for every object in my model.
>
> The problem is I can't create any visual element in diagram editor, the
> editor reports "Invalid view - remove from diagram." every time I tried
> to drop a node, even after I re-generated the .gmfgen and the code.
>
> Is there anything I need to specify in gmfgen?
>
> Regards,
> Hao
>
Re: Problem using XMI Resource type [message #168529 is a reply to message #168211] Thu, 17 January 2008 02:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zzhangh.cn.ibm.com

Hi Ed:
I've already removed the two files and I'm quite sure they are
re-generated, here is content of plugin.xml:

<plugin>
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri = "http://erm"
class = "com.my.erm.ErmPackage"
genModel = "model/erm.genmodel" />
</extension>

<extension point="org.eclipse.emf.ecore.extension_parser">
<parser
type="erm"
class="com.my.erm.util.ErmResourceFactoryImpl" />
</extension>
</plugin>

After changing to use XMI resource type, EMF generated editor works well
but GMF diagram editor not, so I'm guessing maybe I have something to be
done at GMF part?

Regards,
Hao

Ed Merks Wrote:
> Hao,
>
> Note that for EMF's generator the plugin.xml is not regenerated once it
> exists so it's likely that your specialized resource type has not been
> properly registered for your model in the plugin.xml for the model. Try
> removing the MANIFEST.MF and plugin.xml of your model project and
> regenerating the model again to regenerate these two artifacts. There
> might be other issues, but this seems a likely one...
>
>
> Hao Zhang wrote:
>> Hi,
>> I have generated a GMF application, after that I changed GenPackage
>> element in .genmodel to use "XMI" as Resource Type, and overrode
>> MyResourceImpl#useUUIDs() to return true, so that EMF will automatically
>> generate an ID for every object in my model.
>>
>> The problem is I can't create any visual element in diagram editor, the
>> editor reports "Invalid view - remove from diagram." every time I tried
>> to drop a node, even after I re-generated the .gmfgen and the code.
>>
>> Is there anything I need to specify in gmfgen?
>>
>> Regards,
>> Hao
>>
Re: Problem using XMI Resource type [message #168583 is a reply to message #168529] Thu, 17 January 2008 10:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Hao,

I guess so, but I don't know about that part. Is your instance data
being stored in a file with "*.erm" extension when you are using the GMF
editor to edit the instance?


Hao Zhang wrote:
> Hi Ed:
> I've already removed the two files and I'm quite sure they are
> re-generated, here is content of plugin.xml:
>
> <plugin>
> <extension point="org.eclipse.emf.ecore.generated_package">
> <package
> uri = "http://erm"
> class = "com.my.erm.ErmPackage"
> genModel = "model/erm.genmodel" />
> </extension>
>
> <extension point="org.eclipse.emf.ecore.extension_parser">
> <parser
> type="erm"
> class="com.my.erm.util.ErmResourceFactoryImpl" />
> </extension>
> </plugin>
>
> After changing to use XMI resource type, EMF generated editor works well
> but GMF diagram editor not, so I'm guessing maybe I have something to be
> done at GMF part?
>
> Regards,
> Hao
>
> Ed Merks Wrote:
>
>> Hao,
>>
>> Note that for EMF's generator the plugin.xml is not regenerated once it
>> exists so it's likely that your specialized resource type has not been
>> properly registered for your model in the plugin.xml for the model. Try
>> removing the MANIFEST.MF and plugin.xml of your model project and
>> regenerating the model again to regenerate these two artifacts. There
>> might be other issues, but this seems a likely one...
>>
>>
>> Hao Zhang wrote:
>>
>>> Hi,
>>> I have generated a GMF application, after that I changed GenPackage
>>> element in .genmodel to use "XMI" as Resource Type, and overrode
>>> MyResourceImpl#useUUIDs() to return true, so that EMF will automatically
>>> generate an ID for every object in my model.
>>>
>>> The problem is I can't create any visual element in diagram editor, the
>>> editor reports "Invalid view - remove from diagram." every time I tried
>>> to drop a node, even after I re-generated the .gmfgen and the code.
>>>
>>> Is there anything I need to specify in gmfgen?
>>>
>>> Regards,
>>> Hao
>>>
>>>
Re: Problem using XMI Resource type [message #168879 is a reply to message #168583] Mon, 21 January 2008 02:17 Go to previous message
Eclipse UserFriend
Originally posted by: zzhangh.cn.ibm.com

Exactly.

Ed Merks wrote:
> Hao,
>
> I guess so, but I don't know about that part. Is your instance data
> being stored in a file with "*.erm" extension when you are using the GMF
> editor to edit the instance?
>
>
> Hao Zhang wrote:
>> Hi Ed:
>> I've already removed the two files and I'm quite sure they are
>> re-generated, here is content of plugin.xml:
>>
>> <plugin>
>> <extension point="org.eclipse.emf.ecore.generated_package">
>> <package
>> uri = "http://erm"
>> class = "com.my.erm.ErmPackage"
>> genModel = "model/erm.genmodel" />
>> </extension>
>>
>> <extension point="org.eclipse.emf.ecore.extension_parser">
>> <parser
>> type="erm"
>> class="com.my.erm.util.ErmResourceFactoryImpl" />
>> </extension>
>> </plugin>
>>
>> After changing to use XMI resource type, EMF generated editor works well
>> but GMF diagram editor not, so I'm guessing maybe I have something to be
>> done at GMF part?
>>
>> Regards,
>> Hao
>>
>> Ed Merks Wrote:
>>
>>> Hao,
>>>
>>> Note that for EMF's generator the plugin.xml is not regenerated once it
>>> exists so it's likely that your specialized resource type has not been
>>> properly registered for your model in the plugin.xml for the model. Try
>>> removing the MANIFEST.MF and plugin.xml of your model project and
>>> regenerating the model again to regenerate these two artifacts. There
>>> might be other issues, but this seems a likely one...
>>>
>>>
>>> Hao Zhang wrote:
>>>
>>>> Hi,
>>>> I have generated a GMF application, after that I changed GenPackage
>>>> element in .genmodel to use "XMI" as Resource Type, and overrode
>>>> MyResourceImpl#useUUIDs() to return true, so that EMF will automatically
>>>> generate an ID for every object in my model.
>>>>
>>>> The problem is I can't create any visual element in diagram editor, the
>>>> editor reports "Invalid view - remove from diagram." every time I tried
>>>> to drop a node, even after I re-generated the .gmfgen and the code.
>>>>
>>>> Is there anything I need to specify in gmfgen?
>>>>
>>>> Regards,
>>>> Hao
>>>>
>>>>
Previous Topic:Example for 2.1M4
Next Topic:How to display semantic data multiple times on the same diagramm
Goto Forum:
  


Current Time: Thu Apr 25 09:15:39 GMT 2024

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

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

Back to the top