Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » get the address of input(EOL)
get the address of input [message #1768520] Wed, 19 July 2017 16:22 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi,

How can I get the addresses of input model and input metamodel in eol program?
I want to pass these addresses to java.


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: get the address of input [message #1768526 is a reply to message #1768520] Wed, 19 July 2017 17:22 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

If you're using an EMF-based named M you can get its path using M.getResource().getURI(). If you're using a file-based metamodel for it you can use M.getMetamodelFiles().

Cheers,
Dimitris
Re: get the address of input [message #1768539 is a reply to message #1768526] Wed, 19 July 2017 19:15 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Thanks a lot.
Is it also possible to use Aliases for Metamodel? e.g., Is something like "IN_MM!EPackage.allInstances() -> first()" true?

As another question, I created a model in my eol program. Then I pass the URI of the model as you said to java. However, before the contents of model is completely loaded the java function runs. It causes the java function works with empty model and get error. What should I do?

and also how can I check the model is empty or not?


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Wed, 19 July 2017 19:18]

Report message to a moderator

Re: get the address of input [message #1768543 is a reply to message #1768539] Wed, 19 July 2017 19:37 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

> Is it also possible to use Aliases for Metamodel? e.g., Is something like "IN_MM!EPackage.allInstances() -> first()" true?

I'm not sure what you're trying to achieve but give this a go and see what happens.

> It causes the java function works with empty model and get error. What should I do?

Please attach a minimal example [1] I can use to reproduce the behaviour you're encountering.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: get the address of input [message #1768571 is a reply to message #1768543] Thu, 20 July 2017 07:02 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Using eclipse Mars.2 (4.5.2) on mac os x.
epsilon 1.3
import Test plugin to eclipse. run it as eclipse application. In the new eclipse, import test1 project and run it.

Thanks for your time.


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: get the address of input [message #1768656 is a reply to message #1768571] Fri, 21 July 2017 05:39 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
I have also another question. When I pass the EPackage of metamodel from Epsilon to Java, how can I register it?

Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: get the address of input [message #1768720 is a reply to message #1768656] Sat, 22 July 2017 11:32 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

If you need to register it in the global EPackage Registry, EPackage.Registry.INSTANCE.put(...) should do the trick.

Cheers,
Dimitris
Re: get the address of input [message #1769086 is a reply to message #1768720] Wed, 26 July 2017 11:48 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Thanks.

Don't you have any comment on my minimal Example?


Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Wed, 26 July 2017 11:52]

Report message to a moderator

Re: get the address of input [message #1769180 is a reply to message #1769086] Thu, 27 July 2017 09:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

I think that you're missing an r.load(...); after Resource r = rs.getResource(path, true); in your Test1 method.

Cheers,
Dimitris
Re: get the address of input [message #1769185 is a reply to message #1769180] Thu, 27 July 2017 11:01 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Thank you very much indeed. My problem was solved.

Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: get the address of input [message #1769512 is a reply to message #1769185] Tue, 01 August 2017 09:15 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
I'm sorry. It sometimes works correctly and many times works incorrectly.
Do you have any idea?


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: get the address of input [message #1769525 is a reply to message #1769512] Tue, 01 August 2017 10:04 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

I'd start by finding a subset of the program that can be used to consistently reproduce the problem you're encountering.

Cheers,
Dimitris
Re: get the address of input [message #1769919 is a reply to message #1769525] Sat, 05 August 2017 17:21 Go to previous message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
It seems if I pass the "Resource" instead of "URI" the program works correctly.
Thanks.


Member of MDSE Research Group
http://mdse.ui.ac.ir
Previous Topic: jdbc emc problem
Next Topic:EWL wizard in GMF editor not showing up after first usage
Goto Forum:
  


Current Time: Sat Apr 20 03:43:44 GMT 2024

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

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

Back to the top