Skip navigation links

Introduction

What do the Dates Mean?

The supplied dates indicate when the API change was made, on the CVS trunk. From this you can generally tell whether the change should be present in a given build or not; for trunk builds, simply whether it was made before or after the change; for builds on a stabilization branch, whether the branch was made before or after the given date. In some cases corresponding API changes have been made both in the trunk and in an in-progress stabilization branch, if they were needed for a bug fix; this ought to be marked in this list.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:

OpenIDE-Module-Module-Dependencies: $codebase > 1.20

Changes by affected class

org.openide.util.lookup.AbstractLookup

org.openide.util.lookup.InstanceContent

org.openide.filesystems.annotations.LayerGeneratingProcessor

org.openide.util.Lookup

org.openide.util.LookupEvent

org.openide.util.LookupListener

org.openide.util.lookup.Lookups

org.openide.util.lookup.NamedServiceDefinition

org.openide.util.lookup.ProxyLookup

org.openide.util.lookup.ServiceProvider

org.openide.util.lookup.ServiceProviders


Details of all changes by API and date


Lookup API

Add ProxyLookup.Controller to set lookups dynamically without subclassing

Jul 4 '20; API spec. version: 8.43; affected top-level classes: ProxyLookup; made by: tboudreau; issues: NETBEANS-4699

One of the most common usages of ProxyLookup is to dynamically change the set of lookups being delegated to. However the setLookups(...) method is protected. To avoid the need to subclass ProxyLookup this change introduces ProxyLookup.Controller that gives the creator of ProxyLookup a way to call setLookups(...) without exposing the method to others having just a reference to the ProxyLookup.

Declare support for all source levels.

Oct 18 '19; API spec. version: 8.40; affected top-level classes: org.openide.filesystems.annotations.LayerGeneratingProcessor; made by: sdedic; issues: NETBEANS-3250

Typically AbstractServiceProviderProcessor subclasses declare some SourceVersion support, but as new JDKs are released, the declaration becomes obsolete and produces spurious warnings. The processors are typically not affected by newer Java language features.

This change changes the default behaviour if NO @SupportedSourceVersion annotation is present on subclass. From 8.40, the Processor will report @SourceVersion.latest().

A way to control Lookup.getDefault

Oct 22 '14; API spec. version: 8.30; affected top-level classes: Lookups; made by: jtulach; issues: #247930

One can use Lookups.execute(yourLookup, yourRunnable) to temporarily influence return value from Lookup.getDefault().


Compatibility: The clients of Lookup.getDefault() are mostly unaffected by this change, just they need to be ready for the fact that the return value of the method may no longer be fixed one, but can mutate over time.

Easy and robust way to register named services

Mar 27 '12; API spec. version: 8.14; affected top-level classes: NamedServiceDefinition; made by: jtulach; issues: #209780

Meta annotation NamedServiceDefinition for those who define their own annotations that register something into Lookups.forPath registration area.

ProxyLookup computes results lazily

Mar 10 '12; API spec. version: 8.13; made by: jtulach; issues: #209322

ProxyLookup.lookupAll().iterator() is now incremental. E.g. you can use traverse part of the results without waiting for or creating all of them:

            for (URLStreamHandlerFactory first : Lookup.getDefault().lookupAll(URLStreamHandlerFactory.class)) {
    return first;
}
           
        

Compatibility:

Calling ProxyLookup.lookupAll() and other methods that compute aggregate results delays computation of the result. This may affect code which called Lookup.Result.allItems, allInstances or allClasses and relied on side effect of such call. In case you want to trigger the computation call some method on the returned Collection (other than iterator()) like size() or isEmpty.

Introducing semihidden SPI

Jan 15 '10; API spec. version: 8.1; made by: jtulach; issues: #179289

Adding SPI interface package for those who implement the NetBeans platform. This package is not shown in Javadoc as it does not form a generally available public API.

Separate module for Lookup API

Dec 20 '09; API spec. version: 8.0; affected top-level classes: Lookup AbstractLookup ProxyLookup Lookups; made by: jtulach; issues: #170056

Lookup and its associated interfaces are now available as a separate module.


Compatibility:

Runtime compatibility remains, compile time compatibility is mostly preserved too. It is however recommended to upgrade dependencies of your modules. Try running ant fix-dependencies in your Ant module.

Added org.openide.util.Lookup.paths property

Jun 19 '09; API spec. version: 7.24; affected top-level classes: Lookup; made by: jtulach; issues: #166782

Better way to integrate Lookup.getDefault() and system filesystem.

Added ServiceProvider annotation

Nov 1 '08; API spec. version: 7.20; affected top-level classes: ServiceProvider ServiceProviders; made by: jglick; issues: #150447

Added annotations ServiceProvider and ServiceProviders to simplify registration of global singleton services.


Compatibility:

Modules registering services using META-INF/services files in the source tree are encouraged to switch to the annotation.

AbstractLookup and ProxyLookup fire changes asynchronously

Jun 27 '08; API spec. version: 7.16; affected top-level classes: AbstractLookup ProxyLookup InstanceContent; made by: jtulach; issues: #134297

All modification methods in AbstractLookup and ProxyLookup were extended to accept an Executor. If not null, it is used to dispatch events to listeners sometime "later". Also the AbstractLookup.Content and InstanceContent constructors have been extended to accept such Executors.

Added simplified support for named lookups Lookups.forPath

Apr 17 '07; API spec. version: 7.9; affected top-level classes: Lookups; made by: jtulach; issues: #98426

New method Lookups.forPath(String) has been added to replace now deprecated FolderLookup and allow modules who wants to read settings from layers to do so with a simpler code, without dependency on DataSystems API.

Convenience methods added to Lookup

Apr 3 '06; API spec. version: 6.10; affected top-level classes: Lookup; made by: jglick; issues: #73848

Two methods, lookupResult and lookupAll, were added to Lookup to encapsulate the most common usage patterns with less typing, and more importantly avoiding the need to explicitly make a Lookup.Template object.


Compatibility:

Could conceivably conflict with existing subclass method with same signature with different semantics or return type.


Binary-compatible

Less change notifications from ProxyLookup

Nov 11 '05; API spec. version: 6.7; affected top-level classes: ProxyLookup AbstractLookup; made by: jtulach; issues: #68031
ProxyLookup.setLookups used to fire LookupEvent every time it was called. Now it always checks whether there was a change to the previous state. This will reduce the number of events delivered when a small change is made. Also results from both ProxyLookup and AbstractLookup were modified to return immutable Collections. So do not try to modify them. It was always documented that the results, are immutable and also it was never said that a change is delivered when there is no change in the result, so this is considered compatible change, even it is know that at least one piece of code in NetBeans relied on this behaviour.

Lookups.exclude added to simplify writing of lookups that filter content of other lookups

Jan 14 '05; API spec. version: 5.4; affected top-level classes: Lookups; made by: jtulach; issues: #53058

New method that takes lookup and set of classes and return new lookup which contains everything from the original one except instances of the specified classes has been added.

Added ability to order items in META-INF/services/ lookup

May 9 '04; API spec. version: 4.34; affected top-level classes: Lookups; made by: dkonecny; issues: #41606
Items in META-INF/services/ lookup can be followed by advisory "position" attribute. The resulting lookup will list first items with lower position value. Items without position attribute will be listed last. See documentation for more details on format.

New lookupItem() method in Lookups

Jul 9 '03; API spec. version: 4.8; affected top-level classes: Lookups; made by: vstejskal
New method that returns Lookup.Item implementation for given instance and key identifying that instance in the lookup. This method is useful when writing Looks which need to return some cookies (Collection of Lookup.Items).

New method Lookups.metaInfServices

Feb 5 '03; API spec. version: 3.35; affected top-level classes: Lookups; made by: dstrupl; issues: #29126
A lookup that implements the JDK1.3 JAR services mechanism and delegates to META-INF/services/name.of.class files. This lookup was (is) used by core and the core had to use reflection to create an instance. Moreover can be usefull for module authors and in standalone library.

Folder lookup may be serialized

Jan 7 '03; API spec. version: 3.27; affected top-level classes: AbstractLookup ProxyLookup; made by: jglick; issues: #20190
To implement lookup caching, some lookup implementations are now serializable: AbstractLookup as well as FolderLookup's lookup. ProxyLookup has a protected subclass constructor permitting subclasses to be serializable.
Compatibility: Modules which rely on a data object under Services/ gaining or losing InstanceCookie between sessions may not work correctly with the cache. This is probably very rare.

New method Lookups.proxy

Sep 20 '02; API spec. version: 3.9; affected top-level classes: Lookups; made by: dstrupl; issues: #27425
Creates a lookup that delegates to another one but that one can change from time to time. The returned lookup checks every time somebody calls lookup or lookupItem method whether the provider still returns the same lookup. If not, it updates state of all Lookup.Results that it created (and that still exists).

Modules can specify the content of Lookup.getDefault in META-INF/services

Jul 22 '02; API spec. version: 3.3; made by: jtulach
The content of Lookup.getDefault() can be specified by a standard JDK registration mechanism, using JARs' META-INF/services directory. This is suitable for services that do not change, do not require user modification and that need to be ready soon during initialization of the system.

Added org.openide.util.lookup.Lookups

May 28 '02; API spec. version: 2.21; affected top-level classes: Lookups; made by: dstrupl; issues: #20550
New utility class added. The class cannot be instantiated and contains following static methods:
            
            public static Lookup singleton(Object objectToLookup);
public static Lookup fixed(Object[] objectsToLookup);
public static Lookup fixed(Object[] keys, InstanceContent.Convertor convertor);

        
The methods return an instance of simple lookup implementation that holds the objects passed a parameter.

Enhanced usage of ProxyLookup & AbstractLookup.Content

Aug 18 '01; API spec. version: 1.31; affected top-level classes: AbstractLookup ProxyLookup; made by: jtulach
AbstractLookup.Content made public to allow its usage for objects that do not subclass AbstractLookup. ProxyLookup.beforeLookup added so subclasses can update themselves (call setLookups (...)) before the actual lookup is performed.

Changes in access protection of proxy lookup

Jul 8 '01; API spec. version: 1.19; affected top-level classes: ProxyLookup
ProxyLookup.setLookups made protected instead of public so nobody can misuse the method except the creator of the object and ProxyLookup.getLookups added. ProxyLookup made non final.
Compatibility: Changes to newly added feature.

Lookup service providers package created

Jun 1 '01; API spec. version: 1.9; affected top-level classes: AbstractLookup ProxyLookup; affected packages: org.openide.util.lookup; made by: jtulach
Package org.openide.util.lookup created, should hold SPI interfaces for lookup. Initially filled with AbstractLookup which introduces AbstractLookup.Pair and with ProxyLookup.

Added lookup items and support APIs

May 25 '01; API spec. version: 1.8; affected top-level classes: Lookup; made by: jtulach
Lookup enhanced. Interface Lookup.Item and additional methods to access it also added.

Lookup system introduced

Mar 1 '01; affected top-level classes: Lookup LookupEvent LookupListener; made by: jtulach
Better version of Lookup introduced. There is a org.openide.util.Lookup with bunch of inner classes and org.openide.util.LookupListener and org.openide.util.LookupEvent.

Instance content simplifies creation of lookups

(date unknown); API spec. version: 1.25; affected top-level classes: AbstractLookup InstanceContent; made by: jtulach
Added AbstractLookup.Content which can be passed to an abstract lookup in its constructor and used to control the contents easily. Also InstanceLookup provides the common easy implementation.