File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1313 *******************************************************************************/
1414package org .eclipse .pde .internal .core ;
1515
16+ import java .lang .reflect .InvocationTargetException ;
17+ import java .lang .reflect .Method ;
1618import java .util .Dictionary ;
1719import java .util .HashSet ;
1820import java .util .LinkedHashMap ;
@@ -57,10 +59,20 @@ public void run(IProgressMonitor monitor) throws CoreException {
5759 }
5860 SubMonitor subMonitor = SubMonitor .convert (monitor , fModels .size () + 1 );
5961 fState = FACTORY .createState (true );
62+ int id = 0 ;
6063 for (IPluginModelBase fModel : fModels ) {
6164 BundleDescription bundle = fModel .getBundleDescription ();
6265 if (bundle != null ) {
63- fState .addBundle (FACTORY .createBundleDescription (bundle ));
66+ BundleDescription bundleDescription = FACTORY .createBundleDescription (bundle );
67+ try {
68+ Method declaredMethod = bundleDescription .getClass ().getDeclaredMethod ("setBundleId" , long .class ); //$NON-NLS-1$
69+ declaredMethod .setAccessible (true );
70+ declaredMethod .invoke (bundleDescription , id ++);
71+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
72+ | InvocationTargetException e ) {
73+ e .printStackTrace ();
74+ }
75+ fState .addBundle (bundleDescription );
6476 }
6577 subMonitor .split (1 );
6678 }
You can’t perform that action at this time.
0 commit comments