Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [xcore] Couldn't resolve reference to GenBase 'EDiagnositicChain'
[xcore] Couldn't resolve reference to GenBase 'EDiagnositicChain' [message #1696549] Wed, 27 May 2015 08:24 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hello

I have just installed Mars SR1 and I am having problems with an older xcore model file. In this model we created a validate operation to hook into the model validation.

This currently looks like this:
import org.eclipse.emf.ecore.EDiagnosticChain
import org.eclipse.emf.ecore.EMap
import org.eclipse.emf.common.util.BasicDiagnostic

class MyElement {
	...
	
	op boolean validate(EDiagnosticChain diagnostics, EMap<Object, Object> context) {
		if (<some condition>) {
			val String message = "You need to change this."
			diagnostics.add(...)
			false
		} else
			true
	}
}

The errors I get on the operation definition are:
Multiple markers at this line
- A generic type may have arguments only if it refers to a classifier
- Couldn't resolve reference to GenBase 'EDiagnosticChain'.
- Couldn't resolve reference to GenBase 'EMap'.
- A generic type in this context must refer to a classifier or a type parameter

Is there a migration I need to perform?
Have the possibilities to define validation rules evolved?
Or is there something wrong with my import? (org.eclipse.emf.common is in the Plug-in Dependencies)

Thanks for your help!

Christoph
Re: [xcore] Couldn't resolve reference to GenBase 'EDiagnositicChain' [message #1696701 is a reply to message #1696549] Thu, 28 May 2015 05:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30554
Registered: July 2009
Senior Member
Christoph,

I assume you mean Mars RC1. Yes, I can reproduce this problem. Please
open a bugzilla and I'll investigate in the meantime.


On 27/05/2015 10:24 AM, Christoph Keimel wrote:
> Hello
>
> I have just installed Mars SR1 and I am having problems with an older
> xcore model file. In this model we created a validate operation to
> hook into the model validation.
>
> This currently looks like this:
> import org.eclipse.emf.ecore.EDiagnosticChain
> import org.eclipse.emf.ecore.EMap
> import org.eclipse.emf.common.util.BasicDiagnostic
>
> class MyElement {
> ...
>
> op boolean validate(EDiagnosticChain diagnostics, EMap<Object,
> Object> context) {
> if (<some condition>) {
> val String message = "You need to change this."
> diagnostics.add(...)
> false
> } else
> true
> }
> }
>
> The errors I get on the operation definition are:
> Multiple markers at this line
> - A generic type may have arguments only if it refers to a classifier
> - Couldn't resolve reference to GenBase 'EDiagnosticChain'.
> - Couldn't resolve reference to GenBase 'EMap'.
> - A generic type in this context must refer to a classifier or a type
> parameter
> Is there a migration I need to perform? Have the possibilities to
> define validation rules evolved? Or is there something wrong with my
> import? (org.eclipse.emf.common is in the Plug-in Dependencies)
>
> Thanks for your help!
>
> Christoph
Re: [xcore] Couldn't resolve reference to GenBase 'EDiagnositicChain' [message #1696715 is a reply to message #1696701] Thu, 28 May 2015 07:47 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Ed

yes, sorry: Mars RC1.
Bug 468579

Thanks for looking into this!

Christoph
Previous Topic:Are there any guideline when making a meta model with EMF?
Next Topic:Eclipse reflective API editor does not open generated xmi model file
Goto Forum:
  


Current Time: Tue Oct 22 07:01:32 GMT 2019

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

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

Back to the top