file Exception raised with PlatformUI.getWorkbench()

3 years 11 months ago #3453 by jmfavre
Hi
A potential regression in Modelio 3 (KO in 3.3.1 and 3.2 but OK on 2.2).
Try to execute the following code.
from org.eclipse.ui import PlatformUI
x = PlatformUI.getWorkbench()

On Modelio 2.2 it returns the workbench.
On Modelio 3.3.1, 3.2 generates:
java.lang.IllegalStateException: Workbench has not been created yet. in <script> at line number 2 [code] For the sake of the record the usage of PlatformUI is handy, see for instance [url=https://www.modelio.org/forum/19-scripts/2173-selectedselecting-elements-navigation-listener-in-jython-scripts.html#2175]this thread[/url] with a piece of code from chm (using modelio 2.2 at that time according to the message). Hope this helps. Jean-marie[code]
java.lang.IllegalStateException: Workbench has not been created yet. in <script> at line number 2
For the sake of the record the usage of PlatformUI is handy, see for instance [url=https://www.modelio.org/forum/19-scripts/2173-selectedselecting-elements-navigation-listener-in-jython-scripts.html#2175]this thread[/url] with a piece of code from chm (using modelio 2.2 at that time according to the message). Hope this helps. Jean-marie[code]

For the sake of the record the usage of PlatformUI is handy, see for instance this thread with a piece of code from chm (using modelio 2.2 at that time according to the message).

Hope this helps.
Jean-marie

Please Log in or Create an account to join the conversation.

Moderators: chmcma
Time to create page: 0.029 seconds
^ Back to Top