Bug 9968 - [Wizards] New Rersource Creation pages are not designed with subclassing in mind.
Summary: [Wizards] New Rersource Creation pages are not designed with subclassing in m...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows NT
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-02-17 17:13 EST by Mazen Faraj CLA
Modified: 2006-06-22 08:34 EDT (History)
1 user (show)

See Also:


Attachments
Java file demonstrating why I opened defect (7.58 KB, text/plain)
2002-08-09 13:08 EDT, Mazen Faraj CLA
no flags Details
Page resulting from previos Java attachment (118.97 KB, image/jpeg)
2002-08-09 13:13 EDT, Mazen Faraj CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mazen Faraj CLA 2002-02-17 17:13:14 EST
The docs for WizardNewFolderMainPage and WizardNewProjectCreationPage say that 
they can be subclassed. Yet their design is very restrictive. They are best to 
be used as is.
The current apis in these classes do not expose the widgets, or methods in 
them, which means that someone subclassing them really has little to work with. 
Specific Example: 
1) in the new folder page, how go I get what the user entered as a folder name?
If I ovveride handleEvent method, how do I know which widget caused the event? 
event.widget gives me the widget that actually caused the event, but I do not 
have a handle to the parent widgets to do compares against!

public void handleEvent(Event ev) {
		super.handleEvent(ev);
		System.out.println(ev);
		Widget source = ev.widget;
		if (source instanceof Text)
			System.out.println(((Text) source));
		else
			System.out.println(source);

	}
The above code will give me instances of Text objects for source, but how do I 
tell if this was "Enter or select the folder" text field or the "Folder name" 
text field?

Widgets used in these pages should be exposed to allow for subclasses to add 
listeners...

Mazen Faraj
Comment 1 Kevin Haaland CLA 2002-03-07 21:06:50 EST
Exposing the widgets is very dangerous. For example you would then be able to 
dispose them, change the layout in unexpected ways, add children, etc etc. This 
significantly increases the complexity and provides marginal improvements to 
the user. 

I am going to reclassify this defect report as a P3 enhancement.
Comment 2 Randy Giffen CLA 2002-08-09 12:47:32 EDT
Reopen to investigate
Comment 3 Mazen Faraj CLA 2002-08-09 13:08:37 EDT
Created attachment 1822 [details]
Java file demonstrating why I opened defect
Comment 4 Mazen Faraj CLA 2002-08-09 13:13:17 EDT
Created attachment 1823 [details]
Page resulting from previos Java attachment
Comment 5 Mazen Faraj CLA 2002-08-09 13:15:18 EDT
I have attached a subclass that demostrates what I was trying to do. 
I understand that my code has a terrible hack, but it was a trade off between 
quickly writting the wizard page, or having to rewrite it myself.
Comment 6 Tod Creasey CLA 2006-06-22 08:34:04 EDT
There are currently no plans to work on this feature