Bug 127277 - [Infrastructure]Convert plug-ins to Eclipse 3.1 message bundle format
Summary: [Infrastructure]Convert plug-ins to Eclipse 3.1 message bundle format
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on: 173675
Blocks: 127273
  Show dependency tree
 
Reported: 2006-02-10 11:01 EST by Valentina Popescu CLA
Modified: 2016-05-05 10:31 EDT (History)
8 users (show)

See Also:


Attachments
Unused keys in Test Project Java property files (27.42 KB, application/octet-stream)
2007-02-01 14:11 EST, Paul Slauenwhite CLA
no flags Details
Unused keys in Test Project plug-in property files (15.67 KB, application/octet-stream)
2007-02-01 14:13 EST, Paul Slauenwhite CLA
no flags Details
Unused keys in Test Project Java property files (14.50 KB, application/octet-stream)
2007-02-02 08:04 EST, Paul Slauenwhite CLA
no flags Details
Unused keys in Test Project plug-in property files (15.45 KB, application/octet-stream)
2007-02-02 08:05 EST, Paul Slauenwhite CLA
no flags Details
Unused keys with references in Test Project Java property files (26.05 KB, application/octet-stream)
2007-02-02 14:13 EST, Paul Slauenwhite CLA
no flags Details
Unused keys with references in Test Project plug-in property files (11.57 KB, application/octet-stream)
2007-02-02 14:13 EST, Paul Slauenwhite CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valentina Popescu CLA 2006-02-10 11:01:21 EST
This defect is opened to deal with all test plugins; please open point defects if required for the Test project plugin owners

The defect that groups together all defects on this subject is 127273

Standard Java ResourceBundles have quite inefficient space characteristics.
Since a running Eclipse tends to have many externalized messages, the eclipse
team has implemented a new message bundle to be used starting with Eclipse 3.1.

For more information go to
http://dev.eclipse.org/viewcvs/index.cgi/platform-core-home/documents/3.1/message_bundles.html?rev=1.9

Note that Eclipse provides an automated tool that generates the new message
bundle from the existing one. The steps are defined in the above page link,
under the Tools Conversion section.

These are the steps for moving to the new bundle ( the conversion tool would
cover steps 1-3 ):

1.Identify the strings in plugin.properties that are not used in the plugin.xml
file

2. Create one or more message.properties files per plugin, to store these
strings

3. For each message.properties file, you should define a peer Message java
class that will be used to retrieve the string

4. Optionally- but a great improvement if this is done- update the string key
to a short string
Example:

Old key:
LOG_COMPONENT_IDENTIFICATION_INVALID_LOCATION_TYPE_EXC_ = IWAT0212E The
component identification with component named [{0}] has an invalid location
type: [{1}] 
New key:
_1 = IWAT0212E The component identification with component named [{0}] has an
invalid location type: [{1}]

Code sample:

package org.eclipse.hyades.logging.adapter.ui.internal.util;
import org.eclipse.osgi.util.NLS;

public final class AdapterUIMessages extends NLS {

 private static final String BUNDLE_NAME =
"org.eclipse.hyades.logging.adapter.ui.internal.util.messages";//$NON-NLS-1$

 private UIMessages() {
  // Do not instantiate
 }

 public static String _1;
 public static String _2;

 static {
  NLS.initializeMessages(BUNDLE_NAME, UIMessages.class);
 }
}

messages.properties:
_1   = &Timezone GMT offset:
_2   = &Log file creation date for file {0}:


Old code:
public class MyClass {
   public void myMethod() {
      String message;
      ...
Comment 1 Paul Slauenwhite CLA 2006-08-09 09:11:45 EDT
Please assign to me.
Comment 2 Valentina Popescu CLA 2006-08-09 09:59:39 EDT
update owner
Comment 3 Paul Slauenwhite CLA 2006-10-05 07:22:39 EDT
Cannot contain in 4.3 i2.
Comment 4 Paul Slauenwhite CLA 2006-10-16 09:21:02 EDT
Due to the extensiveness and nature of the fix requires for this defect, this defect is being considered for deferral from 4.3.  If you object to this deferral, please provide a comment ASAP explaining the reason that you need this in 4.3 and we will take that into consideration.
Comment 5 Valentina Popescu CLA 2006-10-16 09:37:58 EDT
I have to agree with you that this fix cannot be contained in 4.3 at this time since we are almost GA ready

The defect has been opened a while ago though to deal with a performance improvement provided by the Eclipse platform in Eclipse 3.1. Every project has been asked by the Eclipse Architecture group to apply this fix as soon as possible

This defect has slipped the 4.2 driver and it seems that is going to be deffered one more time; we should come up with a plan to have this fix applied sooner in the development cycle so that we can eventually contain it in the next release
Comment 6 Paul Slauenwhite CLA 2006-10-20 14:53:05 EDT
Please target to 4.4 since all non-blocking/critical defects will be deferred as decided in today's AG call.
Comment 7 Paul Slauenwhite CLA 2006-10-20 16:08:37 EDT
Retargeting to 4.4 as decided in today's AG call (only permitting blocking and critical defects in 4.3 i3).
Comment 8 Paul Slauenwhite CLA 2006-12-07 16:39:28 EST
See http://www.eclipse.org/tptp/home/documents/process/development/translation_rules_of_thumb.html for more information.
Comment 9 Paul Slauenwhite CLA 2007-02-01 14:11:57 EST
Created attachment 58043 [details]
Unused keys in Test Project Java property files
Comment 10 Paul Slauenwhite CLA 2007-02-01 14:13:05 EST
Created attachment 58044 [details]
Unused keys in Test Project plug-in property files
Comment 11 Paul Slauenwhite CLA 2007-02-02 08:04:47 EST
Created attachment 58109 [details]
Unused keys in Test Project Java property files
Comment 12 Paul Slauenwhite CLA 2007-02-02 08:05:22 EST
Created attachment 58110 [details]
Unused keys in Test Project plug-in property files
Comment 13 Paul Slauenwhite CLA 2007-02-02 12:04:28 EST
Adding Test Project lead committers to CC list to track updates make to their components.
Comment 14 Paul Slauenwhite CLA 2007-02-02 12:53:43 EST
Step 1a) Removed all unused keys in Test Project Java property files.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=127277#c11 for files affected.
Comment 15 Paul Slauenwhite CLA 2007-02-02 14:04:22 EST
Step 1b) Removed all unused keys in Test Project plug-in property files.  See
https://bugs.eclipse.org/bugs/show_bug.cgi?id=127277#c12 for files affected.
Comment 16 Paul Slauenwhite CLA 2007-02-02 14:13:31 EST
Created attachment 58138 [details]
Unused keys with references in Test Project Java property files
Comment 17 Paul Slauenwhite CLA 2007-02-02 14:13:54 EST
Created attachment 58139 [details]
Unused keys with references in Test Project plug-in property files
Comment 18 Paul Slauenwhite CLA 2007-02-05 06:41:10 EST
Will roll this defect out over two iterations due to the number and breadth of the changes.  Moving to i2.
Comment 19 Paul Slauenwhite CLA 2007-03-15 14:33:50 EDT
Completed:

org.eclipse.tptp.test.samples
org.eclipse.tptp.test.tools.api
org.eclipse.tptp.test.auto.gui
Comment 20 Paul Slauenwhite CLA 2007-03-15 14:59:26 EDT
Completed: 

org.eclipse.tptp.test.report.birt
org.eclipse.tptp.test.report.birt.ui
Comment 21 Paul Slauenwhite CLA 2007-03-15 15:54:03 EDT
Completed:

org.eclipse.hyades.test.ui.extensions
Comment 22 Paul Slauenwhite CLA 2007-03-15 21:34:00 EDT
Completed:

org.eclipse.hyades.test.tools.ui
Comment 23 Paul Slauenwhite CLA 2007-03-15 22:56:51 EDT
Completed:

org.eclipse.hyades.test.tools.ui
Comment 24 Paul Slauenwhite CLA 2007-03-15 23:07:14 EDT
Given the breadth and sensitivity of this change, we will defer the the follow plug-ins to i3:

org.eclipse.hyades.test.core
org.eclipse.hyades.test.tools.core

Comment 25 Paul Slauenwhite CLA 2007-03-15 23:20:50 EDT
Step 2) Moved messages not used in the plug-in's MANIFEST.MF and plugin.xml files to a messages.properties file in the <plugin-id>.internal.resources package.  Using the com.ibm.zrh.eclipse.nls_1.0.0 tool (http://dev.eclipse.org/viewcvs/index.cgi/platform-core-home/documents/3.1/message_bundles.html?revision=1.9),  an Eclipse resource bundle was created for this message file.  

Comment 26 Paul Slauenwhite CLA 2007-03-15 23:24:12 EDT
Step 3) Housecleaning:

-Create new keys and messages for missing message keys.
-Removed duplicate keys.
-Removed unused keys.
-Deprecated accessor methods to a plug-in's plugin.properties files.
-Migrated Java/ICU message formatting to OSGi message binding.

Step 4) Testing, testing and more testing:)
Comment 27 Paul Slauenwhite CLA 2007-03-19 09:16:47 EDT
Given the recent extension to 4.4 i2 development (http://dev.eclipse.org/mhonarc/lists/tptp-testing-tools-dev/msg01003.html), targeting for completion in i2.
Comment 28 Paul Slauenwhite CLA 2007-03-21 20:31:29 EDT
Completed:

org.eclipse.hyades.test.tools.core
Comment 29 Paul Slauenwhite CLA 2007-03-22 07:09:26 EDT
Completed:

org.eclipse.hyades.test.core
Comment 30 Paul Slauenwhite CLA 2007-03-22 10:29:04 EDT
All files checked-in to CVS (HEAD).
Comment 31 Paul Slauenwhite CLA 2007-06-02 14:51:39 EDT
Reporter: Please verify and close in preparation for shutting down the TPTP 4.4 release.  Thanks.
Comment 32 Paul Slauenwhite CLA 2008-06-27 08:53:49 EDT
Closing by default since not closed by the originator in the 7+ months since being resolved.  

Please reopen if the issue is still present in the latest TPTP release or the resolution is not correct.