Community
Participate
Working Groups
3.0RC2 Using default settings: - enable all folding options - open TestCase - select the two visible lines of runTest() - cut to clipboard - paste before the final } of the CU - revert block on the QuickDiff ruler -> results in the following exception(s): java.lang.IllegalStateException at org.eclipse.jface.text.projection.ProjectionTextStore.internalError(P rojectionTextStore.java:86) at org.eclipse.jface.text.projection.ProjectionTextStore.get(ProjectionT extStore.java:153) at org.eclipse.jface.text.AbstractDocument.get(AbstractDocument.java:896 ) at org.eclipse.jface.text.DefaultDocumentAdapter.doGetLine(DefaultDocume ntAdapter.java:127) at org.eclipse.jface.text.DefaultDocumentAdapter.getLine(DefaultDocument Adapter.java:135) at org.eclipse.swt.custom.StyledText$ContentWidthCache.calculate(StyledT ext.java:1219) at org.eclipse.swt.custom.StyledText.calculateTopIndex(StyledText.java:1 974) at org.eclipse.swt.custom.StyledText.setVerticalScrollOffset(StyledText. java:7549) at org.eclipse.swt.custom.StyledText.setTopIndex(StyledText.java:7482) at org.eclipse.jface.text.TextViewer.setTopIndex(TextViewer.java:2559) at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:43 14) at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:4415) at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWith ProjectionAnnotationModel(ProjectionViewer.java:868) at org.eclipse.jface.text.source.projection.ProjectionViewer.access$5(Pr ojectionViewer.java:821) at org.eclipse.jface.text.source.projection.ProjectionViewer$1.run(Proje ctionViewer.java:792) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.ja va:106) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1362) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.jav a:252) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96 ) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAct ivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:272) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622) After repeating this the following exception was thrown: java.lang.IllegalArgumentException: overlaps with existing fragment at org.eclipse.jface.text.projection.ProjectionDocument.internalAddMaste rDocumentRange(ProjectionDocument.java:253) at org.eclipse.jface.text.projection.ProjectionDocument.addMasterDocumen tRange(ProjectionDocument.java:461) at org.eclipse.jface.text.projection.ProjectionDocument.addMasterDocumen tRange(ProjectionDocument.java:440) at org.eclipse.jface.text.source.projection.ProjectionViewer.addMasterDo cumentRange(ProjectionViewer.java:563) at org.eclipse.jface.text.source.projection.ProjectionViewer.executeProj ectionCommands(ProjectionViewer.java:911) at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWith ProjectionAnnotationModel(ProjectionViewer.java:865) at org.eclipse.jface.text.source.projection.ProjectionViewer.access$5(Pr ojectionViewer.java:821) at org.eclipse.jface.text.source.projection.ProjectionViewer$1.run(Proje ctionViewer.java:792) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.ja va:106) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1362) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.jav a:252) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96 ) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAct ivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:272) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.ja va:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622)
Adding Dirk for second vote.
Approved by Dirk & Kai.
The fundamental problem is that the projection viewer has no way to distinguish between annotations that have been deleted during the self-cleanup of the annotation model (i.e. because of a document change) and those that have been deleted by clients of the annotation model such as the provider of the projection structure. This is something that we have to add post 3.0. For now the workaround is to reinitialze the projection document from scratch if problems occur during the incremental update.
Created attachment 12367 [details] patch for class ProjectionViewer
Reviewed by Tom. Released for build I200406171600.
start verifying ...
Verified in 200406192000.