Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 61951 - File-New-Other Wizards dialog should scroll to the previously selected wizard
Summary: File-New-Other Wizards dialog should scroll to the previously selected wizard
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 62039
Blocks:
  Show dependency tree
 
Reported: 2004-05-12 13:37 EDT by Raj Mandayam CLA
Modified: 2004-07-06 09:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raj Mandayam CLA 2004-05-12 13:37:19 EDT
In a product based on eclipse with a lot of wizards, I launch one of the wizards
say X thats at the bottom of the list (needs scrolling), then I hit File-New Other
I see that wizard X I previously used is selected, but the wizard list does not
scroll to reveal that selection.
Comment 1 Kim Horne CLA 2004-05-12 15:24:13 EDT
I've added the code to reveal the selection but it is not working.  I've logged
Bug  61984 to track this.
Comment 2 Kim Horne CLA 2004-05-17 09:41:49 EDT
The fix for this lies entirely in the SWT bug described as a dependency to this
bug.  Defering closure to 3.0.
Comment 3 Kim Horne CLA 2004-06-10 09:05:33 EDT
We will use the workaround provided by SWT:

Index: NewWizardNewPage.java
===================================================================
RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse
UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java,v
retrieving revision 1.31
diff -u -r1.31 NewWizardNewPage.java
--- NewWizardNewPage.java	12 May 2004 19:07:44 -0000	1.31
+++ NewWizardNewPage.java	10 Jun 2004 13:01:18 -0000
@@ -572,8 +572,14 @@
 				// if we cant find either a category or a wizard, abort.
 				return;
 		}
-		StructuredSelection selection = new StructuredSelection(selected);
-		viewer.setSelection(selection, true);
+		
+		//work around for 62039
+		final StructuredSelection selection = new StructuredSelection(selected);
+		viewer.getControl().getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				viewer.setSelection(selection, true);
+			}
+		});
 	}
 
 	/**
Comment 4 Kim Horne CLA 2004-06-10 09:12:36 EDT
Workaround in HEAD.
Comment 5 Kim Horne CLA 2004-06-10 16:06:16 EDT
Verified in 200406101200
Comment 6 Kim Horne CLA 2004-07-06 09:32:17 EDT
Closing to keep a tidy house.  Pardon the spam.