Bug 105254 - [BIDI] need to add $nl$/ to icon paths for reversed icons
Summary: [BIDI] need to add $nl$/ to icon paths for reversed icons
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: JDT-UI-Inbox CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 105008
  Show dependency tree
 
Reported: 2005-07-26 22:03 EDT by Karice McIntyre CLA Friend
Modified: 2005-08-09 10:32 EDT (History)
5 users (show)

See Also:


Attachments
patch (10.67 KB, patch)
2005-07-27 10:35 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
Patch for LTK (6.85 KB, patch)
2005-07-27 11:15 EDT, Dirk Baeumer CLA Friend
no flags Details | Diff
Modified patch for JDT/UI. (10.94 KB, patch)
2005-07-27 11:39 EDT, Dirk Baeumer CLA Friend
no flags Details | Diff
updated path for jdt.ui (12.14 KB, patch)
2005-07-28 05:28 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
patch for jdt.junit (12.82 KB, patch)
2005-07-28 05:30 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
patch for jdt.ui.examples.projects (3.87 KB, patch)
2005-07-28 05:31 EDT, Martin Aeschlimann CLA Friend
no flags Details | Diff
Updated LTK patch to follow the same schema (8.19 KB, patch)
2005-07-28 05:52 EDT, Dirk Baeumer CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karice McIntyre CLA Friend 2005-07-26 22:03:56 EDT
Target for 3.1.1 release (NL release).

In Eclipse 3.1, icons are being supplied for BiDi locales that will appear as 
if the icon has been reversed.  For all plugins that supply icons, some code 
changes are required to support this that do not appear to be present when 
running Eclipse in a BiDi locale (get BiDi fragments then run Eclipse with 
program argument -nl ar_EG).  The following 2 items need to be checked:
1. Paths to icons/images that can appear flipped must be prefixed with $nl$/ 
(e.g. $nl$/ICON_PATH) - this includes paths to icons and images in plugin.xml.
2. Must use Platform.find(Bundle, Path) to create the URL that is used to 
create the image descriptor.
See Tod's Eclipse blog entry for more details on the code changes required. 
http://todcreaseyeclipse.blogspot.com/

NOTE: Only icons that have the possibility of being flipped need to have this 
prefix added - you can leave the paths of other icons as they are for 3.1.1 if 
you want to keep changes to a minimum.  You can get the BiDi nl fragments from 
Cam-Thu Le so that you can see which of your icons have a reversed counterpart 
in BiDi locales.  

The following plugins of this component have been identified as requiring this 
check:
*org.eclipse.ltk.ui.refactoring 
*org.eclipse.jdt.ui 


Questions about this issue can be directed to Karice McIntyre or Tod Creasey.
Comment 1 Martin Aeschlimann CLA Friend 2005-07-27 10:35:44 EDT
Created attachment 25352 [details]
patch
Comment 2 Martin Aeschlimann CLA Friend 2005-07-27 10:36:27 EDT
(attachment 25352 [details] is patch for jdt.ui)
Comment 3 Mike Wilson CLA Friend 2005-07-27 11:10:25 EDT
The patch comment indicates that it is for jdt.ui. Is another patch required for ltk.ui.refactoring, or are 
both areas covered by the existing patch?
Comment 4 Dirk Baeumer CLA Friend 2005-07-27 11:14:26 EDT
No, LTK needs a separate patch I am working on right now.
Comment 5 Dirk Baeumer CLA Friend 2005-07-27 11:15:24 EDT
Created attachment 25356 [details]
Patch for LTK
Comment 6 Mike Wilson CLA Friend 2005-07-27 11:17:22 EDT
Thanks, Dirk. Are going to take care of getting these released?
Comment 7 Dirk Baeumer CLA Friend 2005-07-27 11:19:20 EDT
Yes.
Comment 8 Dirk Baeumer CLA Friend 2005-07-27 11:39:19 EDT
Created attachment 25359 [details]
Modified patch for JDT/UI.
Comment 9 Dirk Baeumer CLA Friend 2005-07-27 11:40:06 EDT
Martin, can you please look at the modified version of the JDT UI patch and at
the LTK patch.

Tom, can you please review the LTK and JDT/UI patch.
Comment 10 Martin Aeschlimann CLA Friend 2005-07-27 11:49:46 EDT
LTK patch reviewed, ok.
Comment 11 Tom Hofmann CLA Friend 2005-07-27 12:02:52 EDT
LTK patch looks good.

JDT-UI Patch looks ok to me, but I see the following behavioral change when the
contributor to the wizard extension point specifies a path to a non existing icon:

Before:
An ImageDescriptor is returned, that would return null in getImageData, which
causes the action to have the missing image (red square).

After:
We return null, which causes the action to have *no* image.

Not a big change, but not really needed either for a maintenance build...
Comment 12 Mike Wilson CLA Friend 2005-07-27 12:12:15 EDT
... and arguably, it's better to have the red square, which calls out the fact that the icon is missing.
Comment 13 Martin Aeschlimann CLA Friend 2005-07-28 05:28:02 EDT
Tom is right. ImageDescriptor.createFromURL(url) never returned null but an
image descriptor that would render a 'missing' image for an unknown location.
Only for the very rare occasions of MalformedURLExcepions we would return return
somtimes null.
That means that the null checks in our old code where not really useful.

The updated patch fixes that and also restores the original intention to not set
the disabled images if none could be found.

Comment 14 Martin Aeschlimann CLA Friend 2005-07-28 05:28:54 EDT
Created attachment 25396 [details]
updated path for jdt.ui

Tom, Dirk, can you review again?
Comment 15 Martin Aeschlimann CLA Friend 2005-07-28 05:30:22 EDT
Created attachment 25397 [details]
patch for jdt.junit

For completness a path for jdt.junit (still without plugin.xml which we can
only hcnage when we are sure all components have updated their code).
Dirk, Tom?
Comment 16 Martin Aeschlimann CLA Friend 2005-07-28 05:31:04 EDT
Created attachment 25398 [details]
patch for jdt.ui.examples.projects

and for jdt.ui.examples.projects...
Comment 17 Dirk Baeumer CLA Friend 2005-07-28 05:52:55 EDT
Created attachment 25400 [details]
Updated LTK patch to follow the same schema

Tom, Martin, can you please have a look.
Comment 18 Tom Hofmann CLA Friend 2005-07-28 06:05:39 EDT
reviewed patches for jdt-ui, ltk-ui, jdt-junit and jdt.ui.examples, ok.
Comment 19 Dirk Baeumer CLA Friend 2005-07-28 06:23:13 EDT
JDT/UI patch looks ok for me. When releasing to 3.2 we should rename
create(String prefix, String name) to createUnManged to make it clear that it is
a counterpart to createManaged and should use create(..., boolean) inside of
JavaPluginImages.
Comment 20 Dirk Baeumer CLA Friend 2005-07-28 06:45:30 EDT
jdt.ui.examples patch is OK.

jdt.junit patch:

- ProgressImages: the field fMissingImage is no longer needed since it will 
  never be unequal null now. The 3.1 we only had one missing image which was
  shared. Now we have one for every image that is missing. Since this should
  normally not happen the change is ok.

Comment 21 Martin Aeschlimann CLA Friend 2005-07-28 10:14:14 EDT
added fix suggested in comment 20, released to 3.1.1 stream:
 jdt.junit, jdt.ui.examples.projects, jdt.ui

added fixes suggested in comment 19 and comment 20 and released to 3.2 stream:
 jdt.junit, jdt.ui.examples.projects, jdt.ui

LTK patch looks good to me, ok to release.
Comment 22 Dirk Baeumer CLA Friend 2005-07-29 06:40:44 EDT
Released changes to LTK/UI plug-in.
Comment 23 Dirk Baeumer CLA Friend 2005-07-29 06:44:30 EDT
In both 3.1.1 and 3.2 stream.
Comment 24 Karice McIntyre CLA Friend 2005-08-02 12:23:23 EDT
Are all the fixes released to both 3.1.1 and 3.2 streams for all the affected 
plugins (I think more plugins than were originally identified were added to the 
list, like junit, etc).  Can we mark this bug as resolved?
Comment 25 Dirk Baeumer CLA Friend 2005-08-02 12:52:46 EDT
As discussed in the planning call the fixes must be staged. We have released the
code changes but not the plugin.xml changes since they require that all code
changes are in for downstream plug-ins for JDT/UI. If all code changes in
downstream plug-ins are done for tomorrows maintenance build we can release the
plugin.xml changes as well for tomorrow. Otherwise we have to old them off since
icons will be missing.
Comment 26 Dirk Baeumer CLA Friend 2005-08-02 12:53:00 EDT
Same is true for integration build.
Comment 27 Mike Wilson CLA Friend 2005-08-02 14:37:21 EDT
Note: The team and cvs plugins have not been updated yet, since Michael Valenta is on vacation until 
tomorrow.
Comment 28 Dirk Baeumer CLA Friend 2005-08-03 05:33:46 EDT
JDT/UI is only depending on team.core which can't have any icon extension point.
So this should be fine.
Comment 29 Dirk Baeumer CLA Friend 2005-08-03 06:46:01 EDT
We have updated and releases the plugin.xml files as well.

Marking as fixed.
Comment 30 Markus Keller CLA Friend 2005-08-09 09:13:00 EDT
Start verifying...
Comment 31 Markus Keller CLA Friend 2005-08-09 10:32:36 EDT
Verified in M20050804-1200 and I20050808-2000 that icons in

org.eclipse.jdt.junit
org.eclipse.jdt.ui.examples.projects
org.eclipse.jdt.ui
org.eclipse.ltk.ui.refactoring

are nl-aware.