Issue observed during use of Progress Monitor / IProgress Service [message #551082] |
Thu, 05 August 2010 07:36 |
vikas  Messages: 10 Registered: July 2009 |
Junior Member |
|
|
HI
I found difference in behavior when i close a view. Here is my scenario:
In our myApp application we have 3 views having selection changed event implemented. Each view listens and reacts to selection changed generated by other view.
A selection of text in com.myApp.view1 view selects equivalent text in com.myApp.SampleView and draws equivalent diagram in com.myApp.part view.
Approach 1. Select a text in com.myApp.view1 then click "Close" on com.myApp.SampleView. to close view. This action will first get focus to Sampleview, which generates selectionChanged and will trigger progress Monitor dialog. I observed that, SampleView is not closed and focus is gain to SampleView.
Debugging i found that when i click on close button, the close event is not generated.
If view has already got focus and i click to "Close", it will close that view. Is this behavior expected in Eclipse ?
Approach 2. To display figures in a view a progress service with busy cursor is implemented in myApp.part view.
Select a text in com.myApp.view1 then click "Close" on com.myApp.SampleView. to close view. This action will first get focus to Sampleview, which generates selectionChanged and will trigger Progress service. Due to this i get Warning related to Recursive attempt to activate SampleView.
The stack trace of warning give below.
Please find stack trace of warning produced. From stack trace it is observed
that till ModelContext.java, progress monitor code was executed and after that
code to close 1 view started executing.
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate
part com.myApp.view1 while still in the middle of activating part
com.myApp.SampleView
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3352)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage .java:611)
at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPa ge.java:1193)
at
org.eclipse.ui.internal.WorkbenchPage.updateActivePart(Workb enchPage.java:1173)
at org.eclipse.ui.internal.WorkbenchPage.hideView(WorkbenchPage .java:2263)
at org.eclipse.ui.internal.ViewPane.doHide(ViewPane.java:212)
at org.eclipse.ui.internal.PartStack.close(PartStack.java:543)
at org.eclipse.ui.internal.PartStack.close(PartStack.java:526)
at org.eclipse.ui.internal.PartStack$1.close(PartStack.java:122 )
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation$1.handleEvent(TabbedStackPresentation.java:81)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:267)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:276)
at
org.eclipse.ui.internal.presentations.r33.DefaultTabFolder.a ccess$1(DefaultTabFolder.java:1)
at
org.eclipse.ui.internal.presentations.r33.DefaultTabFolder$1 .closeButtonPressed(DefaultTabFolder.java:66)
at
org.eclipse.ui.internal.presentations.r33.PaneFolder.notifyC loseListeners(PaneFolder.java:601)
at
org.eclipse.ui.internal.presentations.r33.PaneFolder$3.close (PaneFolder.java:190)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:21 71)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.j ava:324)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. block(ModalContext.java:158)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:326)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:495)
at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.r un(ProgressMonitorJobsDialog.java:268)
at
org.eclipse.ui.internal.progress.ProgressManager$3.run(Progr essManager.java:909)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:944)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:919)
at com.myApp.core.Workorder$1.run(Workorder.java:34)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.j ava:178)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:118)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4021)
at com.myApp.Workorder.execute(Workorder.java:67)
at com.myApp.paintSelection(EntityDependencyPart.java:2540)
at com.myApp.selectionChanged(EntityDependencyPart.java:2815)
at
org.eclipse.ui.internal.AbstractSelectionService.fireSelecti on(AbstractSelectionService.java:156)
at
org.eclipse.ui.internal.AbstractSelectionService.setActivePa rt(AbstractSelectionService.java:282)
at
org.eclipse.ui.internal.WWinPartService.updateActivePart(WWi nPartService.java:125)
at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartSer vice.java:115)
at
org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WW inPartService.java:48)
at org.eclipse.ui.internal.PartListenerList2$4.run(PartListener List2.java:113)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org.eclipse.ui.internal.PartListenerList2.fireEvent(PartList enerList2.java:53)
at
org.eclipse.ui.internal.PartListenerList2.firePartDeactivate d(PartListenerList2.java:111)
at
org.eclipse.ui.internal.PartService.firePartDeactivated(Part Service.java:116)
at org.eclipse.ui.internal.PartService.setActivePart(PartServic e.java:165)
at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePart Changed(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java :126)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3402)
at
org.eclipse.ui.internal.WorkbenchPage.requestActivation(Work benchPage.java:2946)
at org.eclipse.ui.internal.PartPane.requestActivation(PartPane. java:265)
at
org.eclipse.ui.internal.presentations.PresentablePart.setFoc us(PresentablePart.java:191)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation$1.handleEvent(TabbedStackPresentation.java:92)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:267)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:272)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .handleMouseDown(AbstractTabFolder.java:342)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder $3.mouseDown(AbstractTabFolder.java:79)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.myApp.core.Application.run(Application.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:572)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:171)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Reproducible: Always
Regards,
Vikas
|
|
|
Powered by
FUDForum. Page generated in 0.01718 seconds