Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334727

Summary: [ui] license manager should come from the agent
Product: [Eclipse Project] Equinox Reporter: Jeff McAffer <jeffmcaffer>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: irbull
Version: 3.7Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: stalebug

Description Jeff McAffer CLA 2011-01-18 21:27:20 EST
in the current code
   org.eclipse.equinox.p2.ui.ProvisioningUI.getLicenseManager()
looks up the license manager OSGi service.  This means that while there can be multiple agents and provisioning UIs for each agent, the UI assumes all agents use the same license manager.

We should be able to use a code pattern similar to that used for the RepositoryTracker to eliminate this linkage.  

Note that all obvious uses of the LicenseManager call the getLicenseManager method on ProvisioningUI so fixing that should be sufficient.
Comment 1 DJ Houghton CLA 2011-01-21 14:55:25 EST
I'm not sure what you mean w.r.t. the RepositoryTracker. In that class, the repository tracker doesn't go through the agent and just does a regular service lookup.

I tried changing (both) code to getSession().getProvisiningAgent().getService(xx) but the tests failed with a bunch of NPEs from the repository tracker being null. I guess it isn't just a straight substitution?
Comment 2 Jeff McAffer CLA 2011-01-21 15:33:59 EST
you are completly right.  The RepositoryTracker changes have not yet been committed.  Doh! Susan and I have been working on a patch in Bug 332314 that makes RepositoryTracker (amongst other things) agent-specific.

In the case of the license manager it should be relatively easy to just create an agent service factory and use DS in the common way we do or other agent services.
Comment 3 Ian Bull CLA 2011-04-21 13:55:03 EDT
moving out.
Comment 4 Thomas Watson CLA 2011-06-08 11:30:31 EDT
Move all 3.8 bugs to Juno.
Comment 5 Eclipse Genie CLA 2019-04-12 13:04:27 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Lars Vogel CLA 2019-10-09 07:04:14 EDT
This bug was marked as stalebug a while ago. Marking as wontfix.

If this report is still relevant for the current release, please
reopen and remove the stalebug whiteboard tag.