Community
Participate
Working Groups
A tree expand/collabse in the Sirius editor might be an expensive operation as it can lead to an arbitrary computation browsing the model. Launching those in the UI thread is not suitable as the Eclipse UI get stuck for seconds and the user have no way to cancel the operation.
A draft patchset is available here : https://git.eclipse.org/r/#/c/32235/ It should not be submitted as is as it triggers reentrant calls errors when - user create a tree - user click on expand Here is the stacktrace : !MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored. !STACK 0 java.lang.RuntimeException at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:781) at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedState(AbstractTreeViewer.java:2495) at org.eclipse.sirius.tree.ui.tools.internal.editor.provider.TreeUIUpdater$1.run(TreeUIUpdater.java:291) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3717) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3366) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275) at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970) at org.eclipse.sirius.tree.ui.tools.internal.editor.listeners.DTreeViewerListener.treeExpanded(DTreeViewerListener.java:75) at org.eclipse.jface.viewers.AbstractTreeViewer$3.run(AbstractTreeViewer.java:1122) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.AbstractTreeViewer.fireTreeExpanded(AbstractTreeViewer.java:1120) at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1502) at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952) at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1511) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1416) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1401) at org.eclipse.swt.widgets.Tree.gtk_test_expand_row(Tree.java:2090) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2128) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4575) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8756) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1243) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2302) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Steps to reproduce. Import a modeling project with a fairly big model (500K model elements for instance) with a fairly big tree. (projects attached in this bugzilla are suitable : https://bugs.eclipse.org/bugs/show_bug.cgi?id=438603) Open a Tree representation and play with expand/collapse.
See also bug: 438603
New Gerrit change created: https://git.eclipse.org/r/42797
Gerrit change https://git.eclipse.org/r/42797 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=874be85902935a5ee6a1bfcfbe1d09f294aad645
New Gerrit change created: https://git.eclipse.org/r/43009
Gerrit change https://git.eclipse.org/r/43009 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=68d0c222913f9566d750de9954122f4ebde7c601
Merged.
New Gerrit change created: https://git.eclipse.org/r/43160
Gerrit change https://git.eclipse.org/r/43160 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c902f906e91560a44a6c0f768e8a4603fa375336
Verified on Sirius 3.0.0M6
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.