Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348187 - ArrayIndexOutOfBoundsException when empty IProposal list returned from getValueProposals
Summary: ArrayIndexOutOfBoundsException when empty IProposal list returned from getVal...
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.8.0   Edit
Assignee: Tim Kaiser CLA
QA Contact:
URL:
Whiteboard: Indigo RC4 theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 05:31 EDT by Dobrou Mising name CLA
Modified: 2011-06-24 08:52 EDT (History)
2 users (show)

See Also:
tim.kaiser: indigo+


Attachments
mylyn/context/zip (1.40 KB, application/octet-stream)
2011-06-06 09:40 EDT, Tim Kaiser CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dobrou Mising name CLA 2011-06-03 05:31:55 EDT
Build Identifier: 0.8.0RC1.201105171213

I'm using new proposals scheme implementing IProposalSupport.
When I return empty list from
org.eclipse.graphiti.func.IProposalSupport.getValueProposals(String, int, IDirectEditingContext)
I get following exception when direct editing is activated:

!ENTRY org.eclipse.ui 4 0 2011-06-02 14:22:17.399
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 0
	at org.eclipse.graphiti.ui.internal.parts.directedit.GFCellEditorValidator.isValidProposal(GFCellEditorValidator.java:95)
	at org.eclipse.graphiti.ui.internal.parts.directedit.GFCellEditorValidator.isValid(GFCellEditorValidator.java:43)
	at org.eclipse.jface.viewers.CellEditor.isCorrect(CellEditor.java:529)
	at org.eclipse.jface.viewers.CellEditor.setValue(CellEditor.java:853)
	at org.eclipse.graphiti.ui.internal.parts.directedit.GFDirectEditManager.initCellEditor(GFDirectEditManager.java:236)
	at org.eclipse.gef.tools.DirectEditManager.show(DirectEditManager.java:400)
	at org.eclipse.graphiti.ui.internal.parts.directedit.GFDirectEditManager.show(GFDirectEditManager.java:332)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.bringUpDirectEditField(ShapeEditPart.java:699)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.performRequest(ShapeEditPart.java:512)
	at org.eclipse.gef.tools.DelayedDirectEditHelper.run(DelayedDirectEditHelper.java:108)
	at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167)
	at org.eclipse.swt.widgets.Display.messageProc(Display.java:3256)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
	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(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

Reproducible: Always
Comment 1 Tim Kaiser CLA 2011-06-06 09:40:42 EDT
Created attachment 197393 [details]
mylyn/context/zip
Comment 2 Tim Kaiser CLA 2011-06-06 09:44:26 EDT
fixed.
Comment 3 Michael Wenz CLA 2011-06-24 08:52:11 EDT
Part of Graphiti Indigo 0.8.0