Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Trouble accessing java objects
Trouble accessing java objects [message #21113] Mon, 29 June 2009 12:20 Go to next message
Arian Storch is currently offline Arian StorchFriend
Messages: 6
Registered: July 2009
Junior Member
Hi!

I've got some trouble accessing a java object within evl/eol.
The given example works fine:

var frame := new Native('javax.swing.JFrame');

But when I try to call my own object like

var clazz := new Native('workflow.validation.TestClass');

I'm getting the following error message:

"Type 'workflow.validation.TestClass' not found"

Any suggestions?

Greetings
Re: Trouble accessing java objects [message #21129 is a reply to message #21113] Mon, 29 June 2009 12:25 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Arian,

You need to make Epsilon aware of your class. If it's not already in the
classpath, you can do this by providing an extension to the
org.eclipse.epsilon.common.dt.tool extension point. See
https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.eps ilon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/plugin.x ml
for some examples.

Cheers,
Dimitris

Arian Storch wrote:
> Hi!
>
> I've got some trouble accessing a java object within evl/eol. The given
> example works fine:
>
> var frame := new Native('javax.swing.JFrame');
>
> But when I try to call my own object like
>
> var clazz := new Native('workflow.validation.TestClass');
>
> I'm getting the following error message:
>
> "Type 'workflow.validation.TestClass' not found"
>
> Any suggestions?
>
> Greetings
>
>
>
Re: Trouble accessing java objects [message #21162 is a reply to message #21129] Mon, 29 June 2009 17:21 Go to previous messageGo to next message
Arian Storch is currently offline Arian StorchFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Dimitris,

thanks for your advise. It works great now!

Greetings
Arian

Dimitris Kolovos wrote:

> Hi Arian,

> You need to make Epsilon aware of your class. If it's not already in the
> classpath, you can do this by providing an extension to the
> org.eclipse.epsilon.common.dt.tool extension point. See
>
https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.eps ilon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/plugin.x ml
> for some examples.

> Cheers,
> Dimitris
Re: Trouble accessing java objects [message #479757 is a reply to message #21162] Wed, 12 August 2009 11:33 Go to previous messageGo to next message
Ivo(sh) Musil is currently offline Ivo(sh) MusilFriend
Messages: 17
Registered: July 2009
Junior Member
Hi All

I tried to use some native Java class in EOL but I haven't success. Even I used Dimitrios's and Louis's document named "Epsilon Tools" even information from this thread - if I start attached "nt.eol" script from inside of Eclipse, I will get error is "Type 'nativetest.NativeTest' not found". But if I start it from "generated" Eclipse application, script work ok.

Probably I must be something overlooking ... can someone take a look to attached sources and help me?


Thanks in advance

---
Ivo(sh)



Versions:

Eclipse Galileo Modeling Suite / Epsilon 0.8.6 on Linux 64bit

---
plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.epsilon.common.dt.tool">
<tool class="nativetest.NativeTest" defaultName="nativetest"/>
</extension>
</plugin>

---
MANIFEST.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Nativetest
Bundle-SymbolicName: nativetest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: nativetest.Activator
Require-Bundle: org.eclipse.core.runtime, org.eclipse.epsilon.common.dt;bundle-version="0.8.6", org.eclipse.epsilon.eol.engine;bundle-version="0.8.6"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

---
NativeTest.java:

package nativetest;

public class NativeTest {
public String hello() {
return "HELLO FROM NATIVE TEST RUN";
}
}

---
nt.eol:

'START'.println();
var x := new Native('nativetest.NativeTest');
x.println();
x.hello().println();

Re: Trouble accessing java objects [message #479765 is a reply to message #479757] Wed, 12 August 2009 12:59 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Ivosh,

This is the expected behaviour as Epsilon couldn't possibly know
anything about your plugin until it is activated (i.e. in a runtime
workbench).

Cheers,
Dimitris

Ivosh Musil wrote:
> Hi All
>
> I tried to use some native Java class in EOL but I haven't success. Even
> I used Dimitrios's and Louis's document named "Epsilon Tools" even
> information from this thread - if I start attached "nt.eol" script from
> inside of Eclipse, I will get error is "Type 'nativetest.NativeTest' not
> found". But if I start it from "generated" Eclipse application, script
> work ok.
>
> Probably I must be something overlooking ... can someone take a look to
> attached sources and help me?
>
>
> Thanks in advance
>
> ---
> Ivo(sh)
>
>
>
> Versions:
>
> Eclipse Galileo Modeling Suite / Epsilon 0.8.6 on Linux 64bit
>
> ---
> plugin.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
> <extension point="org.eclipse.epsilon.common.dt.tool">
> <tool class="nativetest.NativeTest" defaultName="nativetest"/>
> </extension>
> </plugin>
>
> ---
> MANIFEST.MF:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Nativetest
> Bundle-SymbolicName: nativetest;singleton:=true
> Bundle-Version: 1.0.0.qualifier
> Bundle-Activator: nativetest.Activator
> Require-Bundle: org.eclipse.core.runtime,
> org.eclipse.epsilon.common.dt;bundle-version="0.8.6",
> org.eclipse.epsilon.eol.engine;bundle-version="0.8.6"
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>
> ---
> NativeTest.java:
>
> package nativetest;
>
> public class NativeTest {
> public String hello() {
> return "HELLO FROM NATIVE TEST RUN";
> }
> }
>
> ---
> nt.eol:
>
> 'START'.println();
> var x := new Native('nativetest.NativeTest');
> x.println();
> x.hello().println();
>
>
Re: Trouble accessing java objects [message #479780 is a reply to message #479765] Wed, 12 August 2009 13:42 Go to previous message
Ivo(sh) Musil is currently offline Ivo(sh) MusilFriend
Messages: 17
Registered: July 2009
Junior Member
Hi Dimitris

> This is the expected behaviour as Epsilon couldn't possibly know
> anything about your plugin until it is activated (i.e. in a runtime
> workbench).

thank for your quick (and easy :-) ) answer. Surely I need more studying
and practice on Eclipse plug-ins.

Ivo(sh)
Re: Trouble accessing java objects [message #569838 is a reply to message #21113] Mon, 29 June 2009 12:25 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Arian,

You need to make Epsilon aware of your class. If it's not already in the
classpath, you can do this by providing an extension to the
org.eclipse.epsilon.common.dt.tool extension point. See
https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.eps ilon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/plugin.x ml
for some examples.

Cheers,
Dimitris

Arian Storch wrote:
> Hi!
>
> I've got some trouble accessing a java object within evl/eol. The given
> example works fine:
>
> var frame := new Native('javax.swing.JFrame');
>
> But when I try to call my own object like
>
> var clazz := new Native('workflow.validation.TestClass');
>
> I'm getting the following error message:
>
> "Type 'workflow.validation.TestClass' not found"
>
> Any suggestions?
>
> Greetings
>
>
>
Re: Trouble accessing java objects [message #569891 is a reply to message #21129] Mon, 29 June 2009 17:21 Go to previous message
Arian Storch is currently offline Arian StorchFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Dimitris,

thanks for your advise. It works great now!

Greetings
Arian

Dimitris Kolovos wrote:

> Hi Arian,

> You need to make Epsilon aware of your class. If it's not already in the
> classpath, you can do this by providing an extension to the
> org.eclipse.epsilon.common.dt.tool extension point. See
>
https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.eps ilon/trunk/plugins/org.eclipse.epsilon.eol.dt.tools/plugin.x ml
> for some examples.

> Cheers,
> Dimitris
Re: Trouble accessing java objects [message #573779 is a reply to message #21162] Wed, 12 August 2009 11:33 Go to previous message
Ivo(sh) Musil is currently offline Ivo(sh) MusilFriend
Messages: 17
Registered: July 2009
Junior Member
Hi All

I tried to use some native Java class in EOL but I haven't success. Even I used Dimitrios's and Louis's document named "Epsilon Tools" even information from this thread - if I start attached "nt.eol" script from inside of Eclipse, I will get error is "Type 'nativetest.NativeTest' not found". But if I start it from "generated" Eclipse application, script work ok.

Probably I must be something overlooking ... can someone take a look to attached sources and help me?


Thanks in advance

---
Ivo(sh)



Versions:

Eclipse Galileo Modeling Suite / Epsilon 0.8.6 on Linux 64bit

---
plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension point="org.eclipse.epsilon.common.dt.tool">
<tool class="nativetest.NativeTest" defaultName="nativetest"/>
</extension>
</plugin>

---
MANIFEST.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Nativetest
Bundle-SymbolicName: nativetest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: nativetest.Activator
Require-Bundle: org.eclipse.core.runtime, org.eclipse.epsilon.common.dt;bundle-version="0.8.6", org.eclipse.epsilon.eol.engine;bundle-version="0.8.6"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

---
NativeTest.java:

package nativetest;

public class NativeTest {
public String hello() {
return "HELLO FROM NATIVE TEST RUN";
}
}

---
nt.eol:

'START'.println();
var x := new Native('nativetest.NativeTest');
x.println();
x.hello().println();
Re: Trouble accessing java objects [message #573819 is a reply to message #573779] Wed, 12 August 2009 12:59 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Ivosh,

This is the expected behaviour as Epsilon couldn't possibly know
anything about your plugin until it is activated (i.e. in a runtime
workbench).

Cheers,
Dimitris

Ivosh Musil wrote:
> Hi All
>
> I tried to use some native Java class in EOL but I haven't success. Even
> I used Dimitrios's and Louis's document named "Epsilon Tools" even
> information from this thread - if I start attached "nt.eol" script from
> inside of Eclipse, I will get error is "Type 'nativetest.NativeTest' not
> found". But if I start it from "generated" Eclipse application, script
> work ok.
>
> Probably I must be something overlooking ... can someone take a look to
> attached sources and help me?
>
>
> Thanks in advance
>
> ---
> Ivo(sh)
>
>
>
> Versions:
>
> Eclipse Galileo Modeling Suite / Epsilon 0.8.6 on Linux 64bit
>
> ---
> plugin.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
> <extension point="org.eclipse.epsilon.common.dt.tool">
> <tool class="nativetest.NativeTest" defaultName="nativetest"/>
> </extension>
> </plugin>
>
> ---
> MANIFEST.MF:
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Nativetest
> Bundle-SymbolicName: nativetest;singleton:=true
> Bundle-Version: 1.0.0.qualifier
> Bundle-Activator: nativetest.Activator
> Require-Bundle: org.eclipse.core.runtime,
> org.eclipse.epsilon.common.dt;bundle-version="0.8.6",
> org.eclipse.epsilon.eol.engine;bundle-version="0.8.6"
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>
> ---
> NativeTest.java:
>
> package nativetest;
>
> public class NativeTest {
> public String hello() {
> return "HELLO FROM NATIVE TEST RUN";
> }
> }
>
> ---
> nt.eol:
>
> 'START'.println();
> var x := new Native('nativetest.NativeTest');
> x.println();
> x.hello().println();
>
>
Re: Trouble accessing java objects [message #573933 is a reply to message #479765] Wed, 12 August 2009 13:42 Go to previous message
Ivo(sh) Musil is currently offline Ivo(sh) MusilFriend
Messages: 17
Registered: July 2009
Junior Member
Hi Dimitris

> This is the expected behaviour as Epsilon couldn't possibly know
> anything about your plugin until it is activated (i.e. in a runtime
> workbench).

thank for your quick (and easy :-) ) answer. Surely I need more studying
and practice on Eclipse plug-ins.

Ivo(sh)
Previous Topic:[EGL] CrossReferences
Next Topic:[EGL] CrossReferences
Goto Forum:
  


Current Time: Thu Mar 28 12:56:02 GMT 2024

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

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

Back to the top