Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] Unable to create a data type of an array of EMF Ecore Classes (e.f. EStructuralFeature)(Xcore complaints on "type EStructuralFeaturesArray wraps EStructuralFeature[]")
[XCore] Unable to create a data type of an array of EMF Ecore Classes (e.f. EStructuralFeature) [message #1694179] Fri, 01 May 2015 15:53 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Hi,

I would like to model an operation with a parameter that is simple array of EStructuralFeature. But the following line raises an error

"type EStructuralFeaturesArray wraps EStructuralFeature[]"

Error Raised:
"Couldn't resolve reference to JvmType 'EParameter'"

Is it possible to do that? My meta-model already contains simple reference to EStructuralFeature but the definition of this new Data Type does not seem to work.

Thanks Wink
Re: [XCore] Unable to create a data type of an array of EMF Ecore Classes (e.f. EStructuralFeature) [message #1694219 is a reply to message #1694179] Sat, 02 May 2015 13:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Regent,

Which version of Xcore are you using?

On 01/05/2015 5:53 PM, Regent LArcheveque wrote:
> Hi,
> I would like to model an operation with a parameter that is simple
> array of EStructuralFeature. But the following line raises an error
>
> "type EStructuralFeaturesArray wraps EStructuralFeature[]"
>
> Error Raised: "Couldn't resolve reference to JvmType 'EParameter'"
I can reproduce this with the Mars version, though the error is about
EStructuralFeature not EParameter. If I change it to be
org.eclipse.emf.ecore.EStructuralFeature[] then the error goes away, so
it seems yet another scoping problem.
>
> Is it possible to do that?
It should be yes.
> My meta-model already contains simple reference to EStructuralFeature
> but the definition of this new Data Type does not seem to work.
No, from a preliminary analysis, it seems to be a problem that an import
that can resolve to GenClassifier can't also be used to resolve to a
JvmType in the cached synthetic import section that's created... So
there's definitely something that needs to be fixed here. Please open a
bugzilla. This simple test case reproduces the problem:

package test

import org.eclipse.emf.ecore.EStructuralFeature

type Foo wraps EStructuralFeature

>
> Thanks ;)
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [XCore] Unable to create a data type of an array of EMF Ecore Classes (e.f. EStructuralFeature) [message #1694320 is a reply to message #1694219] Mon, 04 May 2015 12:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Regent,

I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=466305 and
committed the fix. It will be in the M7 build.


On 02/05/2015 3:10 PM, Ed Merks wrote:
> Regent,
>
> Which version of Xcore are you using?
>
> On 01/05/2015 5:53 PM, Regent LArcheveque wrote:
>> Hi,
>> I would like to model an operation with a parameter that is simple
>> array of EStructuralFeature. But the following line raises an error
>>
>> "type EStructuralFeaturesArray wraps EStructuralFeature[]"
>>
>> Error Raised: "Couldn't resolve reference to JvmType 'EParameter'"
> I can reproduce this with the Mars version, though the error is about
> EStructuralFeature not EParameter. If I change it to be
> org.eclipse.emf.ecore.EStructuralFeature[] then the error goes away,
> so it seems yet another scoping problem.
>>
>> Is it possible to do that?
> It should be yes.
>> My meta-model already contains simple reference to EStructuralFeature
>> but the definition of this new Data Type does not seem to work.
> No, from a preliminary analysis, it seems to be a problem that an
> import that can resolve to GenClassifier can't also be used to resolve
> to a JvmType in the cached synthetic import section that's created...
> So there's definitely something that needs to be fixed here. Please
> open a bugzilla. This simple test case reproduces the problem:
>
> package test
>
> import org.eclipse.emf.ecore.EStructuralFeature
>
> type Foo wraps EStructuralFeature
>
>>
>> Thanks ;)
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [XCore] Unable to create a data type of an array of EMF Ecore Classes (e.f. EStructuralFeature) [message #1694335 is a reply to message #1694320] Mon, 04 May 2015 14:12 Go to previous message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Thanks Ed. For your info, I use XCore 1.2.2v20150202-0452.

Have a nice day Wink
Previous Topic:Help with Wiki page
Next Topic:[CDO] MARS Enhancements
Goto Forum:
  


Current Time: Thu Apr 25 22:58:09 GMT 2024

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

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

Back to the top