Bug 363890 - [EMF Runtime Extensions] Exception when trying to extend already deleted variables in Linked Folder creation wizard
Summary: [EMF Runtime Extensions] Exception when trying to extend already deleted vari...
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 22:33 EST by Phong Le CLA
Modified: 2024-05-06 23:10 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phong Le CLA 2011-11-15 22:33:41 EST
Build Identifier: 0.7.0.20111007-0146

Try to create an wizard extension point that using org.eclipse.sphinx.emf.workspace.ui.wizards.LinkedFolderWizard and I got the problem as bellow:

Reproducible: Always

Steps to Reproduce:
1. Open Linked Folder creation wizard
2. Click [Varibale...]button to open  'Select Path Varibale' wizard
3. In 'Select Path Variable' wizard, click [New..]-> 'New Variable' wizard open
4. Input a name and indicate a target folder, click [OK]
-> New Variable is created and shown in the list  of path variables
5. Select the newly created variable 
-> Edit... Remove, Extend.. button is enabled
6. Select [Remove] 

Actual result : 
- the variable is removed
- The selection is lost 
- Extend...button is still enable-> Click [Extend..] button -> an error appears
in error log

Expected: 
When the selected variable is removed, 
the selection is lost, 
[Extend..] button is disabled as well.
Comment 1 Phong Le CLA 2011-11-15 22:34:38 EST
Error message 

java.lang.ArrayIndexOutOfBoundsException: 0
    at
org.eclipse.ui.ide.dialogs.PathVariableSelectionDialog.buttonPressed(PathVariableSelectionDialog.java:101)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
    at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
    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:4066)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
...
Comment 2 Phong Le CLA 2011-11-15 23:18:12 EST
As I debugged deeply in PathVariableSelectionDialog. I see that the [Extend..] button is not updated every [Add] / [Edit] or [Remove] button is clicked (except variableTable selection changed).

Currently, these buttons call PathVariablesGroup#updateWidgetState() after adding /editing or removing an variable to update their enable status. So that, I think we must modified PathVariablesGroup#updateWidgetState() to raise an event for PathVariableSelectionDialog can update the [Extend..] button as well as variableTable do with selection changed.
Comment 3 Balazs Grill CLA 2024-05-06 23:10:14 EDT
Closed stale issue before migration