Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [JET2] Re: JET2: Invalid Java source folder
[JET2] Re: JET2: Invalid Java source folder [message #27784] Fri, 20 July 2007 10:04 Go to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Thomas,

JET2 has its own newsgroup, which I have included in this reply. Somebody
there should be able to help you (I can't ;-)

Cheers,

Christian


Thomas Kuhn wrote:

> Hi,
>
> When I run the following template:
>
> <ws:project name="myProject">
> <ws:folder path="src">
> <java:package name="org.example">
> <java:resource name="Messages.properties"
> template="templates/myprops.jet"/>
> </java:package>
> </ws:folder>
> </ws:project>
>
> I get this error:
>
> templates/main.jet(24,5): <java:package name="org.example">
> Error: Invalid Java source folder: 'myProject/src'
>
> Project "myProject" and folder "src" are created. However, they look
> like a standard project with a standard folder, not like a Java project
> with source-folder...
>
> Any ideas?
>
> Thanks,
>
> Tom
>
> (JET-SDK-M200707120943, Eclipse 3.3, emf-sdo-xsd-SDK-M200707111516)
Re: [JET2] Re: JET2: Invalid Java source folder [message #27829 is a reply to message #27784] Sat, 21 July 2007 01:54 Go to previous messageGo to next message
Eclipse User
Originally posted by: technovator.gmail.com

Looks like this is the right place to ask questions on JET2. See
http://www.eclipse.org/modeling/m2t/.

Can someone confirms this?

Coming back to original OP, looks like we need custom taglibs that support
java projects for doing this. Is anyone working on this?

-- D
Re: [JET2] Re: JET2: Invalid Java source folder [message #27869 is a reply to message #27829] Sat, 21 July 2007 09:24 Go to previous messageGo to next message
Eclipse User
Originally posted by: eclipse_news.firstnamelastname.ch

I took the transformation from an example [1]. When I create the
java-project and source-folder before running the transformation, it
works fine.

Maybe it should be mentioned in the help to previously create project
and folder in order to run the example code for the <java: /> tags?

[1]
http://help.eclipse.org/help33/topic/org.eclipse.jet.doc/ref erences/taglibs/javaTags/resourceTag.html

Thanks,

Tom.

D wrote:
> Looks like this is the right place to ask questions on JET2. See
> http://www.eclipse.org/modeling/m2t/.
>
> Can someone confirms this?
>
> Coming back to original OP, looks like we need custom taglibs that
> support java projects for doing this. Is anyone working on this?
>
> -- D
>
>
>
Re: [JET2] Re: JET2: Invalid Java source folder [message #27988 is a reply to message #27784] Mon, 23 July 2007 15:10 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Tom:

Eclipse Java projects are more than just the thing constructed by
<ws:project>. There is extra project meta-data stored in normally hidden
files (.project and .classpath) in the project root. You can see these files
by removing the Package Explorer's file on ".* resources".

The <java:class> and <java:resource> tags need this project meta-data to
work. So, a correct solution would be:

<ws:project name="myProject">
<ws:file template="templates/project.jet" path=".project"/>
<ws:file template="tempaltes/classpath.jet" path=".classpath"/>
<ws:folder path="src">
<java:package name="org.example">
<java:resource name="Messages.properties"
template="templates/myprops.jet"/>
</java:package>
</ws:folder>
</ws:project>

You can seed the project.jet and classpath.jet from a manually constructed
Java project that you use as a reference solution for your code generator..
Incidentally, .project files include the name of the project, so you will
have to set that value accordingly.

Paul

> Thomas Kuhn wrote:
>
>> Hi,
>>
>> When I run the following template:
>>
>> <ws:project name="myProject">
>> <ws:folder path="src">
>> <java:package name="org.example">
>> <java:resource name="Messages.properties"
>> template="templates/myprops.jet"/>
>> </java:package>
>> </ws:folder>
>> </ws:project>
>>
>> I get this error:
>>
>> templates/main.jet(24,5): <java:package name="org.example">
>> Error: Invalid Java source folder: 'myProject/src'
>>
>> Project "myProject" and folder "src" are created. However, they look
>> like a standard project with a standard folder, not like a Java project
>> with source-folder...
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Tom
>>
>> (JET-SDK-M200707120943, Eclipse 3.3, emf-sdo-xsd-SDK-M200707111516)
>
Re: [JET2] Re: JET2: Invalid Java source folder [message #28028 is a reply to message #27869] Mon, 23 July 2007 15:14 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Tom:

Feel free to submit JET defects to bugzilla:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2T& version=unspecified&component=Jet&rep_platform=PC&am p;op_sys=Windows%20XP&priority=P3&bug_severity=norma l&bug_status=NEW&bug_file_loc=http%3A%2F%2F&shor t_desc=&comment=&commentprivacy=0&keywords=& dependson=&blocked=&maketemplate=Remember%20values%2 0as%20bookmarkable%20template&form_name=enter_bug&as signed_to=m2t.jet-inbox%40eclipse.org

(sorry for the ugly URL, but it does preset most of the fields for you)

Paul

"Thomas Kuhn" <eclipse_news@firstnamelastname.ch> wrote in message
news:f7t1f9$jgv$1@build.eclipse.org...
>I took the transformation from an example [1]. When I create the
>java-project and source-folder before running the transformation, it works
>fine.
>
> Maybe it should be mentioned in the help to previously create project and
> folder in order to run the example code for the <java: /> tags?
>
> [1]
> http://help.eclipse.org/help33/topic/org.eclipse.jet.doc/ref erences/taglibs/javaTags/resourceTag.html
>
> Thanks,
>
> Tom.
>
> D wrote:
>> Looks like this is the right place to ask questions on JET2. See
>> http://www.eclipse.org/modeling/m2t/.
>>
>> Can someone confirms this?
>>
>> Coming back to original OP, looks like we need custom taglibs that
>> support java projects for doing this. Is anyone working on this?
>>
>> -- D
>>
>>
Re: [JET2] Re: JET2: Invalid Java source folder [message #28106 is a reply to message #27988] Tue, 24 July 2007 00:11 Go to previous messageGo to next message
Eclipse User
Originally posted by: technovator.gmail.com

Paul:

I am interested in the java code generation and planning for implementing
some custom tags to add source folders (an unimplemented stub exists
already for this), classpath etc. What will be the right approach? Start
from JavaCore and implement the equivalent tags or start from the user
actions and implement the tags?

Where is the source code for the automated tests for JET2? I looked into
dev.eclipse.org CVS, but could not find it.

-- D
Re: [JET2] Re: JET2: Invalid Java source folder [message #28260 is a reply to message #28106] Tue, 24 July 2007 08:59 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
D:

I'll get back to you on the best way attack this.

The source is under CVS Root:

/cvsroot/modeling

The plug-ins and features are in:

org.eclipse.m2t/org.eclipse.jet/plugins

Junits are under:

org.eclipse.m2t/org.eclipse.jet/tests

Paul

"D" <technovator@gmail.com> wrote in message
news:7076611dd58c3ecfc2e3027426255288$1@www.eclipse.org...
> Paul:
>
> I am interested in the java code generation and planning for implementing
> some custom tags to add source folders (an unimplemented stub exists
> already for this), classpath etc. What will be the right approach? Start
> from JavaCore and implement the equivalent tags or start from the user
> actions and implement the tags?
>
> Where is the source code for the automated tests for JET2? I looked into
> dev.eclipse.org CVS, but could not find it.
>
> -- D
>
>
Re: [JET2] Re: JET2: Invalid Java source folder [message #29077 is a reply to message #28028] Thu, 26 July 2007 10:07 Go to previous message
Eclipse User
Originally posted by: FIRSTNAME.LASTNAME.sphere.ae

I logged a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=197968

Thanks,

Tom.

Paul Elder wrote:
> Tom:
>
> Feel free to submit JET defects to bugzilla:
>
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2T& version=unspecified&component=Jet&rep_platform=PC&am p;op_sys=Windows%20XP&priority=P3&bug_severity=norma l&bug_status=NEW&bug_file_loc=http%3A%2F%2F&shor t_desc=&comment=&commentprivacy=0&keywords=& dependson=&blocked=&maketemplate=Remember%20values%2 0as%20bookmarkable%20template&form_name=enter_bug&as signed_to=m2t.jet-inbox%40eclipse.org
>
> (sorry for the ugly URL, but it does preset most of the fields for you)
>
> Paul
>
> "Thomas Kuhn" <eclipse_news@firstnamelastname.ch> wrote in message
> news:f7t1f9$jgv$1@build.eclipse.org...
>> I took the transformation from an example [1]. When I create the
>> java-project and source-folder before running the transformation, it works
>> fine.
>>
>> Maybe it should be mentioned in the help to previously create project and
>> folder in order to run the example code for the <java: /> tags?
>>
>> [1]
>> http://help.eclipse.org/help33/topic/org.eclipse.jet.doc/ref erences/taglibs/javaTags/resourceTag.html
>>
>> Thanks,
>>
>> Tom.
>>
>> D wrote:
>>> Looks like this is the right place to ask questions on JET2. See
>>> http://www.eclipse.org/modeling/m2t/.
>>>
>>> Can someone confirms this?
>>>
>>> Coming back to original OP, looks like we need custom taglibs that
>>> support java projects for doing this. Is anyone working on this?
>>>
>>> -- D
>>>
>>>
>
Previous Topic:c:iterate and inheritance in a model
Next Topic:Passing Java objects by reference
Goto Forum:
  


Current Time: Tue Jul 29 00:41:24 EDT 2014

Powered by FUDForum. Page generated in 0.02949 seconds