Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Re: [JET] Switching on eClass()
Re: [JET] Switching on eClass() [message #35400] Tue, 06 November 2007 12:27 Go to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Jörn,

I'll redirect your JET question to the M2T newsgroup which I've added to
the "to" list of the reply.


Jörn Guy Süß wrote:
> I am trying to use EMF JET to traverse an EMF model. I am able to access the
> members of the model, but I need the equivalent of the EMF Switch utility
> class to distinguish instances of subclasses. I would like to use the
> built-in XPath functions, if possible.
>
> Concrete case: I have a Script metaclass, which has an eReference to a Steps
> Metaclass, that are of different subtypes. I have to produce different
> output for each case. How can I write this in EMF JET?
>
> What is the test predicate of the conditional?
>
> <c:when test="value">
> content to process if tag condition is satisfied
> </c:when>
>
>
>
Re: [JET] Switching on eClass() [message #35468 is a reply to message #35400] Tue, 06 November 2007 14:10 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
J
Re: [JET] Switching on eClass() [message #35499 is a reply to message #35468] Wed, 07 November 2007 04:21 Go to previous message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Paul,

Yes that helped. I know XPath pretty well, just the mapping is a bit
difficult. I have put an entry on the JET FAQ/Wiki, at
http://wiki.eclipse.org/JET_FAQ_How_do_I_test_for_the_type/E Class_of_an_element_in_XPath%3F
but your explanation is much richer.
Maybe you want to update the entry?

Thanks for the information!!

"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:fgpsn1$chq$1@build.eclipse.org...
> J
Previous Topic:JET editor 0.8.1 and 0.9.0M2 broken?
Next Topic:EMF Iterate through an String array
Goto Forum:
  


Current Time: Fri Apr 26 09:46:17 GMT 2024

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

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

Back to the top