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

Bug 168888

Summary: [Wizards] PageTransition classes may need rename/reorg
Product: [Eclipse Project] Platform Reporter: Karice McIntyre <Karice_McIntyre>
Component: UIAssignee: Karice McIntyre <Karice_McIntyre>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, bradleyjames, dejan, Tod_Creasey
Version: 3.3Keywords: api
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch to replace fix for bug 16179
none
sample plugin
none
sample plugin with source
none
apply patch to org.eclipse.jface
none
plugin project containing new wizard to test patch
none
test plugin (with source) none

Description Karice McIntyre CLA 2006-12-21 14:02:54 EST
After the fix for bug 16179 we now have the following classes that appear to be the same or similar:
PageTransitionEvent, PageChangedEvent
IPageTransitionListener, IPageChangedListener
IPageTransitionProvider, IPageChangeProvider

Bug 16179 added PageTransition event, provider and listener classes that are to be fired when a wizard page is transitioning.  Whereas the PageChanged classes are fired after the page is shown.  The naming of the *Transition classes may cause confusion so there have been a few proposals to improve this:
1. simply change the word "transition" to "changing"
2. remove the new classes and instead evolve the PageChanged classes to incorporate the "changing" behavior by adding a pageChanging method (i.e. add an IPageChangedListener2 interface).
 
I think we discussed a third option - not to use an event at all and just add an aboutToShow() method to DialogPage.  

I would like the opinions of the API gurus before proceeding on this - it will need to be resolved for M5.
Comment 1 Karice McIntyre CLA 2007-01-10 16:00:15 EST
Boris, what would you like to do for this one?
Comment 2 Karice McIntyre CLA 2007-02-02 15:49:54 EST
Created attachment 58151 [details]
proposed patch to replace fix for bug 16179

These are the proposed changes Boris suggested.  It eliminates the ITransitionProvider interface (good), and renames the event and listener types from "transition" to "changing" (also good).  

The only reservation I have with this change is that every listener is fired each time showPage() is called, even when that page (with the listener) is neither the current page or the page to be shown (the next/previous page).  The way the patch is written, the client must check the event to see if the event is applicable to that page.  Are we ok with that?  I will attach a plugin that has a new wizard as a sample usage.

Feedback welcome.
Comment 3 Karice McIntyre CLA 2007-02-02 15:54:46 EST
Created attachment 58152 [details]
sample plugin 

see instructions how how to run in bug 16179#c20
Comment 4 Karice McIntyre CLA 2007-03-12 11:57:50 EDT
Created attachment 60561 [details]
sample plugin with source 

Import project to obtain sample plugin with source.  The previous sample was a plugin jar without source (same code).
Comment 5 Karice McIntyre CLA 2007-03-12 18:30:56 EDT
Created attachment 60627 [details]
apply patch to org.eclipse.jface

some polish to original patch posted in this bug.
Comment 6 Karice McIntyre CLA 2007-03-12 18:32:25 EDT
Created attachment 60628 [details]
plugin project containing new wizard to test patch

updated sample plugin
Comment 7 Mike Wilson CLA 2007-03-14 12:11:49 EDT
+1
Comment 8 Karice McIntyre CLA 2007-03-15 11:42:37 EDT
Released to HEAD for build > 20070315. I will update bug 16179 with a pointer to this one, since the original patch from that bug has changed.
Comment 9 Karice McIntyre CLA 2007-03-15 11:47:06 EDT
Created attachment 60962 [details]
test plugin (with source) 

Use this test plugin to get a new wizard to verify this fix. A new wizard will appear in category named "Bug 168888"
Comment 10 Tod Creasey CLA 2007-03-23 08:31:05 EDT
Verified with test example in  I20070322-1800