Project: JDT
Bug 165520 [JUnit] Cannot open the junit test by clicking in the JUnit view
Reported: 2006-11-22 15:30:58 | Status: verified fixed

Using I20061121-1845, I cannot open a JUnit test by clicking on a failing test in the JUnit view. Setting as blocker since this makes it really paintful to use the JUnit tests. This might be a bug in JUnit. If this is the case, please let them know asap. org.eclipse.core.runtime.AssertionFailedException: assertion failed: ContentViewer must have a content provider when input is set. at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:243) at org.eclipse.jdt.internal.junit.ui.CompareResultDialog.setCompareViewerInput(CompareResultDialog.java:250) at org.eclipse.jdt.internal.junit.ui.CompareResultDialog.setInput(CompareResultDialog.java:255) 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:1545) 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:3878) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.postSyncRunnable(TestRunnerViewPart.java:1208) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.showFailure(TestRunnerViewPart.java:1542) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.handleTestSelected(TestRunnerViewPart.java:1537) 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:44) 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.setSelection(StructuredViewer.java:1605) at org.eclipse.jdt.internal.junit.ui.TestViewer.selectFirstFailure(TestViewer.java:568) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.selectFirstFailure(TestRunnerViewPart.java:984) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart$2.run(TestRunnerViewPart.java:430) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:155) at org.eclipse.ui.internal.UISynchronizer$1.run(UISynchronizer.java:36) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3440) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3080) 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 org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) 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:348) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:165) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:341) at org.eclipse.core.launcher.Main.basicRun(Main.java:285) at org.eclipse.core.launcher.Main.run(Main.java:987) at org.eclipse.core.launcher.Main.main(Main.java:962)

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