gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 377 forks source link

i18nCreator out parameter adds src to the path - but i need it without src #2625

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 2619

Found in GWT Release:
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/i18n/tools/I18NCreator.java#167

Detailed description:
i use the GWT4NB plugin. and there is the structure
<applicationfolder>/src/java/com/company/application/client

as you see there is a additional java folder. but i can not use the -out
parameter because it adds always the src to the output path.

solution: remove the "src"

Workaround if you have one:
-none-

Links to the relevant GWT Developer Forum posts:

Reported by nietzold on 2008-06-30 15:45:43

dankurka commented 9 years ago
Please take a look at this and schedule accordingly.

Reported by jat+personal@google.com on 2008-06-30 17:25:38

dankurka commented 9 years ago
To recap:
i18nCreator assumes the path is going to be
<applicationfolder>/src/<package path>

whereas the Netbeans plugin creates a java structure as:
<applicationfolder>/src/java/<package path>

I'm a bit reluctant to just remove the 'src' from the generated path, as this is a
tool that works in conjunction with projectCreator, applicationCreator, and
junitCreator which all use this same convention, existing users would be thrown a
curveball.  A way to satisfy this could be to create an extra flag, like: '-nosrcprefix'.

Here are some possible workarounds.  Please take a look at them and let me know how
important it is for us to change the tool.  We are trying to restrict changes to the
1.5 branch to planned changes/fixes and new critical issues:

1) Since this tool is a one-off, You can just move the files into the appropriate
directory.  The generated script that runs I18NSync can be manually edited if you
need to.

2) If you are using GWT 1.5, consider the use of annotations to create your file:

http://code.google.com/p/google-web-toolkit/wiki/I18nAnnotations

(com.google.gwt.i18n.client.LocalizableResource.GenerateKeys);

3) Since the NetBeans plugin has chosen a different directory structure (I conclude
that they must not be using applicationCreator and projectCreator underneath the
skirts), you could ask the NetBeans API to integrate the i18nCreator and i18nSync
like funtionality into their plugin.

Reported by galgwt.reviews on 2008-06-30 18:55:33

dankurka commented 9 years ago
i now use this workaround:

i generate a script with the java prefix java.com.company...
and later i need only to correct the package name

Reported by nietzold on 2008-07-01 10:28:12

dankurka commented 9 years ago

Reported by galgwt.reviews on 2008-07-07 12:58:16