Summary: | Exception during "Organize imports" | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | UI | Assignee: | Erich Gamma <erich_gamma> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | alex |
Version: | 2.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Olivier Thomann
2001-12-13 15:32:33 EST
Observed in 20011211 and 20011212. Could be related to bug 6855. You should still provide the test case you have. It also manifests itself in 20011213. But! Only when "Show Source of Selected Element Only" is ON. Also, while this option is ON, an exception similar to the one in bug 6855 when one "jumps" to a source line (I clicked on a line in JUnit Failure Trace): 4 org.eclipse.ui 0 Index out of bounds java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:1873) at org.eclipse.swt.SWT.error(SWT.java:1819) at org.eclipse.swt.custom.StyledText.getLocationAtOffset (StyledText.java:3294) at org.eclipse.jface.text.TextViewer.getWidthInPixels (TextViewer.java:1460) at org.eclipse.jface.text.TextViewer.internalRevealRange (TextViewer.java:1398) at org.eclipse.jface.text.TextViewer.revealRange(TextViewer.java:1341) at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal (AbstractTextEditor.java:2100) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.goToTest (TestRunnerViewPart.java:585) at org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart.goToFile (TestRunnerViewPart.java:562) at org.eclipse.jdt.internal.junit.ui.FailureDetailView$1.mouseDoubleClick (FailureDetailView.java:43) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:132) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:54) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:635) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1408) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1200) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:775) at org.eclipse.ui.internal.Workbench.run(Workbench.java:758) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362) Test case: 1. create a class, f.e. like this // I'm using the one where I can reproduce it, as it does not fail predictably // - only with certain classes (and my guess here is worse than yours) import junit.framework.Test; import junit.framework.TestSuite; public class AllTests { public static void main(String[] args) { TestRunner.run( suite() ); } public static Test suite() { TestSuite suite = new TestSuite(); //... return suite; } } 2. (!!!) ensure that Outliner's option "Show Source of Selected Element Only" is selected 3. try to "Organize Import" - menu or shortcut would do the job |