X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.suite.ui%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fui%2FSuiteUi.java;h=8c8780fc1621071c4255770c2c880fa8fe434c85;hb=daef461662700ec2df8a72f895623c889f9da946;hp=c2c3c8943d37678d67d8c75e564c18da203f2e7c;hpb=dec8c11591d7525c4be934406326823348daa461;p=gpl%2Fargeo-suite.git diff --git a/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java b/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java index c2c3c89..8c8780f 100644 --- a/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java +++ b/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java @@ -17,7 +17,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; -/** The {@link CmsView} for the work ergonomics of Argeo Suite. */ +/** The view for the default ergonomics of Argeo Suite. */ class SuiteUi extends Composite { private static final long serialVersionUID = 6207018859086689108L; @@ -106,10 +106,11 @@ class SuiteUi extends Composite { context = userHome; } Composite toShow = getLayer(layer, context); - getDisplay().syncExec(() -> { - toShow.moveAbove(null); - dynamicArea.layout(true, true); - }); + if (!isDisposed()) + getDisplay().syncExec(() -> { + toShow.moveAbove(null); + dynamicArea.layout(true, true); + }); currentLayerId = layer; return toShow; } @@ -172,4 +173,21 @@ class SuiteUi extends Composite { return sysSession; } + Session getSession(String workspaceName) { + if (workspaceName == null) + return sysSession; + if (NodeConstants.SYS_WORKSPACE.equals(workspaceName)) + return sysSession; + else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) + return homeSession; + else + throw new IllegalArgumentException("Unknown workspace " + workspaceName); + } + + public CmsView getCmsView() { + return cmsView; + } + + + }