Issue #5 new

Same class in several projects : eCobertura opens them all

Anonymous created an issue

Here is a summary of the issue I have.

I have several versions of the same project in my Eclipse repository, so the same class exists several times in the repository. Running eCobertura works, but when it comes to opening a source to view coverage, eCobertura opens //all the .java files with the same name in the repository//. The good one is opened and has the color-coded coverage (so this is fine). But the wrong ones have Eclipse open a popup showing "BadLocationException" errors. This popup, and the wrong files, have to be closed manually.

This is a usability issue.

Seen with Eclipse Helios (Windows XP, Java 1.6_b22).

Here is the error log:

eclipse.buildId=M20110210-1200 java.version=1.6.0_23 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

Error Fri Jul 22 11:00:58 CEST 2011 Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".

org.eclipse.jface.text.BadLocationException at org.eclipse.jface.text.ListLineTracker.getLineLength(ListLineTracker.java:126) at org.eclipse.jface.text.AbstractLineTracker.getLineLength(AbstractLineTracker.java:153) at org.eclipse.jface.text.AbstractDocument.getLineLength(AbstractDocument.java:908) at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getLineLength(SynchronizableDocument.java:368) at ecobertura.ui.annotation.CoverageAnnotationModel$$anonfun$annotateLines$1$2.apply(CoverageAnnotationModel.scala:82) at ecobertura.ui.annotation.CoverageAnnotationModel$$anonfun$annotateLines$1$2.apply(CoverageAnnotationModel.scala:81) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61) at scala.collection.immutable.List.foreach(List.scala:45) at ecobertura.ui.annotation.CoverageAnnotationModel.annotateLines$1(CoverageAnnotationModel.scala:81) at ecobertura.ui.annotation.CoverageAnnotationModel.ecobertura$ui$annotation$CoverageAnnotationModel$$initializeAnnotations(CoverageAnnotationModel.scala:74) at ecobertura.ui.annotation.CoverageAnnotationModel.<init>(CoverageAnnotationModel.scala:56) at ecobertura.ui.annotation.CoverageAnnotationModel$.createForEditorDocument(CoverageAnnotationModel.scala:45) at ecobertura.ui.annotation.AnnotationModelAttacher.attach$1(AnnotationModelAttacher.scala:65) at ecobertura.ui.annotation.AnnotationModelAttacher.attachIfNecessary(AnnotationModelAttacher.scala:58) at ecobertura.ui.annotation.AnnotationModelAttacher.<init>(AnnotationModelAttacher.scala:40) at ecobertura.ui.annotation.AnnotationModelAttacher$.attachTo(AnnotationModelAttacher.scala:32) at ecobertura.ui.annotation.CoverageAnnotationModel$.attachTo(CoverageAnnotationModel.scala:42) at ecobertura.ui.editors.EditorsAnnotator.annotateEditor(EditorsAnnotator.scala:62) at ecobertura.ui.editors.WindowListener$$anon$1.partOpened(WindowListener.scala:28) at org.eclipse.ui.internal.PartListenerList2$5.run(PartListenerList2.java:130) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55) at org.eclipse.ui.internal.PartListenerList2.firePartOpened(PartListenerList2.java:128) at org.eclipse.ui.internal.PartService.firePartOpened(PartService.java:280) at org.eclipse.ui.internal.WWinPartService$WWinListener.partOpened(WWinPartService.java:54) at org.eclipse.ui.internal.PartListenerList2$5.run(PartListenerList2.java:130) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.runtime.Platform.run(Platform.java:888) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55) at org.eclipse.ui.internal.PartListenerList2.firePartOpened(PartListenerList2.java:128) at org.eclipse.ui.internal.PartService.firePartOpened(PartService.java:280) at org.eclipse.ui.internal.WorkbenchPagePartList.firePartOpened(WorkbenchPagePartList.java:35) at org.eclipse.ui.internal.PartList.partOpened(PartList.java:241) at org.eclipse.ui.internal.PartList.access$0(PartList.java:210) at org.eclipse.ui.internal.PartList$1.propertyChanged(PartList.java:40) at org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:375) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:610) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2674) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler$$anonfun$handleClassSelection$1$1.apply(OpenCoveredClassHandler.scala:60) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler$$anonfun$handleClassSelection$1$1.apply(OpenCoveredClassHandler.scala:58) at ecobertura.ui.util.SourceFileFinder$SearchHandler.acceptFile(SourceFileFinder.scala:57) at org.eclipse.search.internal.core.text.TextSearchVisitor.processFile(TextSearchVisitor.java:247) at org.eclipse.search.internal.core.text.TextSearchVisitor.processFiles(TextSearchVisitor.java:196) at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:172) at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:184) at org.eclipse.search.core.text.TextSearchEngine$1.search(TextSearchEngine.java:54) at ecobertura.ui.util.SourceFileFinder.find(SourceFileFinder.scala:48) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler.handleClassSelection$1(OpenCoveredClassHandler.scala:57) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler.handleStructuredSelection$1(OpenCoveredClassHandler.scala:52) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler.execute(OpenCoveredClassHandler.scala:47) at ecobertura.ui.views.session.commands.OpenCoveredClassHandler.execute(OpenCoveredClassHandler.scala:37) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:178) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247) at ecobertura.ui.views.session.CoverageSessionView$$anonfun$createPartControl$1.apply(CoverageSessionView.scala:87) at ecobertura.ui.views.session.CoverageSessionView$$anonfun$createPartControl$1.apply(CoverageSessionView.scala:85) at ecobertura.ui.util.Predef$$anon$4.doubleClick(Predef.scala:51) at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:824) 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.StructuredViewer.fireDoubleClick(StructuredViewer.java:822) at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1421) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1225) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 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:369) 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:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

Thanks.

Comments (0)

  1. Log in to comment