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 57470 Details for
Bug 171584
Bundles are now in STARTING state for a long time
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]
patch
org.eclipse.ui.workbench.patch (text/plain), 4.24 KB, created by
Thomas Watson
on 2007-01-24 15:32:07 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Thomas Watson
Created:
2007-01-24 15:32:07 EST
Size:
4.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java,v >retrieving revision 1.13 >diff -u -r1.13 BundleUtility.java >--- Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java 8 May 2006 20:55:52 -0000 1.13 >+++ Eclipse UI/org/eclipse/ui/internal/util/BundleUtility.java 24 Jan 2007 20:24:37 -0000 >@@ -16,6 +16,7 @@ > import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; >+import org.eclipse.ui.internal.WorkbenchPlugin; > import org.osgi.framework.Bundle; > > /** >@@ -31,7 +32,9 @@ > } > > public static boolean isActivated(Bundle bundle) { >- return bundle != null && (bundle.getState() & (Bundle.STARTING | Bundle.ACTIVE | Bundle.STOPPING)) != 0; >+ if ((bundle.getState() & Bundle.STARTING) != 0) >+ return WorkbenchPlugin.getDefault().isStarting(bundle); >+ return bundle != null && (bundle.getState() & (Bundle.ACTIVE | Bundle.STOPPING)) != 0; > } > > // TODO: needs a better name >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java,v >retrieving revision 1.144 >diff -u -r1.144 WorkbenchPlugin.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java 20 Dec 2006 21:01:46 -0000 1.144 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java 24 Jan 2007 20:24:37 -0000 >@@ -12,7 +12,7 @@ > package org.eclipse.ui.internal; > > import java.io.OutputStream; >-import java.util.Locale; >+import java.util.*; > > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IConfigurationElement; >@@ -62,11 +62,7 @@ > import org.eclipse.ui.presentations.AbstractPresentationFactory; > import org.eclipse.ui.views.IViewRegistry; > import org.eclipse.ui.wizards.IWizardRegistry; >-import org.osgi.framework.Bundle; >-import org.osgi.framework.BundleContext; >-import org.osgi.framework.BundleListener; >-import org.osgi.framework.InvalidSyntaxException; >-import org.osgi.framework.ServiceReference; >+import org.osgi.framework.*; > > import com.ibm.icu.text.MessageFormat; > >@@ -89,7 +85,7 @@ > * calls createExecutableExtension to create an executable > * instance of our workbench class. > */ >-public class WorkbenchPlugin extends AbstractUIPlugin { >+public class WorkbenchPlugin extends AbstractUIPlugin implements SynchronousBundleListener{ > > private static final String LEFT_TO_RIGHT = "ltr"; //$NON-NLS-1$ > private static final String RIGHT_TO_LEFT = "rtl";//$NON-NLS-1$ >@@ -119,6 +115,9 @@ > // The context within which this plugin was started. > private BundleContext bundleContext; > >+ // The set of currently starting bundles >+ private Collection startingBundles = new HashSet(); >+ > /** > * Global workbench ui plugin flag. Only workbench implementation is allowed to use this flag > * All other plugins, examples, or test cases must *not* use this flag. >@@ -844,6 +843,7 @@ > * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) > */ > public void start(BundleContext context) throws Exception { >+ context.addBundleListener(this); > super.start(context); > bundleContext = context; > >@@ -1153,5 +1153,30 @@ > } > return null; > } >+ >+ /* (non-Javadoc) >+ * @see org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent) >+ */ >+ public void bundleChanged(BundleEvent event) { >+ synchronized (startingBundles) { >+ switch (event.getType()) { >+ case BundleEvent.STARTING : >+ startingBundles.add(event.getBundle()); >+ break; >+ case BundleEvent.STARTED : >+ case BundleEvent.STOPPED : >+ startingBundles.remove(event.getBundle()); >+ break; >+ default : >+ break; >+ } >+ } >+ } >+ >+ public boolean isStarting(Bundle bundle) { >+ synchronized (startingBundles) { >+ return startingBundles.contains(bundle); >+ } >+ } > > }
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 171584
:
57464
| 57470