Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 258722 - [ui] Can't install from admin ui
Summary: [ui] Can't install from admin ui
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 268628 270502 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-12 22:40 EST by Pascal Rapicault CLA
Modified: 2009-03-30 15:31 EDT (History)
3 users (show)

See Also:


Attachments
ProvAdminUI fixes (11.92 KB, patch)
2009-03-26 16:22 EDT, Matthew Piggott CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2008-12-12 22:40:30 EST
With the code from HEAD, I can not install using the admin ui because the install button is grayed out.
Also note that the size displayed in the dialog is 0 (bug #258115)
Comment 1 Susan McCourt CLA 2008-12-13 21:34:07 EST
Can you give more detail...the repo and what was selected?
Comment 2 Pascal Rapicault CLA 2008-12-14 20:15:26 EST
I was connected at the http://download.eclipse.org/eclipse/updates/3.5-I-builds trying to install the org.eclipse.platform.ide product.
Comment 3 John Arthorne CLA 2008-12-15 12:00:26 EST
I had problems like this, but discovered I had to hit Back, and select the item to install on the first page. It looks like it opens directly on page 2 but page 1 has nothing selected so ultimately it fails.
Comment 4 Susan McCourt CLA 2008-12-15 15:25:08 EST
I think I know what this is about...there is some pseudo-API that only the admin UI uses to preselect the IU's in this wizard, and it's possible that it doesn't work correctly with certain view modes of the wizard.  This needs more testing.
Comment 5 Pascal Rapicault CLA 2009-03-13 21:54:10 EDT
*** Bug 268628 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Piggott CLA 2009-03-26 16:22:04 EDT
Created attachment 130013 [details]
ProvAdminUI fixes

When working on this I ran into several other problems that I needed to fix before I was able to reach the finish button.  Here's an overview of the changes:

Could not add repository
- added Repository manipulator to the policy in ProvAdminUIActivator

Cannot install IUs when viewing by category
- modified InstallAction#isSelectable() to return true if the parent of the IU is a CategoryElement

Finish button is disabled:
- InstallAction#performAction() creates PreselectedIUInstallWizard instead of InstallWizard when when ius != null && ius.length > 0
- Added new InstallAction#computeProfileChangeRequest() which creates the IUElementListRoot

See also bug 270162 for Artifact Repositories displayed multiple times.
Comment 7 Susan McCourt CLA 2009-03-26 18:04:59 EDT
Thanks for the patch, and for catching the other issues.
Reviewed patch and committed >20090326.

Changes I made to the patch:
> - modified InstallAction#isSelectable() to return true if the parent of the IU
> is a CategoryElement
- this wouldn't work in the case of nested categories, we'd have a nested category that was considered selectable.  Instead, I changed it to return true if the parent were not an instance of AvailableIUElement (vs. IIUElement which can include categories).  We know that in the install case the elements are AvailableIUElements or CategoryElements

- I added a test case to test selectability for an IU in a category element and an IU in a nested category element.

> Finish button is disabled:
> - InstallAction#performAction() creates PreselectedIUInstallWizard instead of
> InstallWizard when when ius != null && ius.length > 0
- I didn't see the this ius check (null or length) in the patch, but I don't think it's necessary because the performAction() won't run if the selection is empty.  I'm assuming you noticed this between the time you wrote this and submitted the patch.


> - Added new InstallAction#computeProfileChangeRequest() which creates the
> IUElementListRoot
- I didn't really want to pollute the static method, which is trafficking solely in profile change request (non-element) issues, with knowledge of the viewer elements or a wizard's root structure.  I also didn't want to change the static method unless I had to since it's used outside of the admin UI. Instead, I changed the new PreselectedIUsWizard to make the root based on the IU's passed into the wizard.  This is how the other Uninstall wizard does it.

- I changed the wizard message strings to be more consistent with existing
- added copyright on new file
Comment 8 Susan McCourt CLA 2009-03-30 15:31:40 EDT
*** Bug 270502 has been marked as a duplicate of this bug. ***