|
|
|
Re: ModelWizard [message #421941 is a reply to message #421939] |
Mon, 18 August 2008 21:33 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
How much of t what I told you did you do? If you're still seeing XMI
and a document root then you haven't specified XML as your resource type
or done the other things...
exquisitus wrote:
> Ed Merks schrieb:
>> Hi,
>>
>> Comments below.
>>
>> exquisitus wrote:
>>> Hi
>>>
>>> I set in genmodel->All->Prefix to XML so that the ResourceSet use XML.
>> This prefix is used for things like the XyzPackage, XyzFactory,
>> XyzSwitch. Typically it should represent an upper case name that
>> clearly denotes your specific model and will generally make those API
>> names unique with respect to others that might be used along with it.
>>> Don´t know if thats bad? Works fine. If i use the standard genmodel
>>> genmodel->All->Prefix=Model and try to create a XML-File with the
>>> Wizard
>>> the head of the XML-File is wrong or i want the other head.
>> In EMF 2.4 there is a separate setting "File Extensions" property
>> that you can set independently of the model prefix. You'd want to
>> set this to "xml" and make your Prefix be something better; model is
>> not descriptive in my opinion. Prior to EMF 2.3, you'd fiddle with
>> the plugin registrations and the plugin.properties to change the
>> values for these things things to be "xml".
>>>
>>> genmodel->All->Prefix=XML
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE build SYSTEM "build.dtd">
>>> <model:Build xmlns:model="http://model.example">
>>>
>>>
>>> genmodel->All->Prefix=Model
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <model:DocumentRoot xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI" xmlns:model="http://model.example">
>>> <build/>
>>> </model:DocumentRoot>
>>>
>>> what do i have to change in the Wizard that it create XML-Files
>> If you use the xml extension, I'd strongly recommend that you make
>> use of "Content Type Identifier" as well so that all the resource
>> factory and editor registrations are based on content type (will look
>> at the namespace in the *.xml file) not just on extension.
>>
>> Also keep in mind that plugin.xml does not regenerate, nor do the
>> values of plugin.properties files change once generated; that's what
>> allows them to be changed arbitrarily. So if you change your
>> GenModel, and you will want to, you need to delete these files and
>> regenerate them from scratch.
>
> Thanks a lot. But how can i change the namespace. Cant find the
> namespace in the Properties of the genmodel.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03239 seconds