Community
Participate
Working Groups
[Trace Project] Remove duplicate/unused messages In preparation for 4.5 translation, remove unused messages from resource bundles to reduce translation costs. Note: This defect should be completed before the first 4.5 translation drop. To find the duplicate/unused messages in resource bundles located in the source tree(s) of a plug-in: <right click the plug-in> >> Source >> File broken externalize strings. The unused messages in plugin.properties resource bundle for all of the Trace Project plug-ins: Note: The plugin.properties resource bundle should only contain messages for the this plug-in's MANIFEST.MF and plugin.xml files. If the plugin.properties resource bundle contains messages used in the source tree(s) of a plug-in, those messages need to me moved to a resource bundle located in the source tree of a plug-in using the Eclipse 3.1 message bundle format (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=127273#c0). org.eclipse.hyades.trace.views: 59 7 5 60 org.eclipse.tptp.trace.api.doc.isv: plugin.provider org.eclipse.tptp.trace.arm.ui: ARM_ANALYSIS_DESC org.eclipse.tptp.trace.doc.isv: 14 13 29 30 org.eclipse.tptp.trace.examples.isv: 28 27 26 25 20 9 8 19 7 18 6 17 5 16 15 47 46 45 1 12 44 11 43 10 42 41 40 39 38 37 36 35 34 33 32 31 org.eclipse.tptp.trace.jvmti.client: JVMTI_ANALYSIS_TYPE_TOOLTIP_THRD_STATES JVMTI_ANALYSIS_TYPE_VIEW_THRD_STATES JVMTI_ANALYSIS_TYPE_TOOLTIP_CALL_STACK JVMTI_ANALYSIS_TYPE_VIEW_HEAP
Created attachment 88270 [details] Patch to remove all unused Strings
Created attachment 88271 [details] Removed Strings Log This log keeps record of all the removed strings.
(In reply to comment #1) > Created an attachment (id=88270) [details] > Patch to remove all unused Strings > Ritwik, the patch does not apply to the latest CVS HEAD code. Some files does not exist anymore. Would you please synchronize with the lastest CVS code and make sure your patch is up-to-dated? Thanks.
Created attachment 91391 [details] patch Ritwik, I use your patch named 216576patch_trace.txt in bug 216576 as a base and created a more updated patch. It does not include any non-messages related changes (eg .project file) in it. However, I see the following problem in your patch: FILE : /org.eclipse.tptp.trace.arm/src-arm-core/org/eclipse/tptp/trace/arm/internal/ArmMessages.properties Following strings are used in the code but removed in your patch. InputParameter_NotNull_ERROR_=IWAT0508E Input parameter {0} cannot be null. InputParameter_NoBlanks_ERROR_=IWAT0509E The {0} cannot contain trailing blank characters. InputParameter_IndexOutOfBounds_ERROR_=IWAT0510E The {0} array has been accessed with an illegal index. InputParameter_LengthNotMatch_ERROR_=IWAT0511E The {0} is restricted to a maximum length of {1} characters and must not be zero-length. InputParameter_ArmProperty_Reserved_ERROR_=IWAT0512E According to the OpenGroup ARM Specification, an ArmProperty may not be prefixed with 'ARM:'. This is reserved for the ARM specification. InputParameter_ArmIdentityProperties_LenghtNotMatch_ERROR_=IWAT0513E The length of the values must match the length of the provided names in order to associate the two data sets. InputParameter_ArmIdentityProperties_IndexNotInRange_ERROR_=IWAT0514E Index not in range of size of array {0} object. InputParameter_TPTPArmCorrelator_TypeNotMatch_Current_ERROR_=IWAT0515E The current correlator must be an instance of TPTPArmCorrelator. Instance of {0} was found. InputParameter_TPTPArmCorrelator_TypeNotMatch_Parent_ERROR_=IWAT0516E The parent correlator must be an instance of TPTPArmCorrelator. Instance of {0} was found. FILE: /org.eclipse.tptp.trace.memory.ui/src/org/eclipse/tptp/trace/memory/internal/views/Messages.java compile failure in the removal of strings
Created attachment 91401 [details] Updated Patch I have redone the patch. I think this one should work better than the previous one.
(In reply to comment #5) > Created an attachment (id=91401) [details] > Updated Patch > > I have redone the patch. I think this one should work better than the previous > one. > Ritwik. You have removed the following strings under file FILE : /org.eclipse.tptp.trace.arm/src-arm-core/org/eclipse/tptp/trace/arm/internal/ArmMessages.properties which is used in the Java code. Do a search within workspace and you should see how they are used: eg. InputParameter_NotNull_ERROR_ is used in org.eclipse.tptp.trace.arm.internal.transaction.ArmApplicationDefinitionImpl.validateName(String) InputParameter_NotNull_ERROR_=IWAT0508E Input parameter {0} cannot be null. InputParameter_NoBlanks_ERROR_=IWAT0509E The {0} cannot contain trailing blank characters. InputParameter_IndexOutOfBounds_ERROR_=IWAT0510E The {0} array has been accessed with an illegal index. InputParameter_LengthNotMatch_ERROR_=IWAT0511E The {0} is restricted to a maximum length of {1} characters and must not be zero-length. InputParameter_ArmProperty_Reserved_ERROR_=IWAT0512E According to the OpenGroup ARM Specification, an ArmProperty may not be prefixed with 'ARM:'. This is reserved for the ARM specification. InputParameter_ArmIdentityProperties_LenghtNotMatch_ERROR_=IWAT0513E The length of the values must match the length of the provided names in order to associate the two data sets. InputParameter_ArmIdentityProperties_IndexNotInRange_ERROR_=IWAT0514E Index not in range of size of array {0} object. InputParameter_TPTPArmCorrelator_TypeNotMatch_Current_ERROR_=IWAT0515E The current correlator must be an instance of TPTPArmCorrelator. Instance of {0} was found. InputParameter_TPTPArmCorrelator_TypeNotMatch_Parent_ERROR_=IWAT0516E The parent correlator must be an instance of TPTPArmCorrelator. Instance of {0} was found. and same compilation errors in org.eclipse.tptp.trace.memory.internal.views.Messages
Also the messages under org.eclipse.tptp.trace.report.birt.ui.internal.Messages.java that are removed in your patch are actually used by the template (please read the comment in the file for detail).
Created attachment 91682 [details] Patch #2 I believe this patch should do the cleanup better than the previous ones. I had checked all strings before deleting them to ensure nothing got deleted that was being used. =)
Ritwik, 1. In org.eclipse.tptp.trace.jvmti.internal.client.views.UIMessages.java _Not_Started is removed, but its corresponding entry in org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/messages.properties is not removed. 2. Similar problem happens in /org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/internal/messages.properties and org.eclipse.hyades.trace.views.internal.TraceUIMessages.java 3. In /org.eclipse.tptp.trace.arm/src-arm-core/org/eclipse/tptp/trace/arm/internal/ArmMessages.properties ARM_ERROR_MESSAGE_-6=IWAT0517E The current application instance has halted. The application had ended. ARM_ERROR_MESSAGE_-7=IWAT0518E ArrayIndexOutOfBoundsException indicates that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array. ARM_ERROR_MESSAGE_-8=IWAT0519E Attempting to start a subtransaction where the parent correlator is null. ARM_ERROR_MESSAGE_-9=IWAT0520E The client is not yet monitoring the data collection agent. Cannot start the transaction. ARM_ERROR_MESSAGE_-10=IWAT0521E IllegalArgumentException indicates that a method has been passed an illegal or inappropriate argument. ARM_ERROR_MESSAGE_-11=IWAT0522E UnknownHostException indicates that the IP address of a host could not be determined. ARM_ERROR_MESSAGE_-12=IWAT0523E NullPointerException indicates the application attempted to use null where an object is required. ARM_ERROR_MESSAGE_-13=IWAT0524E QueueClosedException indicates that a queue has been closed. Unable to add the new ARM transaction to the Tranasaction Manager. ARM_ERROR_MESSAGE_-14=IWAT0525E Unable to use reflection to determine the ARM Interface and ARM Method that observed an error. are build on runtime, please read the comment in the file for detail. They should be kept.
Created attachment 92213 [details] Patch #3 Hope this works :)
Created attachment 92217 [details] Patch #3.1 Please disregard the previous patch, I accidently uploaded the wrong patch :(
Created attachment 92226 [details] updated patch attached patch is committed to HEAD.
bug fixed.
*** Bug 212039 has been marked as a duplicate of this bug. ***
Verified in CVS (HEAD). Closing.