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 115932 Details for
Bug 248924
[plug-in registry] pde.runtime unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
patch.txt (text/plain), 5.17 KB, created by
Jacek Pospychala
on 2008-10-23 09:56:59 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jacek Pospychala
Created:
2008-10-23 09:56:59 EDT
Size:
5.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.runtime >Index: src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java,v >retrieving revision 1.1 >diff -u -r1.1 RegistryModel.java >--- src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java 20 Oct 2008 22:10:44 -0000 1.1 >+++ src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java 23 Oct 2008 13:50:17 -0000 >@@ -133,6 +133,10 @@ > > public void connect() { > backend.connect(); >+ >+ bundles = backend.initializeBundles(); >+ services = backend.initializeServices(); >+ extensionPoints = backend.initializeExtensionPoints(); > } > > public void disconnect() { >@@ -140,26 +144,14 @@ > } > > public Bundle[] getBundles() { >- if (bundles == null) { >- bundles = backend.initializeBundles(); >- } >- > return (Bundle[]) bundles.values().toArray(new Bundle[bundles.values().size()]); > } > > public ExtensionPoint[] getExtensionPoints() { >- if (extensionPoints == null) { >- extensionPoints = backend.initializeExtensionPoints(); >- } >- > return (ExtensionPoint[]) extensionPoints.values().toArray(new ExtensionPoint[extensionPoints.values().size()]); > } > > public ServiceRegistration[] getServices() { >- if (services == null) { >- services = backend.initializeServices(); >- } >- > return (ServiceRegistration[]) services.values().toArray(new ServiceRegistration[services.values().size()]); > } > >Index: src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java,v >retrieving revision 1.1 >diff -u -r1.1 RegistryModelFactory.java >--- src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java 20 Oct 2008 22:10:45 -0000 1.1 >+++ src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java 23 Oct 2008 13:50:17 -0000 >@@ -10,7 +10,6 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.runtime.registry.model; > >-import java.net.URI; > > /** > * Produces RegistryModels for URLs. Valid URLs: >@@ -23,10 +22,10 @@ > > /** > * >- * @param codename >+ * @param uri > * @return never returns null > */ >- public static RegistryModel getRegistryModel(URI codename) { >+ public static RegistryModel getRegistryModel(String uri) { > return new RegistryModel(new LocalRegistryBackend()); > } > } >Index: src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java,v >retrieving revision 1.1 >diff -u -r1.1 LocalRegistryBackend.java >--- src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java 20 Oct 2008 22:10:45 -0000 1.1 >+++ src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java 23 Oct 2008 13:50:17 -0000 >@@ -219,7 +219,14 @@ > } > > private static String createLocation(org.osgi.framework.Bundle bundle) { >- URL bundleEntry = bundle.getEntry("/"); //$NON-NLS-1$ >+ URL bundleEntry = null; >+ >+ try { >+ bundleEntry = bundle.getEntry("/"); //$NON-NLS-1$ >+ } catch (IllegalStateException e) { >+ return null; >+ } >+ > try { > bundleEntry = FileLocator.resolve(bundleEntry); > } catch (IOException e) { // do nothing >@@ -306,8 +313,7 @@ > } > > public void bundleChanged(BundleEvent event) { >- org.osgi.framework.Bundle bundle = event.getBundle(); >- Bundle adapter = createBundleAdapter(bundle); >+ Bundle adapter = createBundleAdapter(event.getBundle()); > > switch (event.getType()) { > case BundleEvent.INSTALLED : >Index: src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java,v >retrieving revision 1.64 >diff -u -r1.64 RegistryBrowser.java >--- src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java 20 Oct 2008 22:10:46 -0000 1.64 >+++ src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java 23 Oct 2008 13:50:17 -0000 >@@ -11,8 +11,6 @@ > *******************************************************************************/ > package org.eclipse.pde.internal.runtime.registry; > >-import java.net.URI; >-import java.net.URISyntaxException; > import java.util.*; > import java.util.List; > import org.eclipse.core.runtime.*; >@@ -129,11 +127,7 @@ > } > > public RegistryBrowser() { >- try { >- model = RegistryModelFactory.getRegistryModel(new URI("local")); >- } catch (URISyntaxException e) { >- PDERuntimePlugin.log(e); >- } >+ model = RegistryModelFactory.getRegistryModel("local"); > model.connect(); > > listener = new RegistryBrowserModelChangeListener(this);
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
Flags:
caniszczyk
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 248924
:
115930
|
115931
| 115932