|
|
|
|
|
|
|
|
Re: [eol] question about usage of native types [message #669324 is a reply to message #666149] |
Mon, 09 May 2011 22:17 |
|
Hello Marco and Dimitris,
Can you give me any pointers on this subject. I have followed the article instructions but I am still getting Type 'MyTool' Type not found error. I also followed marco's advise and wrapped the actual library I want to use in my own class. (I am running this from a standalone setup).
Regards,
Horacio
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
|
|
|
Re: [eol] question about usage of native types [message #669572 is a reply to message #669324] |
Tue, 10 May 2011 18:43 |
|
Hi Horacio,
I believe that Epsilon tools are not available from a standalone setup, as these are loaded using Eclipse extension points. However, you should be able to create any class that is in your classpath through "new Native('...')".
Could you please try placing the class that you want to instantiate from EOL in the same classpath as the Java code which is launching your EOL scripts?
Cheers,
Antonio
[Updated on: Tue, 10 May 2011 18:44] Report message to a moderator
|
|
|
Re: [eol] question about usage of native types [message #669587 is a reply to message #669572] |
Tue, 10 May 2011 20:17 |
|
Antonio,
My standalone setup is actually a set of plugins I run in my own RCP. I tried placing the class in the plugin's class path and it is still not found. This is what I have done using the extension point:
In my plugin.xml I have added the epsilon dt tools extension points to call my class:
...
<!-- Native Types used in Epsilon -->
<extension point="org.eclipse.epsilon.common.dt.tool">
<tool
class="net.sourceforge.riskc.riskcopcode.generator.epsilon.RiskcSimMetrics"
defaultName="SimMetrics">
</tool>
</extension>
...
In my manifest file I added the dt plugin as a required bundel:
...
Require-Bundle: org.eclipse.core.runtime,
org.junit,
org.eclipse.epsilon.common.dt,
org.eclipse.epsilon.eol.engine,
org.eclipse.epsilon.egl.engine,
org.eclipse.epsilon.evl.engine,
org.eclipse.epsilon.emc.emf,
...
Maybe I am missing something else? From my experience using the interactive mode in my other post, can it be that the egl is also not designed to work with native types?
Regards,
Horacio
Horacio Hoyos Rodriguez
Kinori Tech
Need professional support for Epsilon, EMF?
Go to: https://kinori.tech
[Updated on: Tue, 10 May 2011 21:03] Report message to a moderator
|
|
|
Re: [eol] question about usage of native types [message #669700 is a reply to message #669587] |
Wed, 11 May 2011 08:17 |
|
Access to tools is another thing that is set up for you when you use the Epsilon launch configurations, but not when you simply use parse() and execute(). You will need to add the native type delegate which gives Epsilon access to your tool.
You can find the code you need to do that inside org.eclipse.epsilon.eol.dt.launching.EclipseContextManager#s etup(IEolContext). It's the last line in the method:
public static void setup(IEolContext context) {
loadPrettyPrinters(context);
loadIo(context);
context.getNativeTypeDelegates().add(new ExtensionPointToolNativeTypeDelegate());
}
Please try that and tell us if it works for you.
|
|
|
|
Powered by
FUDForum. Page generated in 0.05919 seconds