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

Bug 54548

Summary: [About] About dialog should obtain info from IProduct and IBundleGroup instead of platform configuration
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Andrew Eidsness <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on: 52213, 54574, 54790, 57528    
Bug Blocks: 54052    
Attachments:
Description Flags
patch
none
bug 54574 is resolved, remove hack from previous none

Description Nick Edgar CLA 2004-03-11 17:15:19 EST
build I20040310

As with bug 54547, the About dialog should be changed to get info from IProduct 
and IBundleGroup rather than the platform configuration.
Comment 1 Andrew Eidsness CLA 2004-04-05 12:31:42 EDT
Created attachment 9219 [details]
patch

The attached patch changes the AboutDialog to use the IProduct and IBundleGroup
constants.  With that change it was possible to remove references to AboutInfo
from the AboutDialog classes (this was an issue documented in the class
comments).

Removing references to AboutInfo was a large change by itself, but I took the
opportunity to fix a few other issues with the dialog.

1. The image buttons in previous version would open a FeaturesDialog with all
features.  The fix in this patch will open only features that have the same
provider and image (identity still based on CRC32).

2. There was a fair amount of code duplicated between AboutPlugins and
AboutFeatures.	I was able to create a common base class to deal with things
such as sorting by column.

3. Misc. other changes.

This patch contains one workaround for bug 54574.  That bug deals with a
problem in update, where BundleGroup.getBundles() is not yet implemented (an
empty array is returned).  When the "Plugins" button on the main AboutDialog is
pressed, the code still used PluginDescriptor, etc., to get a complete list of
bundles.  When bug 54574 is resolved, we will be able to remove that hack.

I didn't work around the problem when an AboutPlugins dialog is opened from a
feature.  Until the update bug is resolved, the plugins dialog will be empty in
that case.

I'll mark that bug as blocking this one, but I think the patch can be submitted
anyhow.
Comment 2 Nick Edgar CLA 2004-04-05 22:25:17 EDT
Thanks, I've released the patch with the following changes:

- fixed up broken refs from UIDialogs and UIDialogsAuto tests (recommend keeping
o.e.ui.tests loaded at all times)

- changed constructor to take the shell instead of the window
  - this simplified fixing up the tests, which parent the dialog under a test
harness shell, not a workbench window
    - this had apparently been broken for a while

- the IProduct and IBundleGroupProvider's are obtained in the constructor rather
than being passed in
  - all 3 callers would have done the same thing


I also encountered bug 57528 while testing.
Leaving this PR open to track bug 54574 and bug 57528.
Comment 3 Andrew Eidsness CLA 2004-04-07 13:28:58 EDT
Created attachment 9296 [details]
bug 54574 is resolved, remove hack from previous

Bug 54574 has been fixed; this patch removes the code that was using
IPluginDescriptors to get a list of all bundles.

This patch also fixes a problem I noticed where the wrong flags were being
passed to the Table layout objects.

Finally there was a potential problem with an array being shared rather than
copied.  The AboutDialog stores an array of bundle group data objects, and is
careful to put the product's bundle group at index 0.  This array was then
shared with the about feature's dialog, which might reorder the array during a
sort operation.  In practice this would not have been a problem *yet*, since
the about dialog has already use the special index 0 element before the about
features is opened.
Comment 4 Nick Edgar CLA 2004-04-07 13:56:41 EDT
Patch applied.  Is bug 54574 actually resolved?
Comment 5 Nick Edgar CLA 2004-04-13 15:48:05 EDT
Closing.