Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Newbie: JVMModelInferrer, extend class from third-party-lib
Newbie: JVMModelInferrer, extend class from third-party-lib [message #897088] Sat, 21 July 2012 15:32 Go to next message
Jochen Zimmermann is currently offline Jochen ZimmermannFriend
Messages: 2
Registered: July 2012
Junior Member
Hi!
using the model inferrer I can't make this work:

def dispatch void infer(Panel panel, IJvmDeclaredTypeAcceptor acceptor, boolean iph) {
  acceptor.accept(panel.toClass(panel.getPackage)).initializeLater [
    superTypes += newTypeRef(panel, "my.third.party.panel.class")
  ]
}


The generated class does not extend the third party class.
Using for example "javax.swing.panel" does work.

Sorry, I really tried to figure it out myself with Googles help and by looking at the MongoDB example - which confused me even more ...

How do I do this?

Thanks for your time!

Regards,
Jochen
Re: Newbie: JVMModelInferrer, extend class from third-party-lib [message #897095 is a reply to message #897088] Sat, 21 July 2012 16:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi

just make sure the class is on the classpath of the model project

btw "my.third.party.panel.class" is very disturbing thing you mean "my.third.party.panel"

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Newbie: JVMModelInferrer, extend class from third-party-lib [message #897097 is a reply to message #897095] Sat, 21 July 2012 17:28 Go to previous message
Jochen Zimmermann is currently offline Jochen ZimmermannFriend
Messages: 2
Registered: July 2012
Junior Member
Oh ...

I added it to the class path of the xtext project about 100 times, added it to the
plugin classpath etc.
I never thought to add it to the model ... from a beginners view it seemed more natural to me to add it where I define my language and write the code for the generator.

Sorry and thanks for the really fast answer!
Previous Topic:Resolving imports in standalone generator
Next Topic:Custom ScopeProvider + FilteringScope and Proxy Resolution ?
Goto Forum:
  


Current Time: Thu Apr 25 02:10:06 GMT 2024

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

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

Back to the top