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

Bug 139589

Summary: Allow programmatic context for initially selected project in Generic Recorder Wizard
Product: z_Archived Reporter: Jeff Nevicosi <nevicosi>
Component: TPTPAssignee: Paul Slauenwhite <paulslau>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: jkubasta, paulslau
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 208110    
Attachments:
Description Flags
Patch none

Description Jeff Nevicosi CLA 2006-05-01 15:57:55 EDT
Allow programmatic context for initially selected project in Generic Recorder Wizard.

A consuming wizard will create a project & then launch the GRF.  In this case, have the created project preselected in the provided pages.
Comment 1 Jeff Nevicosi CLA 2006-05-05 13:49:11 EDT
Must defer to 4.3, since this requires changing/breaking API.
Comment 2 Jeff Nevicosi CLA 2006-10-19 16:10:11 EDT
reassigning to new Generic Recorder Framework owner.

Jerome, please reassign if this isn't your area.  Thanks.
Comment 3 Mark D Dunn CLA 2007-01-16 16:31:04 EST
Add estimate.
Comment 4 Paul Slauenwhite CLA 2007-01-26 08:25:17 EST
Targeting to future since not containable in 4.4.
Comment 5 Paul Slauenwhite CLA 2007-01-26 08:59:13 EST
As discussed on this week's Test Project call (January 22, 2007), the Test Project will focus on existing P1 - P2/Blocker - Major and P1/Normal and test creation/automation defects (omitting defects dependant on outstanding features) in TPTP 4.4.  All other Test Project defects have been targeted to future.

If this defect has been targeted to future and you/originator feel it should be completed in 4.4, please provide the necessary reason as a reply to this comment or a post to the Test Project mailing list (tptp-test-tooling-dev@eclipse.org).  We will collectively triage and assess our resources to determine a case-by-case decision. 
Comment 6 Paul Slauenwhite CLA 2007-01-26 09:00:51 EST
As discussed on this week's Test Project call (January 22, 2007), the Test Project will focus on existing P1 - P2/Blocker - Major and P1/Normal and test creation/automation defects (omitting defects dependant on outstanding features) in TPTP 4.4.  All other Test Project defects have been targeted to future.

If this defect has been targeted to future and you/originator feel it should be completed in 4.4, please provide the necessary reason as a reply to this comment or a post to the Test Project mailing list (tptp-test-tooling-dev@eclipse.org).  We will collectively triage and assess our resources to determine a case-by-case decision. 
Comment 7 Paul Slauenwhite CLA 2007-01-26 09:03:10 EST
Correction:  The Test Project mailing list is tptp-testing-tools-dev@eclipse.org.
Comment 8 Paul Slauenwhite CLA 2007-10-11 12:52:43 EDT
Since there are no Test project types in TPTP, this defect is only for selecting the context-sensitive project in the location page used to launch the GRF wizard.
Comment 9 Paul Slauenwhite CLA 2007-10-11 12:54:42 EDT
Duwayne, please provide a sizing.
Comment 10 Paul Slauenwhite CLA 2007-11-07 06:33:01 EST
Bulk update of the target field to reflect the change in iteration numbers.
Comment 11 Paul Slauenwhite CLA 2008-03-10 10:41:53 EDT
I will handle this with enhancement 208110.
Comment 12 Paul Slauenwhite CLA 2008-03-11 14:51:39 EDT
Jeff, are you looking for something more than the user selecting a project in a navigator/explorer and have that select made available to the subsequent GRF wizard pages?
Comment 13 Paul Slauenwhite CLA 2008-03-11 15:36:39 EDT
(In reply to comment #12)
> Jeff, are you looking for something more than the user selecting a project in a
> navigator/explorer and have that select made available to the subsequent GRF
> wizard pages?
> 

I am also assumming you are only referring to the default org.eclipse.tptp.test.provisional.recorder.ui.wizards.TestsuiteLocationWizardPage.java page of the GRF wizard.  Extenders may determine the selection by calling org.eclipse.tptp.test.internal.recorder.ui.wizards.NewTestFromRecordingWizard#getSelection().
Comment 14 Jeff Nevicosi CLA 2008-03-12 12:55:01 EDT
It wasn't the intention of this defect to preselect based on Navigator context (although that's a good idea).

Extending project has an additional wizard (let's call it NewTestProjectWizard)

1) NewTestProjectWizard creates a project with a user-specified name.
2) Upon successful completion, NewTestProjectWizard then launches NewTestFromRecordingWizard

The intention is to preselect the testsuite container to the project which was just created.  One design thought is to create another constructor NewTestProjectWizard(IContainer).  Another (by Paul), was to use HyadesWizard.getSelection() & add support for this to IGenericRecordingWizardPage

The original thought was for this only to be used by the default page: TestsuiteLocationWizardPage.  However, a simple API could be made available (e.g. NewTestFromRecordingWizard.getDefaultContainer() ), which could be used by all extenders.
Comment 15 Paul Slauenwhite CLA 2008-03-13 07:59:24 EDT
The following files checked-in to CVS (HEAD):

I am assuming you meant NewTestFromRecordingWizard
(IContainer) and not NewTestProjectWizard(IContainer).


Comment 16 Paul Slauenwhite CLA 2008-03-13 11:13:20 EDT
Created attachment 92450 [details]
Patch
Comment 17 Paul Slauenwhite CLA 2008-03-13 11:27:58 EDT
This patch fixes two issues:

1) The GRF was not providing the selection in the active workbench window to the wizard pages.  Added org.eclipse.tptp.test.provisional.recorder.ui.wizards.IRecorderPageProvider.WIZARD_KEY_INITIAL_STRUCTURED_SELECTION that allows IGenericRecorderWizard implementations to provide IStructuredSelections to its wizard pages by calling the IGenericRecorderWizard#getRecorderObjectData(IRecorderPageProvider.WIZARD_KEY_INITIAL_STRUCTURED_SELECTION) method.  In addition, the org.eclipse.tptp.test.internal.recorder.ui.wizards.NewTestFromRecordingWizard.java was updated to retrieve the selection from the super class (org.eclipse.hyades.ui.internal.wizard.HyadesWizard.getSelection()).

2) When programmatically instantiating the org.eclipse.tptp.test.internal.recorder.ui.wizards.NewTestFromRecordingWizard.java, calling the org.eclipse.hyades.ui.internal.wizard.HyadesWizard.init(IWorkbench, IStructuredSelection) method had no effect since the IStructuredSelection was not respected.  For example, org.eclipse.hyades.internal.execution.recorder.ui.actions.NewGenericRecordingAction.run().  Now, the GRF provides the the selection in the active workbench window to the default wizard pages.
Comment 18 Paul Slauenwhite CLA 2008-03-13 12:20:54 EDT
Patch checked in to CVS (HEAD).
Comment 19 Jeff Nevicosi CLA 2008-05-23 18:19:32 EDT
verified. closed.