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

Outline (28)

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.


  • Dietrich Streifert


  • Dietrich Streifert

    • priority: 5 --> 6
  • Dietrich Streifert

    Logged In: YES
    Originator: YES

    To force the correct outline view again the file has to be closed and then opened again.

  • Subba Reddy  Madireddygari

    Logged In: YES
    Originator: NO

    I observed that, there is little delay in between Editor to Outline view whenever moved a method with in the editor. And, some time no inter link from Editor to Outline view.

    But, it's very much linked from Outline view to Editor and very very fast (Outline view ==> Editor), if any method is being clicked in the outline view, right away on the selected method code in the Editor.

    Overall, it's linking from Editor to Outline view is suffering.

    This is in Eclipse 3.3 + epic 0.6.13

    But, Excellent job.


  • Jack Tanner

    Jack Tanner - 2008-01-23

    Logged In: YES
    Originator: NO

    Similarly, if you insert a space or newline after the letter 's' in 'sub one{', the outline view becomes garbled. It doesn't recover if you erase the space.

  • Dietrich Streifert

    Logged In: YES
    Originator: YES

    Any news on this issue? I installed EPIC 0.6.20 which has changed in behaviour. One of my perl modules now opens with a destructed outline view.

    Any chance to get this fixed soon?

    I'm currently deep into developing a perl web portal and I have to close and re-open my files frequently in order to re-sync the outline view again.

    Thank you.

    Best regards.

  • Dietrich Streifert

    • priority: 6 --> 7
  • Dietrich Streifert

    • priority: 7 --> 8
  • Dietrich Streifert

    Logged In: YES
    Originator: YES

    @mannih2001: Thank you for the hint! After clicking on the refresh button the outline view looks good again.

    But unfortunately the navigation is broken. When clicking in the outline view on a sub the editor should scroll the sub definition into the view and mark the name. But the internal references to the correct line is broken so the cursor is positioned somewhere else in the code.

    Out of that problem when fast typing quotes or brackets the cursor suddenly jumps to the beginning of the current sub and selects the name of the sub. The result is that the sub name is overwritten with some of your last keystrokes.

    I think the corresponding algorithm has to be reviewed.

    I'm trying to show up on the developers radar by raising the priority to 8.

  • 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
  • Dietrich Streifert


    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!


Log in to post a comment.