Tuesday, May 31, 2005

 

Accessibility: lines in the sand

I have been asked a few times now about how accessibility should be tested using Eclipse. The Eclipse team is testing using the following parameters:

Windows XP High Contrast
1152x768 Display

If we don't scale right for you with this settings please log us a bug.
 

Icons in the nl world

Eclipse 3.1 is going to support bidirectional languages (those that can type right to left as well as left to right such as Arabic). This means that for a lot of Eclipse applications you are going to want to provide alternative icons to those you ship (mostly those with a horizontal arrow or something like that).

First step is nl'ing your icon lookup. The Platform does this internally in a bunch of places by creating a URL and using the Runtime API to look it up. The secret is the $nl$ in your path - that tells the runtime to look in fragments as well.

Here is an example

String iconPath = "$nl$/icons/myicon.gif";

URL url = Platform.find( Platform.getBundle(MyPluginId), new Path(iconPath));

Image Descriptor descriptor = ImageDescriptor.createFromURL(url);

If you want to dig around more have a look at org.eclipse.ui.internal.util.BundleUtility to see how we do it.

If the icon reference is in your plugin.xml just make sure you have the $nl$ prefix on your path. We will handle this for you (and log us a bug if not!). Just make sure if you create your own extension point that it loads ImageDescriptors this way.

Second step is creating a fragment - icons are done the same way as message catalogs so no rocket science there.

Finally test it. You can switch orientation using the -dir rtl command line option or by specifying a bidirectional language using the -nl option (iw (Hebrew), ar (Arabic), fa (Farsi) or ur (Urdu)). Note we don't do this for free as a lot of users in these locales still want the left to right look.
 

Welcomes to Tods Eclipse Blog

Welcome to my Eclipse Blog. I am going to post random snippets of info here as I come across them in my daily work on the Eclipse UI team.

This page is powered by Blogger. Isn't yours?