Home » Modeling » Epsilon » call java tool from epsilon(call java tool from epsilon)
call java tool from epsilon [message #1752108] |
Wed, 18 January 2017 21:32 |
taghreed altamimi Messages: 184 Registered: October 2014 |
Senior Member |
|
|
Hi,
I followed the example that is available here https://eclipse.org/epsilon/doc/articles/call-java-from-epsilon/
It was working fine but I don't want to run the tool as an eclipse application then create a new EOL file because I am already have an EOL file in the Epsilon environment and I want that EOL to call the tool that I have created like the above tutorial .I tried to search the tools but I couldn't find it there .What should I do to allow my current EOL to call the tool that I created instead of creating a new EOL file .I hope that I have explained the problem clearly .Attached screenshot for what I have.
Thanks,
Taghreed
[Updated on: Wed, 18 January 2017 22:07] Report message to a moderator
|
|
|
Re: call java tool from epsilon [message #1752148 is a reply to message #1752108] |
Thu, 19 January 2017 09:24 |
|
Tools are contributed by plugins, so you need to have it installed in your Eclipse to use it (hence why you have to run a nested Eclipse application if you're using it from source).
You could try exporting the tool as a deployable plugin (using File > Export...), placing the .jar file inside the dropins folder of your Eclipse installation and then restarting Eclipse. You would need to redo this every time you change the tool, however.
|
|
| | | |
Re: call java tool from epsilon [message #1765257 is a reply to message #1765113] |
Wed, 07 June 2017 21:04 |
|
Hi,
You need to export as "Deployable Plugins and Fragments" instead. Until you get the intended functionality to work as expected, an easier and faster way to run/test your plugin would be to right-click on it in the Project Explorer and select Run As -> Eclipse Application. This will launch a new instance of Eclipse which contains whatever plugins you have in your first instance + running copies of any plugin projects you have in your workspace.
Cheers,
Dimitris
Cheers,
Dimitris
|
|
| |
Re: call java tool from epsilon [message #1765410 is a reply to message #1765408] |
Fri, 09 June 2017 09:43 |
|
> Thank you. I can see the tool when run plugin as eclipse application, but When I export it as "Deployable Plugins and Fragments" it is still not shown.
You may want to have a look at the Build tab of your MANIFEST.mf and make sure that all required artefacts are bundled in the exported plugin.
> As another question, In your opinion, which constraint solver ( USE, EMFtoCSP, etc.) is more appropriate for Epsilon programs?
I haven't used constraint solvers enough myself, but I've heard good things from peers I trust about USE.
Cheers,
Dimitris
|
|
| | | | | |
Re: call java tool from epsilon [message #1798371 is a reply to message #1798302] |
Fri, 16 November 2018 09:47 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi Dimitris,
I appreciate your time in advance. If you import the files in the `first eclipse` folder to eclipse. Then, you run as an eclipse application, and import the files in the `second eclipse` folder to the new eclipse and run the `minimal`, you can see the error. I have changed the plugin.xmi of `org.eclipse.epsilon.haetae.eol.metamodel.visitor.printer`. If Dr. Wei also checks this forum maybe he can help me as well, though I do not think anything is wrong with haetae. I do not have a problem with the tool via standalone. I use Epsilon 1.3.
Looking forward to your prompt reply.
Best Regards,
Banafsheh
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sat, 17 November 2018 07:09] Report message to a moderator
|
|
|
Re: call java tool from epsilon [message #1798416 is a reply to message #1798371] |
Sat, 17 November 2018 19:33 |
|
Hi Banafsheh,
In my setup with 1.3 I'm getting a different error message reading:
Illegal assignment to variable 'pre'. Expected String and found org.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter@563c3880
at (/snip/FamiliestoPersons/test.eol@2:0-2:101)
which is expected given that "pre" is declared as a string in your code. Getting rid of the type declaration makes the program run with out errors
var model2code : new Native("org.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter");
var pre = model2code.print(ETL!ETLModule.all.first().preBlocks.first.body.statements.first);
pre.println();
Cheers,
Dimitris
|
|
|
Re: call java tool from epsilon [message #1798419 is a reply to message #1798416] |
Sun, 18 November 2018 06:29 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi Dimitris,
To call the `print` method, I have the same error as you. Without declaring `pre` as a string, the error is disappeared but the output in the console is wrong. It prints `org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1eff8d2a (eClass: org.eclipse.emf.ecore.impl.EClassImpl@329e6d22 (name: ExpressionStatement) (instanceClassName: null) (abstract: false, interface: false))org.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter@2954f38dorg.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter@2954f38d
` while I expect to have `"Running ETL".println();` . The reason is it cannot detect the methods of `EolPrinter` class of `Haetae`. It confuses it with the `print` method of eol, this is why it does not give the `method not found` error. If you print something in the `print` method of the EolPrinter class, you can see nothing is printed in the console. It does not go through the methods of EolPrinter class, it only goes through the constructor of this class. If you call other methods of EolPrinter, such as the bellow code, you can see `the method not found` error.
var model2code : new Native("org.eclipse.epsilon.eol.visitor.printer.impl.EolPrinter");
model2code.run(odel2code.print(ETL!ETLModule.all.first().preBlocks.first.body.statements.first)).println();
Best Regards,
Banafsheh
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sun, 18 November 2018 06:32] Report message to a moderator
|
|
|
Re: call java tool from epsilon [message #1798420 is a reply to message #1798419] |
Sun, 18 November 2018 07:10 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi Dimitris,
It seems it is related to `Haetae`. I have tested it with the previous version of `Haetae` and it works well. I think the previous version of this tool supports for running it via EOL execution engine (it doesn't support for standalone) and the current version supports for standalone and not support for eol engine. As I finally want to use it via standalone it doesn't matter to me.
Sorry for any inconvenience,
Best Regards,
Banafsheh
Member of MDSE Research Group
http://mdse.ui.ac.ir
|
|
|
Goto Forum:
Current Time: Thu Sep 19 05:44:51 GMT 2024
Powered by FUDForum. Page generated in 0.05620 seconds
|