ScriptUtil.closeDisplay(widget) works for New Tab and New Workbench Window, not for Standalone Window, where the following exceptions is thrown:
java.lang.Exception: Not implemented
at org.csstudio.display.builder.representation.ToolkitRepresentation.closeWindow(ToolkitRepresentation.java:628)
at org.csstudio.display.builder.runtime.script.ScriptUtil.closeDisplay(ScriptUtil.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
at org.python.core.PyObject.__call__(PyObject.java:461)
at org.python.core.PyObject.__call__(PyObject.java:465)
at org.python.pycode._pyx232.f$0(EmbeddedPy:4)
at org.python.pycode._pyx232.call_function(EmbeddedPy)
at org.python.core.PyTableCode.call(PyTableCode.java:167)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1386)
at org.python.core.Py.exec(Py.java:1430)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)
at org.csstudio.display.builder.runtime.script.internal.JythonScriptSupport.lambda$0(JythonScriptSupport.java:236)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
ScriptUtil.closeDisplay(widget)
works for New Tab and New Workbench Window, not for Standalone Window, where the following exceptions is thrown:CSSTUDIO-810.zip