| Summary: | [RCP] prune message catalogs and icon directories | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jim des Rivieres <jeem> | ||||
| Component: | UI | Assignee: | Andrew Eidsness <eclipse> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | john.arthorne, Kevin_Haaland, michaelvanmeekeren, n.a.edgar, sdavids, Tod_Creasey | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | 3.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jim des Rivieres
*** Bug 55446 has been marked as a duplicate of this bug. *** As bug 55446 points out, also need to check the plugin.properties files, not just messages.properties. This is not on the list for M8. Deferring.... I believe that IBM will send M8 to the translators. This means they will translate these messages twice. Yes, we're going to do this early in M9, and give them the list of files that have dups. *** Bug 61138 has been marked as a duplicate of this bug. *** I've fixed the messages.properties for workbench and ide. There were alot of unused strings (~650) removed from each. There were also a few cases of the keys being used in unusual ways. Although it runs fine, I changed them so that the NSL-search wouldn't get confused. I still have to look into the plugin.properties and icons. I checked the plugin.properties and plugin.xml/fragment.xml for the following projects (I got this list from the platform-ui folder in CVS). plugin.properties in: used by: org.eclipse.ui plugin.xml, carbon/fragment.xml, win32/fragment.xml org.eclipse.ui.editors plugin.xml org.eclipse.ui.ide plugin.xml org.eclipse.ui.intro plugin.xml org.eclipse.ui.jface plugin.xml org.eclipse.ui.jface.text plugin.xml org.eclipse.ui.versioncheck plugin.xml org.eclipse.ui.views plugin.xml org.eclipse.ui.workbench plugin.xml, wb.compat/fragment.xml org.eclipse.ui.workbench.texteditor plugin.xml That looks about right. My script didn't recognize all cases where plugin properties are used, see bug 61720 for more detail. The only part remaining for this one is pruning the icon directories. I want to create a script for this too, but its a bit more involved since the icon images are referenced from many files in source tree. The message and plugin catalogs are relatively easy because they are accessed in a predicable manner. The icons are problematic since access of icons is often done through string math etc. I'd like to create a script to do the pruning, so that it can be repeated as needed. This pruning isn't critical for M9, but needs to be done for 3.0. -----
ICONS
-----
I've done a manual search, by first looking in the ui project code (*.java and
*.xml) for references to references gif and bmp files. Then I individually
matched them to files in the project. After that I did a directory search (from
the command line) to find images that aren't used. Finally I checked that I
didn't remove an icon for the disabled state if it existed for the enabled state
(there are some cases where the disabled image is not currently used.
The second exception was with icons duplicated between ui and ide. In several
cases, the ide project contains a duplicate of images that are stored in the ui
project. In some of these cases the IDE code refers to the ui image rather than
the ide image. These icons are listed in a separate section at the end.
Currently, it would be ok to remove these icons from IDE. However, a better
solution is to examine each image and decide for each whether it should exist in
UI or IDE. Then the extra image should be removed and the code updated.
Based on that search the following icons should be removed.
******************************************
JFACE
******************************************
org.eclipse.jface\org\eclipse\jface\images
preference.gif
wizard.gif
org.eclipse.jface\org\eclipse\jface\wizard\images
error.gif
******************************************
UI
******************************************
org.eclipse.ui\icons\full\dlcl16
addbkmrk_tsk.gif
alpha_mode.gif
apply_ps.gif
edittsk_tsk.gif
filter_tsk.gif
graph_mode.gif
list_mode.gif
popup_menu.gif
rembkmrk_tsk.gif
remtsk_tsk.gif
scrollend.gif
scrollhome.gif
scroll_lft.gif
scroll_rt.gif
showbasic_ps.gif
showcategory_ps.gif
showexpert_ps.gif
showparents_mode.gif
showsync_rn.gif
stop_nav.gif
org.eclipse.ui\icons\full\dtool16
build_exec.gif
debug_exec.gif
exportdir_wiz.gif
exportzip_wiz.gif
importdir_wiz.gif
importzip_wiz.gif
move_edit.gif
newfile_wiz.gif
newfolder_wiz.gif
newprj_wiz.gif
new_page.gif
new_wiz.gif
next_nav.gif
prefs_misc.gif
prev_nav.gif
rename_edit.gif
run_exec.gif
search_src.gif
org.eclipse.ui\icons\full\elcl16
addbkmrk_tsk.gif
alpha_mode.gif
apply_ps.gif
edittsk_tsk.gif
filter_tsk.gif
graph_mode.gif
list_mode.gif
popup_menu.gif
rembkmrk_tsk.gif
remtsk_tsk.gif
scrollend.gif
scrollhome.gif
scroll_lft.gif
scroll_rt.gif
showbasic_ps.gif
showcategory_ps.gif
showerr_tsk.gif
showexpert_ps.gif
showparents_mode.gif
showsync_rn.gif
showtsk_tsk.gif
showwarn_tsk.gif
stop_nav.gif
org.eclipse.ui\icons\full\etool16
build_exec.gif
debug_exec.gif
exportdir_wiz.gif
exportzip_wiz.gif
importdir_wiz.gif
importzip_wiz.gif
move_edit.gif
newfile_wiz.gif
newfolder_wiz.gif
newprj_wiz.gif
new_page.gif
new_wiz.gif
next_nav.gif
prefs_misc.gif
prev_nav.gif
rename_edit.gif
run_exec.gif
search_src.gif
org.eclipse.ui\icons\full\eview16
editor_view.gif
opensame_persp.gif
replace_persp.gif
resource_persp.gif
running.gif
org.eclipse.ui\icons\full\obj16
cfldr_obj.gif
cprj_obj.gif
dots_button.gif
element_obj.gif
locked_ind.gif
prj_obj.gif
probmrk_tsk.gif
warning.gif
welcome_banner.gif
welcome_editor.gif
welcome_item.gif
workset.gif
org.eclipse.ui\icons\full\ovr16
linkwarn_ovr.gif
link_ovr.gif
pinned_ovr.gif
org.eclipse.ui\icons\full\progress
back.gif
progressspin.gif
running.gif
runstate.gif
******************************************
IDE
******************************************
org.eclipse.ui.ide\icons\full\dlcl16
addbkmrk_tsk.gif
alpha_mode.gif
apply_ps.gif
backward_nav.gif
close_view.gif
collapseall.gif
defaults_ps.gif
edittsk_tsk.gif
filter_tsk.gif
forward_nav.gif
graph_mode.gif
home_nav.gif
linkto_help.gif
list_mode.gif
min_view.gif
pin_view.gif
popup_menu.gif
rembkmrk_tsk.gif
remtsk_tsk.gif
scrollend.gif
scrollhome.gif
scroll_lft.gif
scroll_rt.gif
showbasic_ps.gif
showcategory_ps.gif
showcomplete_tsk.gif
showexpert_ps.gif
showparents_mode.gif
showsync_rn.gif
step_current.gif
step_done.gif
stop_nav.gif
synced.gif
tree_mode.gif
up_nav.gif
view_menu.gif
org.eclipse.ui.ide\icons\full\dtool16
copy_edit.gif
cut_edit.gif
debug_exec.gif
delete_edit.gif
move_edit.gif
new_page.gif
paste_edit.gif
pin_editor.gif
prefs_misc.gif
print_edit.gif
redo_edit.gif
rename_edit.gif
run_exec.gif
saveall_edit.gif
saveas_edit.gif
save_edit.gif
undo_edit.gif
org.eclipse.ui.ide\icons\full\elcl16
addbkmrk_tsk.gif
alpha_mode.gif
apply_ps.gif
backward_nav.gif
close_view.gif
defaults_ps.gif
edittsk_tsk.gif
filter_ps.gif
filter_tsk.gif
forward_nav.gif
graph_mode.gif
home_nav.gif
linkto_help.gif
list_mode.gif
min_view.gif
pin_view.gif
popup_menu.gif
rembkmrk_tsk.gif
remtsk_tsk.gif
scrollend.gif
scrollhome.gif
scroll_lft.gif
scroll_rt.gif
showbasic_ps.gif
showcategory_ps.gif
showcomplete_tsk.gif
showerr_tsk.gif
showexpert_ps.gif
showparents_mode.gif
showsync_rn.gif
showtsk_tsk.gif
showwarn_tsk.gif
stop_nav.gif
tree_mode.gif
up_nav.gif
view_menu.gif
org.eclipse.ui.ide\icons\full\etool16
copy_edit.gif
cut_edit.gif
debug_exec.gif
delete_edit.gif
move_edit.gif
new_page.gif
paste_edit.gif
pin_editor.gif
prefs_misc.gif
print_edit.gif
redo_edit.gif
rename_edit.gif
run_exec.gif
saveall_edit.gif
saveas_edit.gif
save_edit.gif
undo_edit.gif
org.eclipse.ui.ide\icons\full\eview16
defaultview_misc.gif
default_persp.gif
editor_view.gif
new_persp.gif
opensame_persp.gif
outline_co.gif
prop_ps.gif
replace_persp.gif
running.gif
org.eclipse.ui.ide\icons\full\obj16
activity.gif
activity_category.gif
add_obj.gif
blank.gif
cfldr_obj.gif
change_obj.gif
delete_obj.gif
dots_button.gif
elements_obj.gif
element_obj.gif
file_obj.gif
fldr_obj.gif
locked_ind.gif
menu.gif
probmrk_tsk.gif
submenu.gif
toolbar.gif
org.eclipse.ui.ide\icons\full\ovr16
pinned_ovr.gif
org.eclipse.ui.ide\icons\full\progress
back.gif
errorstate.gif
lockedstate.gif
progress100.gif
progress20.gif
progress40.gif
progress60.gif
progress80.gif
progressspin.gif
running.gif
runstate.gif
sleeping.gif
waiting.gif
org.eclipse.ui.ide\icons\full\wizban
saveas_wiz.gif
******************************************
IDE - duplicated between IDE and UI, but IDE uses the image from UI
******************************************
org.eclipse.ui.ide\icons\full\dlcl16
addtsk_tsk.gif
filter_ps.gif
gotoobj_tsk.gif
refresh_nav.gif
selected_mode.gif
showchild_mode.gif
showerr_tsk.gif
showtsk_tsk.gif
showwarn_tsk.gif
org.eclipse.ui.ide\icons\full\dtool16
export_wiz.gif
import_wiz.gif
org.eclipse.ui.ide\icons\full\elcl16
addtsk_tsk.gif
collapseall.gif
gotoobj_tsk.gif
refresh_nav.gif
selected_mode.gif
showchild_mode.gif
showcomplete_tsk.gif
step_current.gif
step_done.gif
synced.gif
org.eclipse.ui.ide\icons\full\etool16
export_wiz.gif
import_wiz.gif
org.eclipse.ui.ide\icons\full\obj16
bkmrk_tsk.gif
complete_tsk.gif
header_complete.gif
header_priority.gif
hprio_tsk.gif
incomplete_tsk.gif
lprio_tsk.gif
taskmrk_tsk.gif
org.eclipse.ui.ide\icons\full\wizban
exportdir_wiz.gif
exportzip_wiz.gif
importdir_wiz.gif
importzip_wiz.gif
newfile_wiz.gif
newfolder_wiz.gif
newprj_wiz.gif
new_wiz.gif
The message catalogs, plugin properties, and icons have been checked. All changes submitted to HEAD. Do we need to worry about binary compatibility with any of these icons? I think that we would need to worry about binary compatibility only if we support the case were client's build strings on their own and then reach into the ui bundle to retrieve the resource. I don't think that's something we support (but correct me if I'm wrong). What we do support is people using an API constant to get the filename and then reaching into the ui bundle for the image. I didn't remove any images that were referred to by constants (even if we don't use the constant), so that will still work. AFAIK, we don't even expose the file paths directly in any constants (API or internal). ISharedImages (API) and IWorkbenchGraphicConstants (internal) define constants for icons, but these are just symbolic names. They're mapped to file names in WorkbenchImages' initialization code. The only images that are considered API are the ones defined in ISharedImages. However, I know that some apps also look for some of the ones defined in IWorkbenchGraphicConstants. I think we should ensure that these all still work, even if not currently used by the workbench itself. I agree with keeping the disabled variants even if not currently used by the workbench (and we would need to keep any that were API regardless). This fix deleted all of the Ole error messages used by the win32 plug-in. Reopening so that we can recheck for any more deleted messages. I will restore the Ole messages for 3.0.1. Note that the .win32 fragment is currently applied to the o.e.ui.ide plugin, not o.e.ui. The carbon fragment has its own message bundle, unless that causes a problem it might be a good idea to create one in the win32 fragment to prevent this problem next time. Also, I found that ide and views each have a reference to WorkbenchMessages. The strings exist in workbench string catalog so things work properly, however since each of the projects already has their own bundle I think these references should be updated (CopyPropertyAction and IDE). Then those messages will have to be moved out of WorkbenchMessages. +1 for the changes proposed in comment #20. Created attachment 12911 [details]
zip with patches
I found that the views and ide plugins each had a case of using the workbench
message catalog. The attached patches move those messages to the views and ide
plugins.
We can submit these when the 3.1/3.0.1 issues are resolved, I'm just attaching
patches for now.
Tod has restored the OLE messages in bug 63546. The only thing left to fix this bug is to apply the patches (once the streams are sorted out). fixed? fixed? The patches have been submitted to HEAD. Michael, should this go into 3.0.1 as well? not for 3.0.1 There's nothing left to do for this one (the 3.1 fix was submitted this morning) . Verified on 200408090800. |