Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 9296 Details for
Bug 54548
[About] About dialog should obtain info from IProduct and IBundleGroup instead of platform configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
bug 54574 is resolved, remove hack from previous
ide.4 (text/plain), 6.28 KB, created by
Andrew Eidsness
on 2004-04-07 13:28:58 EDT
(
hide
)
Description:
bug 54574 is resolved, remove hack from previous
Filename:
MIME Type:
Creator:
Andrew Eidsness
Created:
2004-04-07 13:28:58 EDT
Size:
6.28 KB
patch
obsolete
>Index: src/org/eclipse/ui/internal/ide/AboutData.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/AboutData.java,v >retrieving revision 1.1 >diff -u -r1.1 AboutData.java >--- src/org/eclipse/ui/internal/ide/AboutData.java 6 Apr 2004 02:11:45 -0000 1.1 >+++ src/org/eclipse/ui/internal/ide/AboutData.java 7 Apr 2004 17:16:01 -0000 >@@ -32,6 +32,7 @@ > private String name; > private String version; > private String id; >+ private String versionedId = null; > > protected AboutData(String providerName, String name, String version, String id) { > this.providerName = providerName == null ? "" : providerName; //$NON-NLS-1$ >@@ -54,6 +55,12 @@ > > public String getVersion() { > return version; >+ } >+ >+ public String getVersionedId() { >+ if(versionedId == null) >+ versionedId = getId() + "_" + getVersion(); //$NON-NLS-1$ >+ return versionedId; > } > > /** >Index: src/org/eclipse/ui/internal/ide/dialogs/AboutFeaturesDialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/AboutFeaturesDialog.java,v >retrieving revision 1.6 >diff -u -r1.6 AboutFeaturesDialog.java >--- src/org/eclipse/ui/internal/ide/dialogs/AboutFeaturesDialog.java 6 Apr 2004 02:11:45 -0000 1.6 >+++ src/org/eclipse/ui/internal/ide/dialogs/AboutFeaturesDialog.java 7 Apr 2004 17:16:01 -0000 >@@ -108,9 +108,14 @@ > setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.APPLICATION_MODAL); > > this.productName = productName; >- this.bundleGroupInfos = bundleGroupInfos; > >- AboutData.sortByProvider(reverseSort, bundleGroupInfos); >+ // the order of the array may be changed due to sorting, so create a >+ // copy >+ this.bundleGroupInfos = new AboutBundleGroupData[bundleGroupInfos.length]; >+ System.arraycopy(bundleGroupInfos, 0, this.bundleGroupInfos, 0, >+ bundleGroupInfos.length); >+ >+ AboutData.sortByProvider(reverseSort, this.bundleGroupInfos); > } > > /** >@@ -245,8 +250,7 @@ > createTable(outer); > createInfoArea(outer); > >- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL, >- GridData.VERTICAL_ALIGN_FILL, true, true); >+ GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true); > gridData.heightHint = convertVerticalDLUsToPixels(TABLE_HEIGHT); > table.setLayoutData(gridData); > >@@ -431,8 +435,7 @@ > if (map == null) > return null; > >- String key = info.getId() + "_" + info.getVersion(); //$NON-NLS-1$ >- return (IFeature) map.get(key); >+ return (IFeature) map.get(info.getVersionedId()); > } > > /** >Index: src/org/eclipse/ui/internal/ide/dialogs/AboutPluginsDialog.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/AboutPluginsDialog.java,v >retrieving revision 1.7 >diff -u -r1.7 AboutPluginsDialog.java >--- src/org/eclipse/ui/internal/ide/dialogs/AboutPluginsDialog.java 6 Apr 2004 02:11:45 -0000 1.7 >+++ src/org/eclipse/ui/internal/ide/dialogs/AboutPluginsDialog.java 7 Apr 2004 17:16:01 -0000 >@@ -13,9 +13,12 @@ > package org.eclipse.ui.internal.ide.dialogs; > > import java.net.URL; >-import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.LinkedList; >+import java.util.Map; > >-import org.eclipse.core.runtime.IPluginDescriptor; >+import org.eclipse.core.runtime.IBundleGroup; >+import org.eclipse.core.runtime.IBundleGroupProvider; > import org.eclipse.core.runtime.Platform; > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.MessageDialog; >@@ -106,25 +109,37 @@ > this.helpContextId = helpContextId; > this.productName = productName; > >- ArrayList list = new ArrayList(bundles.length); >- for(int i = 0; i < bundles.length; ++i ) >- list.add(new AboutBundleData(bundles[i])); >- bundleInfos = (AboutBundleData[])list.toArray(new AboutBundleData[0]); >+ // create a data object for each bundle, remove duplicates >+ Map map = new HashMap(); >+ for (int i = 0; i < bundles.length; ++i) { >+ AboutBundleData data = new AboutBundleData(bundles[i]); >+ if (!map.containsKey(data.getVersionedId())) >+ map.put(data.getVersionedId(), data); >+ } >+ bundleInfos = (AboutBundleData[]) map.values().toArray( >+ new AboutBundleData[0]); > > AboutData.sortByProvider(reverseSort, bundleInfos); > } > >- // TODO when bug 54574 is fixed, this should be changed to use bundle >- // providers -> bundle groups -> bundles > private static Bundle[] getAllBundles() { >- IPluginDescriptor[] descs = Platform.getPluginRegistry().getPluginDescriptors(); >- Bundle[] bundles = new Bundle[descs.length]; >- for(int i = 0; i < descs.length; ++i) >- bundles[i] = Platform.getBundle(descs[i].getUniqueIdentifier()); >+ LinkedList result = new LinkedList(); > >- return bundles; >- } >+ IBundleGroupProvider[] providers = Platform.getBundleGroupProviders(); >+ if (providers != null) >+ for (int i = 0; i < providers.length; ++i) { >+ IBundleGroup[] bundleGroups = providers[i].getBundleGroups(); >+ for (int j = 0; j < bundleGroups.length; ++j) { >+ Bundle[] bundles = bundleGroups[i].getBundles(); >+ for (int k = 0; k < bundles.length; ++k) { >+ result.add(bundles[k]); >+ } >+ } >+ } > >+ return (Bundle[]) result.toArray(new Bundle[result.size()]); >+ } >+ > /* > * (non-Javadoc) Method declared on Dialog. > */ >@@ -251,8 +266,7 @@ > item.setData(bundleInfos[i]); > } > >- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL, >- GridData.VERTICAL_ALIGN_FILL, true, true); >+ GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true); > gridData.heightHint = convertVerticalDLUsToPixels(TABLE_HEIGHT); > vendorInfo.setLayoutData(gridData); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54548
:
9219
| 9296