Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Question about "Couldn't resolve reference to JvmIdentifiableElement"(What to do when the model is in a project, that I'm not in control of)
Question about "Couldn't resolve reference to JvmIdentifiableElement" [message #991480] Wed, 19 December 2012 07:39 Go to next message
Andreas Brieg is currently offline Andreas Brieg
Messages: 48
Registered: November 2012
Member
I wanted to create a visualization of a part of the MoDisco Java Model with the help of the Generic Graph View.

So I started to write the mapping and got that far:
import org.eclipse.gmt.modisco.java.*

diagram JavaDiagram type Model {
	node DeclarationNode for this.compilationUnits {
		
	}
}

The problem is that compilationUnits is marked with the compilation error :Quote:
Couldn't resolve reference to JvmIdentifiableElement 'compilationUnits'.


From the answers to this topic I know I should reference the xbase.lib in the project that contains the model. However the MoDisco Java Model is contained in the plugin org.eclipse.gmt.modisco.java, which I don't have control over.

Is there another way to solve that problem? Including the plugin org.eclipse.xtext.xbase.lib as a dependency in the project where I'm visualizing the model doesn't help.

Thanks for advice.
Re: Question about "Couldn't resolve reference to JvmIdentifiableElement" [message #991635 is a reply to message #991480] Wed, 19 December 2012 17:21 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2809
Registered: July 2009
Senior Member
Andreas,

if you try to write Java code against
org.eclipse.gmt.modisco.java.Model, is there a method getCompilationUnits?

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 19.12.12 13:39, schrieb Andreas Brieg:
> I wanted to create a visualization of a part of the
> http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.modisco.java.doc%2Fmediawiki%2Fjava_metamodel%2Fuser.html
> with the help of the https://github.com/JanKoehnlein/Generic-Graph-View.
>
> So I started to write the mapping and got that far:
>
> import org.eclipse.gmt.modisco.java.*
>
> diagram JavaDiagram type Model {
> node DeclarationNode for this.compilationUnits {
>
> }
> }
>
> The problem is that compilationUnits is marked with the compilation
> error :Quote:
>> Couldn't resolve reference to JvmIdentifiableElement 'compilationUnits'.
>
>
> From the
> http://www.eclipse.org/forums/index.php/m/891853/?srch=Couldn%27t+resolve+reference+to+JvmIdentifiableElement#msg_891853
> I know I should reference the xbase.lib in the project that contains the
> model. However the MoDisco Java Model is contained in the plugin
> org.eclipse.gmt.modisco.java, which I don't have control over.
>
> Is there another way to solve that problem? Including the plugin
> org.eclipse.xtext.xbase.lib as a dependency in the project where I'm
> visualizing the model doesn't help.
>
> Thanks for advice.
Re: Question about "Couldn't resolve reference to JvmIdentifiableElement" [message #991778 is a reply to message #991635] Thu, 20 December 2012 02:19 Go to previous message
Andreas Brieg is currently offline Andreas Brieg
Messages: 48
Registered: November 2012
Member
Hi Sebastian,

Yes there is such a method. The source of the class is available under http://dev.eclipse.org/viewcvs/viewvc.cgi/main/trunk/org.eclipse.gmt.modisco.java/src/org/eclipse/gmt/modisco/java/Model.java?view=markup&root=Modeling_MODISCO

Might it have something to do with the return type being EList?
Previous Topic:Scope method not execute?
Next Topic:problem with testing the editor as Eclipse Application
Goto Forum:
  


Current Time: Thu Aug 28 03:22:02 EDT 2014

Powered by FUDForum. Page generated in 0.10934 seconds