|
Re: Problems creating a dynamic instance [message #427896 is a reply to message #427885] |
Wed, 04 March 2009 12:36 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030805010309000109060307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Alfredo,
The action should really be disabled as it is for Addressable directly.
We should fix that enablement test. The log shows this underlying cause
for why book.xmi wasn't created.
java.lang.IllegalArgumentException: The class 'IComparable' is not a
valid classifier
at
org.eclipse.emf.ecore.impl.EFactoryImpl.create(EFactoryImpl. java:235)
at
org.eclipse.emf.ecore.impl.EFactoryImpl.create(EFactoryImpl. java:243)
at org.eclipse.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:3 244)
The problem is that it's impossible to create a dynamic instance that
implements IComparable or any other existing interface for that matter.
After all, DynamicEObjectImpl won't implement that interface.
AJ wrote:
> Hi,
>
> Why cannot the ecore editor create a dynamic instance of a concrete
> eclass when its abstract parent eclass implements an interface?
>
> For example, in the attached extlibrary.ecore file; I modified
> Addressable to implement an interface. However, when I try to create a
> dynamic instance of Person; I get an error saying that it cannot
> create/find Person.xmi
>
> Thanks in advance!
--------------030805010309000109060307
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alfredo,<br>
<br>
The action should really be disabled as it is for Addressable
directly. We should fix that enablement test. The log shows this
underlying cause for why book.xmi wasn't created.<br>
<blockquote>java.lang.IllegalArgumentException: The class 'IComparable'
is not a valid classifier<br>
at
org.eclipse.emf.ecore.impl.EFactoryImpl.create(EFactoryImpl. java:235) <br>
at
org.eclipse.emf.ecore.impl.EFactoryImpl.create(EFactoryImpl. java:243) <br>
at org.eclipse.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:3 244) <br>
</blockquote>
The problem is that it's impossible to create a dynamic instance that
implements IComparable or any other existing interface for that
matter. After all, DynamicEObjectImpl won't implement that interface.<br>
<br>
<br>
AJ wrote:
<blockquote cite="mid:gokm0a$vom$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
Why cannot the ecore editor create a dynamic instance of a concrete
eclass when its abstract parent eclass implements an interface?
<br>
<br>
For example, in the attached extlibrary.ecore file; I modified
Addressable to implement an interface. However, when I try to create a
dynamic instance of Person; I get an error saying that it cannot
create/find Person.xmi
<br>
<br>
Thanks in advance!
<br>
</blockquote>
</body>
</html>
--------------030805010309000109060307--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02597 seconds