Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 46576

Summary: [RCP] prune message catalogs and icon directories
Product: [Eclipse Project] Platform Reporter: Jim des Rivieres <jeem>
Component: UIAssignee: 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 Flags
zip with patches none

Description Jim des Rivieres CLA 2003-11-13 10:17:43 EST
Build I20031111

Several of the UI plug-in message catalogs and icon subdirectories were 
duplicated in the course of the RCP split. 

The contents of all message catalogs and and icon directories need to be 
thoroughly reviewed to remove unneeded messages and icons. 

This should be schedule well before the 3.0 message catalogs are sent off to 
the translation centers.
Comment 1 Nick Edgar CLA 2004-03-22 14:02:00 EST
*** Bug 55446 has been marked as a duplicate of this bug. ***
Comment 2 Nick Edgar CLA 2004-03-22 14:02:30 EST
As bug 55446 points out, also need to check the plugin.properties files, not
just messages.properties.
Comment 3 Douglas Pollock CLA 2004-03-25 10:30:41 EST
This is not on the list for M8.  Deferring.... 
Comment 4 Jim des Rivieres CLA 2004-03-25 11:59:05 EST
I believe that IBM will send M8 to the translators. This means they will 
translate these messages twice.
Comment 5 Nick Edgar CLA 2004-03-25 17:43:39 EST
Yes, we're going to do this early in M9, and give them the list of files that
have dups.
Comment 6 Nick Edgar CLA 2004-05-06 09:51:26 EDT
*** Bug 61138 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Eidsness CLA 2004-05-07 17:53:07 EDT
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.
Comment 8 Andrew Eidsness CLA 2004-05-10 15:15:43 EDT
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
Comment 9 Nick Edgar CLA 2004-05-10 17:05:04 EDT
That looks about right.
Comment 10 Andrew Eidsness CLA 2004-05-11 13:18:27 EDT
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.
Comment 11 Andrew Eidsness CLA 2004-05-18 17:09:16 EDT
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.
Comment 12 Andrew Eidsness CLA 2004-05-27 11:45:17 EDT
-----
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
Comment 13 Andrew Eidsness CLA 2004-05-27 11:46:33 EDT
The message catalogs, plugin properties, and icons have been checked.  All 
changes submitted to HEAD.
Comment 14 Jim des Rivieres CLA 2004-05-27 12:15:39 EDT
Do we need to worry about binary compatibility with any of these icons?
Comment 15 Andrew Eidsness CLA 2004-05-27 12:24:17 EDT
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.
Comment 16 Nick Edgar CLA 2004-05-27 13:03:34 EDT
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).
Comment 17 Tod Creasey CLA 2004-06-29 11:52:26 EDT
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.
Comment 18 Tod Creasey CLA 2004-06-29 11:52:50 EDT
I will restore the Ole messages for 3.0.1.
Comment 19 Nick Edgar CLA 2004-06-29 12:38:11 EDT
Note that the .win32 fragment is currently applied to the o.e.ui.ide plugin, not
o.e.ui.
Comment 20 Andrew Eidsness CLA 2004-06-29 12:46:23 EDT
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).
Comment 21 Tod Creasey CLA 2004-06-29 13:10:45 EDT
Then those messages will have to be moved out of WorkbenchMessages.
Comment 22 Nick Edgar CLA 2004-06-29 13:49:01 EDT
+1 for the changes proposed in comment #20.
Comment 23 Andrew Eidsness CLA 2004-06-30 11:35:01 EDT
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.
Comment 24 Andrew Eidsness CLA 2004-06-30 12:07:21 EDT
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).
Comment 25 Michael Van Meekeren CLA 2004-07-05 11:28:11 EDT
fixed?
Comment 26 Michael Van Meekeren CLA 2004-07-05 11:28:14 EDT
fixed?
Comment 27 Andrew Eidsness CLA 2004-07-05 13:13:52 EDT
The patches have been submitted to HEAD.

Michael, should this go into 3.0.1 as well?
Comment 28 Michael Van Meekeren CLA 2004-07-05 16:42:57 EDT
not for 3.0.1
Comment 29 Andrew Eidsness CLA 2004-07-05 16:46:58 EDT
There's nothing left to do for this one (the 3.1 fix was submitted this morning)
.
Comment 30 Andrew Eidsness CLA 2004-08-09 17:19:18 EDT
Verified on 200408090800.