#467 Outline view out of sync with comment typing/deletion

v0.6.x
closed-fixed
Jan Ploski
Outline (28)
8
2009-05-21
2008-01-18
No

This is for EPIC 0.6.18 in Eclipse 3.3.0 M20070921-1145 under WindowsXPSP2.

In some situations where the structure eg the beginning of a foreach block is commented out, the outline view gets garbeled because the block structure gets unbalanced . This is acceptable.

If the commented out code is uncommented again the outline view should reparse the code and redisplay the correct outline view.

In some situation this does not happen and the outline view remains garbeled.

The bug is reproducable with the attached "test.pl" file. Please open the file in eclipse and follow the instructions within the comment.

Discussion

<< < 1 2 (Page 2 of 2)
  • Henrik Seidel
    Henrik Seidel
    2009-02-12

    Any news on this issue? I have the same problem - at some point the perl code and the outline view get out of sync and the outline is garbled. Refreshing the outline helps to restore the correct tree, but when I click on a function the editor jumps to the wrong position, and functions which are added in the editor do not appear in the outline view until I refresh the outline manually again. Only closing and re-opening the file helps (which is especially annoying when working with mylin because the file gets lost from the current working set).

    This is Eclipse 3.4.1 and epic 0.6.29.

     
  • Jan Ploski
    Jan Ploski
    2009-05-21

    This issue has been today reported again in the following forum thread: https://sourceforge.net/forum/message.php?msg_id=7403257

    The outline in EPIC up to 0.6.34 is sensitive against extra closing braces at the outermost level. If you add a closing brace after a subroutine belonging to a package, this will result in the outline becoming filled with "main" packages, each of which contains a single subroutine.

    In Eclipse 3.4, after removing the superfluous closing brace, the outline might not return to the original correct content. When this happens, the following exception is logged, which may be due to a bug in Eclipse (at least, this same exception has been reported for Aptana and Subclipse, and it doesn't seem to be easy to explain):

    org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
    at org.eclipse.swt.SWT.error(SWT.java:3777)
    at org.eclipse.swt.SWT.error(SWT.java:3695)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    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:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
    Caused by: org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:3777)
    at org.eclipse.swt.SWT.error(SWT.java:3695)
    at org.eclipse.swt.SWT.error(SWT.java:3666)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:446)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:384)
    at org.eclipse.swt.widgets.Widget.getData(Widget.java:472)
    at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2609)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1856)
    at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:711)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1831)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1787)
    at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1773)
    at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1430)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1365)
    at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:397)
    at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1328)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1428)
    at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1387)
    at org.epic.perleditor.views.PerlOutlineContentProvider.updateViewer(PerlOutlineContentProvider.java:178)
    at org.epic.perleditor.views.PerlOutlineContentProvider.modelChanged(PerlOutlineContentProvider.java:146)
    at org.epic.perleditor.views.PerlOutlineContentProvider.access$0(PerlOutlineContentProvider.java:142)
    at org.epic.perleditor.views.PerlOutlineContentProvider$1.sourceFileChanged(PerlOutlineContentProvider.java:23)
    at org.epic.core.model.SourceFile.fireSourceFileChanged(SourceFile.java:151)
    at org.epic.core.model.SourceFile.parse(SourceFile.java:129)
    at org.epic.perleditor.editors.PerlEditor$1.run(PerlEditor.java:394)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
    ... 23 more

    As a countermeasure, I'm going to add two levels of fault tolerance - one against the extra closing braces at top level - the outline won't become messed up in the first place - and another against this particular exception (repopulate outline from scratch when it is caught).

     
  • Jan Ploski
    Jan Ploski
    2009-05-21

    Fixed in EPIC 0.6.35.

     
  • Jan Ploski
    Jan Ploski
    2009-05-21

    • assigned_to: nobody --> jploski
    • status: open --> closed-fixed
     
  • @Jan:

    Thank you very much for this fix! From my first tests (meanwhile on Eclipse 3.4 on Vista x64) the behaviour looks very good.

    I can't reproduce the problem with my testcase anymore.

    Thank your for your goog work!

     
<< < 1 2 (Page 2 of 2)