Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360869

Summary: Wrong enablement of Next and Previous buttons in Find toolbar in History view
Product: [Technology] EGit Reporter: Deepak Azad <deepakazad>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen, robin
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Deepak Azad CLA 2011-10-13 12:41:24 EDT
Eclipse 4.2 - I20111007-1625 and EGit - 1.2.0.201110091909

- Enable Find toolbar in History view
- Close History view
- From Git Repositories view open history on an repository
=> History view opens and the Next and Previous buttons of the toolbar are enabled. But they should be disabled at this point at the text field is empty.

In this state clicking one of the buttons will cause the following exception. Once I enter some text and then delete it, the enablement of buttons works fine.

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
	at org.eclipse.egit.ui.internal.history.FindToolbar.sendEvent(FindToolbar.java:549)
	at org.eclipse.egit.ui.internal.history.FindToolbar.access$10(FindToolbar.java:544)
	at org.eclipse.egit.ui.internal.history.FindToolbar$3.handleEvent(FindToolbar.java:281)
	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:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:972)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:888)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:90)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:565)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:520)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:352)
	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:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1431)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1407)
Comment 1 Robin Stocker CLA 2013-05-19 19:37:03 EDT
This has been fixed for some time.