Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362705 - [nls tooling] Externalize Strings... throws exception at updating a messages.properties in a Fragment Project
Summary: [nls tooling] Externalize Strings... throws exception at updating a messages....
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 13:38 EDT by Missing name CLA
Modified: 2012-08-09 05:26 EDT (History)
1 user (show)

See Also:


Attachments
The stacktrace that is written when the problem occurs. (6.92 KB, text/plain)
2011-11-02 13:40 EDT, Missing name CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-11-02 13:38:07 EDT
Build Identifier: 20100917-0705

In an Eclipse RCP application, I want to keep the externalized strings of a Plugin in a separate Fragment.

I can create a new resource bundle in the fragment. But when I try to update an existing resource bundle, an error is written to the Error Log and new strings are not added to Messages class and properties file.

Reproducible: Always

Steps to Reproduce:
1. Create a Plugin Project, for example with name and id set to "my.plugin". 
Set "Rich client application" to Yes and choose "Hello RCP" as template to get some classes generated. All other settings should be left on default values.

2. Create a Fragment Project, for example with name and id set to "my.plugin.nl1".
Enter "my.plugin" as Host Plugin. All other settings should be left on default values.

3. In the fragment project, create the Java Package "my.plugin" (the same package that has been generated for the plugin).

4. Create a local String variable in a Java class of the Plugin, for example in the method createInitialLayout() of the Perspective class.

5. Call "Externalize Strings..."
At "Accessor Class", modify the source folder of the properties file to "my.plugin.nl1/src"

=> The messages.properties, containing the externalized String is created (as expected, everything ok).

6. Create a second local String variable in the Perspective class.

7. Call "Externalize Strings..." again.
At "Accessor Class", modify the source folder of the properties file to "my.plugin.nl1/src" again.

=> Now, an InvocationTargetException is written to the Error Log and the second string has not been added.
Comment 1 Missing name CLA 2011-11-02 13:40:41 EDT
Created attachment 206357 [details]
The stacktrace that is written when the problem occurs.
Comment 2 Dani Megert CLA 2011-11-03 05:57:45 EDT
Deepak, please take a look. We marked two similar bug 244925 and bug 333112 already as WORKSFORME. Also note that we reworked that code a bit for 3.7.
Comment 3 Dani Megert CLA 2012-08-09 05:26:37 EDT
We haven't seen this in latest builds. If you still see this using
http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/
then please attach a concrete test case (plug-in + fragment) and reopen this bug.