summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEric Moffatt2011-07-12 14:40:26 (EDT)
committer Paul Webster2011-08-25 10:21:52 (EDT)
commitff80c5f88a189b4a4e96c71dc8f5738ba9625368 (patch)
tree0014a4cf51af1423423d5ea7387f130cffe97420
parenta9ae49dc16b219c6bdf901b303be5f5423804eef (diff)
downloadeclipse.platform.ui-ff80c5f88a189b4a4e96c71dc8f5738ba9625368.zip
eclipse.platform.ui-ff80c5f88a189b4a4e96c71dc8f5738ba9625368.tar.gz
eclipse.platform.ui-ff80c5f88a189b4a4e96c71dc8f5738ba9625368.tar.bz2
Work for Bug 344761.v20110825-1421
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java13
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java5
-rw-r--r--bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java2
3 files changed, 17 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java
index 75d4e94..5359c8a 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java
@@ -360,18 +360,25 @@ public class WBWRenderer extends SWTPartRenderer {
MWindow wbwModel = (MWindow) element;
+ MApplication appModel = wbwModel.getContext().get(MApplication.class);
+ boolean rtlMode = (Boolean) appModel.getTransientData().get(
+ E4Workbench.RTL_MODE);
+ int rtlStyle = rtlMode ? SWT.RIGHT_TO_LEFT : 0;
+
Shell parentShell = parent == null ? null : ((Control) parent)
.getShell();
final Shell wbwShell;
if (parentShell == null) {
- wbwShell = new Shell(Display.getCurrent(), SWT.SHELL_TRIM);
+ wbwShell = new Shell(Display.getCurrent(), SWT.SHELL_TRIM
+ | rtlStyle);
wbwModel.getTags().add("topLevel"); //$NON-NLS-1$
} else if (wbwModel.getTags().contains("dragHost")) { //$NON-NLS-1$
- wbwShell = new Shell(parentShell, SWT.BORDER);
+ wbwShell = new Shell(parentShell, SWT.BORDER | rtlStyle);
wbwShell.setAlpha(110);
} else {
- wbwShell = new Shell(parentShell, SWT.TOOL | SWT.TITLE | SWT.RESIZE);
+ wbwShell = new Shell(parentShell, SWT.TOOL | SWT.TITLE | SWT.RESIZE
+ | rtlStyle);
}
wbwShell.setBackgroundMode(SWT.INHERIT_DEFAULT);
diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
index 53af483..b0627c5 100644
--- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
+++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java
@@ -216,6 +216,11 @@ public class E4Application implements IApplication {
appContext);
appModel.setContext(appContext);
+ String rtlMode = getArgValue(E4Workbench.RTL_MODE, applicationContext,
+ false);
+ appModel.getTransientData().put(E4Workbench.RTL_MODE,
+ "rtl".equals(rtlMode));
+
// for compatibility layer: set the application in the OSGi service
// context (see Workbench#getInstance())
if (!E4Workbench.getServiceContext().containsKey(
diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
index dba79e8..adf9af0 100644
--- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
+++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/E4Workbench.java
@@ -51,6 +51,8 @@ public class E4Workbench implements IWorkbench {
public static final String CLEAR_PERSISTED_STATE = "clearPersistedState"; //$NON-NLS-1$
public static final String DELTA_RESTORE = "deltaRestore"; //$NON-NLS-1$
+ public static final String RTL_MODE = "dir"; //$NON-NLS-1$
+
IEclipseContext appContext;
IPresentationEngine renderer;
MApplication appModel = null;