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

  • From: Wade Chandler < >
  • To: "nbdev@netbeans org" < >
  • Subject: [nbdev] Re: Problem with Lookup.getDefault().lookupAll()
  • Date: Sat, 30 Mar 2013 08:24:32 -0400

:-) That is true. Interesting. Is your project Ant or Maven based? The default for Maven used to be turn compile on save on by default. As of 7.3 it is off by default; though the IDE will put up a nagging bubble on builds trying to get you to turn it on. Annotation funkiness was the issue. Maven will only recompile changes anyways, so it works out OK without that. In 7.2.1 I had to turn that off for my projects, clean and build them, and then the workflow worked as expected even when adding and changing annotations. Without that if you made a new class, and added some annotations, things would be random. The @Messages annotation would often cause exceptions etc if changes were made to a class using it. Just as an FYI.

Wade

On Mar 30, 2013 5:12 AM, "Hermann Matthes" < "> > wrote:
Sometimes the solutions is quiet simple: clean&build.

Am 30.03.2013 00:09, schrieb Wade Chandler:

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" < " target="_blank"> > 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 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close