Skip to main content



      Home
Home » Modeling » Epsilon » get the address of input(EOL)
get the address of input [message #1768520] Wed, 19 July 2017 12:22 Go to next message
Eclipse UserFriend
Hi,

How can I get the addresses of input model and input metamodel in eol program?
I want to pass these addresses to java.
Re: get the address of input [message #1768526 is a reply to message #1768520] Wed, 19 July 2017 13:22 Go to previous messageGo to next message
Eclipse UserFriend
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 15:15 Go to previous messageGo to next message
Eclipse UserFriend
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?

[Updated on: Wed, 19 July 2017 15:18] by Moderator

Re: get the address of input [message #1768543 is a reply to message #1768539] Wed, 19 July 2017 15:37 Go to previous messageGo to next message
Eclipse UserFriend
> 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 03:02 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: get the address of input [message #1768656 is a reply to message #1768571] Fri, 21 July 2017 01:39 Go to previous messageGo to next message
Eclipse UserFriend
I have also another question. When I pass the EPackage of metamodel from Epsilon to Java, how can I register it?
Re: get the address of input [message #1768720 is a reply to message #1768656] Sat, 22 July 2017 07:32 Go to previous messageGo to next message
Eclipse UserFriend
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 07:48 Go to previous messageGo to next message
Eclipse UserFriend
Thanks.

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

[Updated on: Wed, 26 July 2017 07:52] by Moderator

Re: get the address of input [message #1769180 is a reply to message #1769086] Thu, 27 July 2017 05:57 Go to previous messageGo to next message
Eclipse UserFriend
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 07:01 Go to previous messageGo to next message
Eclipse UserFriend
Thank you very much indeed. My problem was solved.
Re: get the address of input [message #1769512 is a reply to message #1769185] Tue, 01 August 2017 05:15 Go to previous messageGo to next message
Eclipse UserFriend
I'm sorry. It sometimes works correctly and many times works incorrectly.
Do you have any idea?
Re: get the address of input [message #1769525 is a reply to message #1769512] Tue, 01 August 2017 06:04 Go to previous messageGo to next message
Eclipse UserFriend
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 13:21 Go to previous message
Eclipse UserFriend
It seems if I pass the "Resource" instead of "URI" the program works correctly.
Thanks.
Previous Topic: jdbc emc problem
Next Topic:EWL wizard in GMF editor not showing up after first usage
Goto Forum:
  


Current Time: Sat Jul 19 11:33:30 EDT 2025

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

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

Back to the top