[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] WizardWithLicenses enables finish before accepting license
- From: Susan Franklin McCourt <susan_franklin@xxxxxxxxxx>
- Date: Thu, 14 May 2009 11:21:13 -0700
- Delivered-to: firstname.lastname@example.org
can you update the bug with that info in case I forget?
I'm not wild about an async but I agree its symptomatic of a greater issue.
It may get us through 3.5....
I do want to let you know that this code is being used in the DSDP/Mobile Tools for Java-Pulsar project for release with the Galileo train, so it would be nice if it could be fixed for 3.5 given that this is MTJâs first release. :)
On 5/14/09 12:50 PM, "ext Susan Franklin McCourt" <susan_franklin@xxxxxxxxxx> wrote:
I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=276356 to document this issue.
I'll check the SDK and admin agent scenarios during the RC1 test pass. If there is indeed a problem in the SDK where licenses could be skipped, it will get addressed right away. Otherwise, it becomes a 3.6 issue.
I agree that the page creation/update buttons sequence is brittle/delicate.
The dynamic page calculation is a bit (ahem) ad hoc right now and this needs to be worked out before the wizards become API...
Subject: Re: [p2-dev] WizardWithLicenses enables finish before accepting license
My use of p2 is very limited to IUs with only native touchpoints and it would be difficult for me to setup a test case to use the standard p2 UIs since our IUs are not recognized by them. In any case, I donât think weâre calling the PreselectedIUInstallWizard in any way that is causing this problem. In fact, the problem seems like itâs in there lurking even if not visible in all types of WizardWithLicenses given when the license page is added (i.e., as a side effect of getNextPage()).
I was able to fix it by just adding an asyncExec calling getContainer().updateButtons() just after the license page is added. It seems that adding a wizard page that can potentially change the enablement of the finish button as a side effect of Wizard.getNextPage() which can be called during the enablement of buttons seems like a very brittle coding pattern and bound to cause problems in the long run. The reason that adding the asyncExec call to update the buttons again fixes it is that it causes the enablement to be reevaluated after the current operation during which itâs too late to get the state correct. Since the page is only added once, it is guaranteed not to cause an endless loop. Itâs not the best solution but is in the same spirit as adding a page as a side effect of returning state information. ;)
On 5/14/09 9:39 AM, "ext Susan Franklin McCourt" <susan_franklin@xxxxxxxxxx <susan_franklin@xxxxxxxxxx> > wrote:
can you reproduce the behavior in the SDK UI or in the admin agent? If yes, then please open a bug with specific steps (ie, a site to connect to, what to install, etc.).
Note that PreselectedIUInstallWizard is only used in the SDK as the error page of the install wizard, so it's possible that we don't have the same scenario you do in the SDK.
The admin agent uses PreselectedIUInstallWizard when you select items in the metadata repository viewer and choose install. Since this code is not exercised as much, it's possible that there's something missing in PreselectedIUInstallWizard.
If you can't reproduce in either the SDK or agent, then you could still open a bug including a code snippet that shows how you are launching the wizard...
<David.Dubrow@xxxxxxxxx <David.Dubrow@xxxxxxxxx> >
To: <p2-dev@xxxxxxxxxxx <p2-dev@xxxxxxxxxxx> >
Subject: [p2-dev] WizardWithLicenses enables finish before accepting license
I couldnât find an existing bugzilla addressing this but wanted to check here first.
I am currently calling PreselectedIUInstallWizard and I donât know whether this is an issue with the other wizards as well but it may be. In any case, the problem is that due to the ordering of calls between when the license page is added by WizardWithLicenses.getNextPage() and when canFInish() is called causes the finish button to be enabled prior to the user accepting licenses even though a license is provided by selected IUs. Of course, this allows users to install Ius without accepting the license. If next is pressed rather than finish, then the finish button is correctly disabled until the user accepts the license.
If you want me to log this bugzilla, please let me know.
david.dubrow@xxxxxxxxx <david.dubrow@xxxxxxxxx> <david.dubrow@xxxxxxxxx <david.dubrow@xxxxxxxxx> >
p2-dev mailing list
p2-dev mailing list
p2-dev mailing list