[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

  • From: Wade Chandler < >
  • To: "nbdev@netbeans org" < >
  • Subject: [nbdev] Re: Problem with Lookup.getDefault().lookupAll()
  • Date: Fri, 29 Mar 2013 19:09:11 -0400

The positions are relative to the lookup of specific service interfaces you have annotated them to represent. So if you have the same class annotated as providing multiple service interfaces different orders would be applied depending on your query to the lookup; the specific class being requested. In case of lookupAll no such query is being applied, and I don't think ordering we be a function of positions as much as the order they are discovered and classloaders.

Wade

On Mar 29, 2013 6:39 PM, "Hermann Matthes" < "> > wrote:
Hello all,
I have a problem with the orderLookup.getDefault().lookupAll(ITaskPaneProvider.class) returns my ServiceProviders.

I have 4 ServiceProviders with the following position property:

  • TaskPaneAdminProvider: 1000
  • TaskPaneConfigProvider: 2000
  • TaskPaneCustomizingProvider: 3000
  • TaskPaneMiscellaneousProvider: 10000

This is the sequence I thought Lookup.getDefault().lookupAll() would return them. But the received order is:

  1. TaskPaneCustomizingProvider
  2. TaskPaneMiscellaneousProvider
  3. TaskPaneAdminProvider
  4. TaskPaneConfigProvider
Whats my fault?

Hermann


[nbdev] Problem with Lookup.getDefault().lookupAll()

Hermann Matthes 03/29/2013

[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

Wade Chandler 03/29/2013

[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

Hermann Matthes 03/30/2013

[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

Wade Chandler 03/30/2013

[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

Hermann Matthes 03/30/2013

[nbdev] Re: Problem with Lookup.getDefault().lookupAll()

Wade Chandler 03/30/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close