Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » eContainer in abstract syntax
eContainer in abstract syntax [message #1835476] Fri, 04 December 2020 07:04 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi there,

I have parsed my EOL program with Java. Considering the code below, I would like to get `WhileStatement` from `IfStatement`. Is there any method like EMF eContainer for this purpose?

while(condition1) {
    if(condition2) {
          //some code
    }
}


Sincerely,
Banafsheh


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: eContainer in abstract syntax [message #1835477 is a reply to message #1835476] Fri, 04 December 2020 07:05 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Banafsheh,

getParent should do the trick.

Thanks,
Dimitris
Re: eContainer in abstract syntax [message #1835478 is a reply to message #1835477] Fri, 04 December 2020 07:30 Go to previous message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi Dimitris,

Thanks. Since getParent give me the block instead of WhileStatement, I must use it twice.

Sincerely,
Banafsheh


Member of MDSE Research Group
http://mdse.ui.ac.ir
Previous Topic:XText compatibility with ETL
Next Topic:Meta Model Merging with EML
Goto Forum:
  


Current Time: Sat Apr 27 07:05:25 GMT 2024

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

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

Back to the top