Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How to use Native with my own Java classes?(Native('javax.swing.JFrame') works, but Native('my.MyValidator') doesn't)
How to use Native with my own Java classes? [message #499710] Mon, 23 November 2009 19:50 Go to next message
Itamar is currently offline Itamar
Messages: 39
Registered: November 2009
Member
I have a short EVL file that looks something like:
...
var frame := new Native('javax.swing.JFrame');
...
var v := new Native('my.MyValidator');
...


The first statement works fine, but the second throws an error:
Type 'my.MyValidator' not found


The EVL file and the my.MyValidator class reside in the same project, and I run the EVL file using the EVL Validation run-configuration.

Any ideas why I cannot use Native('my.MyValidator') ?

Thanks !
Re: How to use Native with my own Java classes? [message #499722 is a reply to message #499710] Mon, 23 November 2009 20:32 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi,

To use a Java class from Epsilon, it needs to either be in the classpath
or to be declared using the org.eclipse.epsilon.common.dt.tool extension
point. You can have a look at these two projects in the SVN for examples:

(tool implementations)
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.tools/

(tool declarations)
http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/

Cheers,
Dimitris

itamar.benzaken@gmail.com wrote:
> I have a short EVL file that looks something like:
>
> ..
> var frame := new Native('javax.swing.JFrame');
> ..
> var v := new Native('my.MyValidator');
> ..
>
>
> The first statement works fine, but the second throws an error:
> Type 'my.MyValidator' not found
>
> The EVL file and the my.MyValidator class reside in the same project,
> and I run the EVL file using the EVL Validation run-configuration.
>
> Any ideas why I cannot use Native('my.MyValidator') ?
>
> Thanks !
Re: How to use Native with my own Java classes? [message #499737 is a reply to message #499722] Mon, 23 November 2009 21:37 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi again,

I've just added a more detailed article on this:

http://www.eclipse.org/gmt/epsilon/doc/articles/call-java-fr om-epsilon/

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi,
>
> To use a Java class from Epsilon, it needs to either be in the classpath
> or to be declared using the org.eclipse.epsilon.common.dt.tool extension
> point. You can have a look at these two projects in the SVN for examples:
>
> (tool implementations)
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.tools/
>
>
> (tool declarations)
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/
>
>
> Cheers,
> Dimitris
>
> itamar.benzaken@gmail.com wrote:
>> I have a short EVL file that looks something like:
>>
>> ..
>> var frame := new Native('javax.swing.JFrame');
>> ..
>> var v := new Native('my.MyValidator');
>> ..
>>
>>
>> The first statement works fine, but the second throws an error:
>> Type 'my.MyValidator' not found
>>
>> The EVL file and the my.MyValidator class reside in the same project,
>> and I run the EVL file using the EVL Validation run-configuration.
>>
>> Any ideas why I cannot use Native('my.MyValidator') ?
>>
>> Thanks !
Re: How to use Native with my own Java classes? [message #500392 is a reply to message #499710] Wed, 25 November 2009 21:23 Go to previous message
Itamar is currently offline Itamar
Messages: 39
Registered: November 2009
Member
Thanks A LOT !
That was very helpful (and quick!)
Re: How to use Native with my own Java classes? [message #583127 is a reply to message #499722] Mon, 23 November 2009 21:37 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi again,

I've just added a more detailed article on this:

http://www.eclipse.org/gmt/epsilon/doc/articles/call-java-fr om-epsilon/

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi,
>
> To use a Java class from Epsilon, it needs to either be in the classpath
> or to be declared using the org.eclipse.epsilon.common.dt.tool extension
> point. You can have a look at these two projects in the SVN for examples:
>
> (tool implementations)
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.tools/
>
>
> (tool declarations)
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.epsi lon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/
>
>
> Cheers,
> Dimitris
>
> itamar.benzaken@gmail.com wrote:
>> I have a short EVL file that looks something like:
>>
>> ..
>> var frame := new Native('javax.swing.JFrame');
>> ..
>> var v := new Native('my.MyValidator');
>> ..
>>
>>
>> The first statement works fine, but the second throws an error:
>> Type 'my.MyValidator' not found
>>
>> The EVL file and the my.MyValidator class reside in the same project,
>> and I run the EVL file using the EVL Validation run-configuration.
>>
>> Any ideas why I cannot use Native('my.MyValidator') ?
>>
>> Thanks !
Previous Topic:[HUTN] I can't instance from UML.ecore
Next Topic:How to use Native with my own Java classes?
Goto Forum:
  


Current Time: Thu Sep 18 19:44:37 GMT 2014

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

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