aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Tarief2011-09-09 15:54:24 (EDT)
committerOleg Besedin2011-09-09 15:54:24 (EDT)
commitcf6bffae898d3b889def0ab5818be206f374fcab (patch)
tree41525e9c885dca6607377957080a1ac04ecd5292
parent1e4ca2069cf2dcc2cdb4112a6d1eb45783e4b810 (diff)
downloadeclipse.platform.ui-cf6bffae898d3b889def0ab5818be206f374fcab.zip
eclipse.platform.ui-cf6bffae898d3b889def0ab5818be206f374fcab.tar.gz
eclipse.platform.ui-cf6bffae898d3b889def0ab5818be206f374fcab.tar.bz2
Bug 203849 - [ViewMgmt] Size menu in right to left mode is backwardsv20110909-1954
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java
index eb2ad31..9e04b2a 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartPane.java
@@ -9,6 +9,7 @@
* IBM Corporation - initial API and implementation
* Stefan Xenos, IBM; Chris Torrence, ITT Visual Information Solutions - bug 51580
* Nikolay Botev - bug 240651
+ * Mohamed Tarief - bug 203849
*******************************************************************************/
package org.eclipse.ui.internal;
@@ -16,6 +17,7 @@ import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
@@ -493,11 +495,14 @@ public abstract class PartPane extends LayoutPart implements IPropertyListener,
* Add the Left,Right,Up,Botton menu items to the Size menu.
*/
protected void addSizeItems(Menu sizeMenu) {
- Sashes sashes = findSashes();
- addSizeItem(sizeMenu,
- WorkbenchMessages.PartPane_sizeLeft, sashes.left);
- addSizeItem(sizeMenu,
- WorkbenchMessages.PartPane_sizeRight, sashes.right);
+ Sashes sashes = findSashes();
+ if (Window.getDefaultOrientation() == SWT.RIGHT_TO_LEFT) {
+ addSizeItem(sizeMenu, WorkbenchMessages.PartPane_sizeLeft, sashes.right);
+ addSizeItem(sizeMenu, WorkbenchMessages.PartPane_sizeRight, sashes.left);
+ } else {
+ addSizeItem(sizeMenu, WorkbenchMessages.PartPane_sizeLeft, sashes.left);
+ addSizeItem(sizeMenu, WorkbenchMessages.PartPane_sizeRight, sashes.right);
+ }
addSizeItem(sizeMenu,
WorkbenchMessages.PartPane_sizeTop, sashes.top);
addSizeItem(sizeMenu, WorkbenchMessages.PartPane_sizeBottom, sashes.bottom);