Possible to reference a xml simple type`? [message #431665] |
Tue, 21 July 2009 06:46  |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
I'm just wondering if it is possible to import anyhow the xml simple
types. I mean I don't want to create them in my metamodel but rather
want to use them in my generated editor as references. In the ecore
diagram editor I tried to load resources... but I only can load ecore
models in the workspace or filesystem and not in the registry. Is it
possible anyhow?
|
|
|
|
|
Re: Possible to reference a xml simple type`? [message #431705 is a reply to message #431701] |
Wed, 22 July 2009 07:24   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------020309040302040608060207
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Gilbert,
How exactly do those lines cause a problem? The XMLTypePackage does
exist. When you created your GenModel, did you choose the existing
GenModel for XMLTypePackage in the final wizard or create a new
GenPackage for it?
Gilbert Mirenque wrote:
> Ed Merks wrote:
>
>> XMLTypePackage has EDataTypes for the XML Schema built-in simple types...
>>
> found it
>
>
>> Perhaps if you use the Sample Ecore Editor to load it and make your
>> first reference to it, after that the diagram editor will let you work
>> with it...
>>
> Ok so it works. If you add a reference in the sample editor first you
> can work with the imported package in the ecore diagram editor as well.
> But now I have another problem. In my genmodel the imported package
> appears as well - understandable. The generation of the editor worked
> fine except an error in one test class. For now I commented the line out
> where a not existent method is to be invoked. But in the new eclipse
> instance, where I want to work with my editor, I get the following error
> when starting the creation wizard:
>
> Plug-in "myplugin.editor" was unable to instantiate class
> "myplugin.presentation.ModelWizard".
> Could not initialize class myplugin.MyModelPackage
>
> that's caused by the following line in the init method of my package impl:
>
> TypePackageImpl theTypePackage =
> (TypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Typ ePackage.eNS_URI)
> instanceof TypePackageImpl ?
> EPackage.Registry.INSTANCE.getEPackage(TypePackage.eNS_URI) :
> TypePackage.eINSTANCE);
>
> and by the following line in my imported TypePackageImpl:
> XMLTypePackage theXMLTypePackage =
> (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTy pePackage.eNS_URI);
>
>
> What can I do to avoid this?
>
--------------020309040302040608060207
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gilbert,<br>
<br>
How exactly do those lines cause a problem? The XMLTypePackage does
exist. When you created your GenModel, did you choose the existing
GenModel for XMLTypePackage in the final wizard or create a new
GenPackage for it? <br>
<br>
<br>
Gilbert Mirenque wrote:
<blockquote cite="mid:h46pa9$fpk$1@build.eclipse.org" type="cite">
<pre wrap="">Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">XMLTypePackage has EDataTypes for the XML Schema built-in simple types...
</pre>
</blockquote>
<pre wrap=""><!---->found it
</pre>
<blockquote type="cite">
<pre wrap="">Perhaps if you use the Sample Ecore Editor to load it and make your
first reference to it, after that the diagram editor will let you work
with it...
</pre>
</blockquote>
<pre wrap=""><!---->Ok so it works. If you add a reference in the sample editor first you
can work with the imported package in the ecore diagram editor as well.
But now I have another problem. In my genmodel the imported package
appears as well - understandable. The generation of the editor worked
fine except an error in one test class. For now I commented the line out
where a not existent method is to be invoked. But in the new eclipse
instance, where I want to work with my editor, I get the following error
when starting the creation wizard:
Plug-in "myplugin.editor" was unable to instantiate class
"myplugin.presentation.ModelWizard".
Could not initialize class myplugin.MyModelPackage
that's caused by the following line in the init method of my package impl:
TypePackageImpl theTypePackage =
(TypePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(Typ ePackage.eNS_URI)
instanceof TypePackageImpl ?
EPackage.Registry.INSTANCE.getEPackage(TypePackage.eNS_URI) :
TypePackage.eINSTANCE);
and by the following line in my imported TypePackageImpl:
XMLTypePackage theXMLTypePackage =
(XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTy pePackage.eNS_URI);
What can I do to avoid this?
</pre>
</blockquote>
</body>
</html>
--------------020309040302040608060207--
|
|
|
|
|
|
|
|
|
|
|
Re: Possible to reference a xml simple type`? [message #431897 is a reply to message #431895] |
Tue, 28 July 2009 19:04  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------010309040502030107050409
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Gilbert,
Reload... uses the same wizard.
Gilbert Mirenque wrote:
> Ed Merks wrote:
>
>> The last page of the wizard should allow you to locate GenModels for any
>> packages being loaded.
>>
> This is right - but the wizard can only be used when I want to create a
> new genmodel. My genmodel exists already so I can't use it :/
>
--------------010309040502030107050409
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gilbert,<br>
<br>
Reload... uses the same wizard.<br>
<br>
Gilbert Mirenque wrote:
<blockquote cite="mid:h4nibi$4qd$1@build.eclipse.org" type="cite">
<pre wrap="">Ed Merks wrote:
</pre>
<blockquote type="cite">
<pre wrap="">The last page of the wizard should allow you to locate GenModels for any
packages being loaded.
</pre>
</blockquote>
<pre wrap=""><!---->This is right - but the wizard can only be used when I want to create a
new genmodel. My genmodel exists already so I can't use it :/
</pre>
</blockquote>
</body>
</html>
--------------010309040502030107050409--
|
|
|
Powered by
FUDForum. Page generated in 0.08810 seconds