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 160182 Details for
Bug 302487
WST server discovery service lookup problem
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]
Combined patch for two problems
patch.txt (text/plain), 3.41 KB, created by
John Arthorne
on 2010-02-25 08:50:17 EST
(
hide
)
Description:
Combined patch for two problems
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2010-02-25 08:50:17 EST
Size:
3.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.server.discovery >Index: src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java,v >retrieving revision 1.7 >diff -u -r1.7 ExtensionUtility.java >--- src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java 20 Jan 2010 15:27:33 -0000 1.7 >+++ src/org/eclipse/wst/server/discovery/internal/ExtensionUtility.java 25 Feb 2010 13:48:46 -0000 >@@ -14,6 +14,7 @@ > import java.net.URL; > import java.util.*; > import org.eclipse.core.runtime.*; >+import org.eclipse.equinox.p2.core.IProvisioningAgent; > import org.eclipse.equinox.p2.engine.IProfile; > import org.eclipse.equinox.p2.engine.IProfileRegistry; > import org.eclipse.equinox.p2.metadata.IInstallableUnit; >@@ -240,11 +241,16 @@ > public static Object getService(BundleContext context, String name) { > if (context == null) > return null; >- ServiceReference reference = context.getServiceReference(name); >+ ServiceReference reference = context.getServiceReference(IProvisioningAgent.SERVICE_NAME); > if (reference == null) > return null; >- Object result = context.getService(reference); >- context.ungetService(reference); >- return result; >+ IProvisioningAgent result = (IProvisioningAgent) context.getService(reference); >+ if (result == null) >+ return null; >+ try { >+ return result.getService(name); >+ } finally { >+ context.ungetService(reference); >+ } > } > } >\ No newline at end of file >Index: src/org/eclipse/wst/server/discovery/internal/model/Extension.java >=================================================================== >RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.discovery/src/org/eclipse/wst/server/discovery/internal/model/Extension.java,v >retrieving revision 1.10 >diff -u -r1.10 Extension.java >--- src/org/eclipse/wst/server/discovery/internal/model/Extension.java 20 Jan 2010 15:27:39 -0000 1.10 >+++ src/org/eclipse/wst/server/discovery/internal/model/Extension.java 25 Feb 2010 13:48:46 -0000 >@@ -13,10 +13,10 @@ > import java.net.URI; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; >-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner; >-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest; > import org.eclipse.equinox.p2.engine.*; > import org.eclipse.equinox.p2.metadata.*; >+import org.eclipse.equinox.p2.planner.IPlanner; >+import org.eclipse.equinox.p2.planner.IProfileChangeRequest; > import org.eclipse.swt.graphics.Image; > import org.eclipse.wst.server.discovery.internal.Activator; > import org.eclipse.wst.server.discovery.internal.ExtensionUtility; >@@ -92,8 +92,8 @@ > > IProfileRegistry profileRegistry = (IProfileRegistry) ExtensionUtility.getService(bundleContext, IProfileRegistry.SERVICE_NAME); > IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF); >- ProfileChangeRequest pcr = new ProfileChangeRequest(profile); >- pcr.addInstallableUnits(new IInstallableUnit[] { iu } ); >+ IProfileChangeRequest pcr = planner.createChangeRequest(profile); >+ pcr.add(iu); > provContext = new ProvisioningContext(new URI[] { uri }); > provContext.setArtifactRepositories(new URI[] { uri }); > if (!explain)
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 302487
:
158765
| 160182