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

Bug 177468

Summary: [CheatSheet] Wizard with no pages displays empty dialog
Product: [Eclipse Project] Platform Reporter: Chris Torrence <chris>
Component: User AssistanceAssignee: platform-ua-inbox <platform-ua-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Torrence CLA 2007-03-14 21:30:50 EDT
Using Eclipse 3.3 Build id: I20070228-0930, on Windows XP

Create a cheatsheet (easy to do with the new cheat sheet editor!) that uses a Wizard with no pages, for example the UntitledTextFileWizard:

<?xml version="1.0" encoding="UTF-8"?>
<cheatsheet title="Title">
   <intro>
      <description>
         Body
      </description>
   </intro>
   <item title="Item" dialog="false" skip="false">
      <description>
         Body
      </description>
      <command serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.editors.wizards.UntitledTextFileWizard)" confirm="false">
      </command>
   </item>
</cheatsheet>

Normally, when you use the UntitledTextFileWizard in the Workbench, you don't see any pages, you just get the empty text document. However, with the Cheat Sheet, when you "Click to Perform", you get an empty wizard with Finish and Cancel buttons. Clicking Finish does indeed complete the wizard, but the empty wizard dialog is very disconcerting.

In my own app I was able to work around this bug by creating an Action that just calls the wizard constructor and then calls performFinish(). I then used this Action within my Cheat Sheet.

Seems like the New Wizard command should have some code like:

        if (wizardElement.canFinishEarly() && !wizardElement.hasPages()) {
			wizard.performFinish();

Thanks!
Comment 1 Chris Torrence CLA 2007-09-27 13:04:00 EDT
This is a dup of bug 165838, and was fixed in 20070325.

*** This bug has been marked as a duplicate of bug 165838 ***