[JET2] Re: JET2: Invalid Java source folder [message #27784] |
Fri, 20 July 2007 14:04 |
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 #27988 is a reply to message #27784] |
Mon, 23 July 2007 19:10 |
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 #28106 is a reply to message #27988] |
Tue, 24 July 2007 04:11 |
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04784 seconds