Project: JDT
Bug 169984 [JUnit] IAE when comparing text results from test failure
Reported: 2007-01-09 11:51:09 | Status: resolved fixed

I20061219-1300 Given a TestCase with multiple text comparison failures (?or whatever you call this) 1. Go to one failure 2. Select 'Compare actual with expected test result' 3. Select another failure Is: java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:3434) at org.eclipse.swt.SWT.error(SWT.java:3373) at org.eclipse.swt.SWT.error(SWT.java:3344) at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:7724) at org.eclipse.swt.custom.StyledText.setStyleRanges(StyledText.java:7820) at org.eclipse.jface.text.TextViewer.applyTextPresentation(TextViewer.java:4411) at org.eclipse.jface.text.TextViewer.changeTextPresentation(TextViewer.java:4463) at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(PresentationReconciler.java:578) at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:567) at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:563) at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(PresentationReconciler.java:119) at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2652) at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2701) at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:518) at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:459) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.updateViewerDocument(TextMergeViewer.java:462) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.internalSetDocument(TextMergeViewer.java:413) at org.eclipse.compare.contentmergeviewer.TextMergeViewer$ContributorInfo.setDocument(TextMergeViewer.java:336) at org.eclipse.compare.contentmergeviewer.TextMergeViewer.updateContent(TextMergeViewer.java:2317) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.internalRefresh(ContentMergeViewer.java:703) at org.eclipse.compare.contentmergeviewer.ContentMergeViewer.inputChanged(ContentMergeViewer.java:603) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251) at org.eclipse.jdt.internal.junit.ui.CompareResultDialog.setCompareViewerInput(CompareResultDialog.java:251) at org.eclipse.jdt.internal.junit.ui.CompareResultDialog.setInput(CompareResultDialog.java:256) at org.eclipse.jdt.internal.junit.ui.CompareResultsAction.updateOpenDialog(CompareResultsAction.java:65) at org.eclipse.jdt.internal.junit.ui.FailureTrace.updateEnablement(FailureTrace.java:172) at org.eclipse.jdt.internal.junit.ui.FailureTrace.showFailure(FailureTrace.java:159) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart$10.run(TestRunnerViewPart.java:1539) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:152) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:28) at org.eclipse.swt.widgets.Display.syncExec(Display.java:3880) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.postSyncRunnable(TestRunnerViewPart.java:1202) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.showFailure(TestRunnerViewPart.java:1536) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.handleTestSelected(TestRunnerViewPart.java:1531) at org.eclipse.jdt.internal.junit.ui.TestViewer.handleSelected(TestViewer.java:303) at org.eclipse.jdt.internal.junit.ui.TestViewer.access$0(TestViewer.java:297) at org.eclipse.jdt.internal.junit.ui.TestViewer$TestSelectionListener.selectionChanged(TestViewer.java:73) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.fireSelectionChanged(SelectionProviderMediator.java:131) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.doSelectionChanged(SelectionProviderMediator.java:112) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator$InternalListener.selectionChanged(SelectionProviderMediator.java:40) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:850) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:45) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:153) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2004) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1137) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1163) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227) at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3465) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3079) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1945) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:425) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) 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:585) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:522) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:147) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:170) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:473) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:417) at org.eclipse.equinox.launcher.Main.run(Main.java:1121) at org.eclipse.equinox.launcher.Main.main(Main.java:1096) at org.eclipse.core.launcher.Main.main(Main.java:23) I guess this is due to the fact that this dialog is non modal anymore...

Files changed in fix:
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/CompareResultDialog.java