Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » A Question about JET Tutorial 1
A Question about JET Tutorial 1 [message #427621] Tue, 24 February 2009 16:09 Go to next message
Williams Mising name is currently offline Williams Mising nameFriend
Messages: 60
Registered: July 2009
Member
I am new to JET and would like to following the tutorial. But I have
question as follow:
Where should I copy the following code?

>We can create an instance of the HelloWorldTemplate template implementation
>class and invoke its generate method like this:

> HelloWorldTemplate helloworld = new HelloWorldTemplate();
> String result = helloworld.generate(null);
> System.out.println(result);

In the template, HelloWorldTemplate, or a new java file? How to run the
generated file? Thanks.
Williams.
Re: A Question about JET Tutorial 1 [message #427622 is a reply to message #427621] Tue, 24 February 2009 17:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Williams,

For any .java file that contains a main() method, you'll be able, from
the editor or on the file itself in the explorer, to invoke "Run
As->Java Application"


Williams wrote:
> I am new to JET and would like to following the tutorial. But I have
> question as follow:
> Where should I copy the following code?
>
>> We can create an instance of the HelloWorldTemplate template
>> implementation class and invoke its generate method like this:
>
>> HelloWorldTemplate helloworld = new HelloWorldTemplate();
>> String result = helloworld.generate(null);
>> System.out.println(result);
>
> In the template, HelloWorldTemplate, or a new java file? How to run
> the generated file? Thanks.
> Williams.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: A Question about JET Tutorial 1 [message #427630 is a reply to message #427622] Wed, 25 February 2009 02:53 Go to previous messageGo to next message
Williams Mising name is currently offline Williams Mising nameFriend
Messages: 60
Registered: July 2009
Member
Thanks, Ed. I got the following link:
http://www.eclipse.org/articles/Article-JET/jet_tutorial1.ht ml

when I typed jet tutorial 1 in google, which seems obsolete.
Now I know how to do it. Thanks.
W.

Ed Merks wrote:

> Williams,

> For any .java file that contains a main() method, you'll be able, from
> the editor or on the file itself in the explorer, to invoke "Run
> As->Java Application"


> Williams wrote:
>> I am new to JET and would like to following the tutorial. But I have
>> question as follow:
>> Where should I copy the following code?
>>
>>> We can create an instance of the HelloWorldTemplate template
>>> implementation class and invoke its generate method like this:
>>
>>> HelloWorldTemplate helloworld = new HelloWorldTemplate();
>>> String result = helloworld.generate(null);
>>> System.out.println(result);
>>
>> In the template, HelloWorldTemplate, or a new java file? How to run
>> the generated file? Thanks.
>> Williams.
>>
Re: A Question about JET Tutorial 1 [message #427985 is a reply to message #427621] Mon, 09 March 2009 12:37 Go to previous messageGo to next message
Michael Piefel is currently offline Michael PiefelFriend
Messages: 12
Registered: July 2009
Junior Member
"Williams " <cool_go_blue@yahoo.com> schrieb im Newsbeitrag
news:007e2e299b6470a11eed0306fbb1960b$1@www.eclipse.org...
>I am new to JET and would like to following the tutorial.

I, too, have a question. I cannot follow the tutorial. I do not seem to have
JET installed. I have tons of EMF plugins now, but there is no such thing as
a JET nature or any JET preferences. Where do I fail?

Bye,
Mike
--
Michael Piefel
netCCM GmbH
Re: A Question about JET Tutorial 1 [message #427987 is a reply to message #427985] Mon, 09 March 2009 12:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Mike,

Is org.eclipse.emf.codegen installed? That's where JET is located. If
org.eclipse.emf.codegen.ui is installed, then you should be able to add
a jet nature to your Java project.


Michael Piefel wrote:
> "Williams " <cool_go_blue@yahoo.com> schrieb im Newsbeitrag
> news:007e2e299b6470a11eed0306fbb1960b$1@www.eclipse.org...
>> I am new to JET and would like to following the tutorial.
>
> I, too, have a question. I cannot follow the tutorial. I do not seem
> to have JET installed. I have tons of EMF plugins now, but there is no
> such thing as a JET nature or any JET preferences. Where do I fail?
>
> Bye,
> Mike


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: A Question about JET Tutorial 1 [message #427991 is a reply to message #427987] Mon, 09 March 2009 14:08 Go to previous messageGo to next message
Michael Piefel is currently offline Michael PiefelFriend
Messages: 12
Registered: July 2009
Junior Member
"Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
news:gp334d$ek6$4@build.eclipse.org...
> Is org.eclipse.emf.codegen installed? That's where JET is located. If
> org.eclipse.emf.codegen.ui is installed, then you should be able to add a
> jet nature to your Java project.


Yes, both are installed (version *_2.4.0.v200902171115). Still, no JET can
be seen anywhere in Eclipse.

I remember that it did work quite some time ago when I first looked at it.
The tutorial is also a few years old. Did something fundamental change?

Bye,
Mike
--
Michael Piefel
netCCM GmbH
Re: A Question about JET Tutorial 1 [message #427993 is a reply to message #427991] Mon, 09 March 2009 14:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Mike,

It should still work with File->New->Other..->Java Emitter
Templates->Convert Projects to JET Projects... Isn't that available?


Michael Piefel wrote:
> "Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
> news:gp334d$ek6$4@build.eclipse.org...
>> Is org.eclipse.emf.codegen installed? That's where JET is located.
>> If org.eclipse.emf.codegen.ui is installed, then you should be able
>> to add a jet nature to your Java project.
>
>
> Yes, both are installed (version *_2.4.0.v200902171115). Still, no JET
> can be seen anywhere in Eclipse.
>
> I remember that it did work quite some time ago when I first looked at
> it. The tutorial is also a few years old. Did something fundamental
> change?
>
> Bye,
> Mike


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: A Question about JET Tutorial 1 [message #428092 is a reply to message #427993] Tue, 10 March 2009 10:02 Go to previous message
Michael Piefel is currently offline Michael PiefelFriend
Messages: 12
Registered: July 2009
Junior Member
"Ed Merks" <Ed.Merks@gmail.com> schrieb im Newsbeitrag
news:gp39u2$b61$1@build.eclipse.org...
> It should still work with File->New->Other..->Java Emitter
> Templates->Convert Projects to JET Projects... Isn't that available?


No, it was not available. However, I downloaded and installed a fresh
Eclipse and added the two EMF Codegen plugins to it, et voilà, it started
working again.

Eclipse seems to be like Windows used to be, a fresh install from time to
time works wonders. The amount of time I spent hunting for plugin yesterday
is quite sad, but I thank you for confirming that I already had the right
plugins in view.

Bye,
Mike

--
Michael Piefel
netCCM GmbH
Previous Topic:Possible EObjectResolvingEList.addAll() / didChange() NPE bug?
Next Topic:EcoreUitl.resolveAll
Goto Forum:
  


Current Time: Tue Apr 16 17:25:05 GMT 2024

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

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

Back to the top