## Bidirectional Support in the Eclipse Workbench

As of Eclipse 3.1 M3 bidirectional languages are supported in JFace and the Workbench. A bidirectional language is one that can write both right to left and left to right based on context. Most directional languages have a right to left orientation by default and will occasionally switch to left to right to write a foreign word.

org.eclipse.jface.Window now has a static default orientation (Window#getDefaultOrientation) that is determined by checking the following in order

- command line parameters. If the -dir command line option is used this will be the default orientation. Valid values are -dir rtl or -dir ltr,
- system properties. If the system property eclipse.orientation is set this will be used. Note that use of the -dir command line parameter will also set this property.
- Locale. If the language is Hebrew, Arablic, Farsi or Urdu the orientation will be right to left, otherwise it will be left to right.

Views and editors will by default inherit the window orientation from thier parent. Dialogs should inherit orientation by using the shellStyle of thier parent when setting thier own by calling super#getShellStyle.

Figure 1 - Screenshot of right to left orientation of the resource perspective