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.
release41
branch was made on Apr 03 '05 for use in the NetBeans 4.1 release.
Specification versions: 6.0 begins after this point.
release40
branch was made on Nov 01 '04 for use in the NetBeans 4.0 release.
Specification versions: 5.0 begins after this point.
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.
SystemAction
refers to Icon
rather than ImageIcon
BooleanStateAction
deprecated in favour of Actions
API and @ActionState
annotation.
NetworkSettings.getAuthenticationPassword
added
@NbBundle.Messages
available on fields
HelpCtx.display
added
NetworkSettings.ProxyCredentialsProvider
added
NetworkSettings.suppressAuthenticationDialog
added
NetworkSettings
added
putIfAbsent
and resize
@NbBundle.Messages
XMLUtil
. Seven new methods added.
CharSequences
NbPreferences.Provider
added
@URLStreamHandlerRegistration
ImageUtilities.createDisabledIcon
and ImageUtilities.createDisabledImage
added.
NbBundle.getMessage
can take arbitrarily many format arguments
project.ant
for EditableProperties
.
RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces)
loadImageIcon(String resource, boolean localized)
keyToString(KeyStroke stroke, boolean portable)
OS_OPENBSD
and OS_UNIX_OTHER
fields
OS_WINVISTA
field
XMLUtil.validate
Utilities.isLargeFrameIcons
deprecated.
ChangeSupport
Utilities.isMac()
method
Parameters
NbCollections.iterable(...)
methods
NbPreferences.forModule(Class cls)
and
NbPreferences.root()
methods as static factory methods
for getting preference node from NetBeans preference tree.
Utilities.icon2Image
method to perform conversion from Icon
to Image
Exceptions
class as a replacement for ErrorManager
NbCollections
and Union2
task.waitFinished(timeout)
added
OS_FREEBSD
to Utilities
Mutex.isReadAccess()
and Mutex.isWriteAcess()
SharedClassObject.reset
method to allow subclasses to implement reset correctly
Lookup
WeakListener
replaced by WeakListeners
class
Utilities.toFile
and toURL
added
ErrorManager.isNotifiable
added
ErrorManager.isLoggable
added
ServiceType.createClone
added
ErrorManager
SystemAction
refers to Icon
rather than ImageIcon
NbBundle
is obsolete
SafeException
is a FoldingIOException
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
BooleanStateAction
deprecated in favour of Actions
API and @ActionState
annotation.
NetworkSettings.getAuthenticationPassword
added
@NbBundle.Messages
available on fields
HelpCtx.display
added
NetworkSettings.ProxyCredentialsProvider
added
NetworkSettings.suppressAuthenticationDialog
added
NetworkSettings
added
putIfAbsent
and resize
@NbBundle.Messages
XMLUtil
. Seven new methods added.
CharSequences
NbPreferences.Provider
added
@URLStreamHandlerRegistration
ImageUtilities.createDisabledIcon
and ImageUtilities.createDisabledImage
added.
NbBundle.getMessage
can take arbitrarily many format arguments
project.ant
for EditableProperties
.
RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces)
loadImageIcon(String resource, boolean localized)
keyToString(KeyStroke stroke, boolean portable)
OS_OPENBSD
and OS_UNIX_OTHER
fields
OS_WINVISTA
field
XMLUtil.validate
Utilities.isLargeFrameIcons
deprecated.
ChangeSupport
Utilities.isMac()
method
Parameters
NbCollections.iterable(...)
methods
NbPreferences.forModule(Class cls)
and
NbPreferences.root()
methods as static factory methods
for getting preference node from NetBeans preference tree.
Utilities.icon2Image
method to perform conversion from Icon
to Image
Exceptions
class as a replacement for ErrorManager
NbCollections
and Union2
task.waitFinished(timeout)
added
OS_FREEBSD
to Utilities
Mutex.isReadAccess()
and Mutex.isWriteAcess()
SharedClassObject.reset
method to allow subclasses to implement reset correctly
Lookup
WeakListener
replaced by WeakListeners
class
Utilities.toFile
and toURL
added
ErrorManager.isNotifiable
added
org.openide.util.actions.ActionInvoker
org.openide.util.actions.ActionPresenterProvider
org.openide.util.AsyncGUIJob
org.openide.util.actions.BooleanStateAction
org.openide.util.actions.CallbackSystemAction
org.openide.util.Cancellable
org.openide.util.ChangeSupport
ChangeSupport
org.openide.util.CharSequences
CharSequences
org.openide.util.ContextAwareAction
org.openide.util.ContextGlobalProvider
Lookup
org.openide.util.EditableProperties
project.ant
for EditableProperties
.
org.openide.xml.EntityCatalog
org.openide.util.Enumerations
org.openide.ErrorManager
ErrorManager.isNotifiable
added
ErrorManager.isLoggable
added
ErrorManager
org.openide.util.Exceptions
Exceptions
class as a replacement for ErrorManager
org.openide.util.HelpCtx
HelpCtx.display
added
org.openide.util.ImageUtilities
ImageUtilities.createDisabledIcon
and ImageUtilities.createDisabledImage
added.
loadImageIcon(String resource, boolean localized)
org.openide.LifecycleManager
org.openide.util.Mutex
Mutex.isReadAccess()
and Mutex.isWriteAcess()
org.openide.util.NbBundle
@NbBundle.Messages
available on fields
@NbBundle.Messages
NbBundle.getMessage
can take arbitrarily many format arguments
NbBundle
is obsolete
org.openide.util.NbCollections
NbCollections.iterable(...)
methods
NbCollections
and Union2
org.openide.util.NbPreferences
NbPreferences.Provider
added
NbPreferences.forModule(Class cls)
and
NbPreferences.root()
methods as static factory methods
for getting preference node from NetBeans preference tree.
org.openide.util.NetworkSettings
NetworkSettings.getAuthenticationPassword
added
NetworkSettings.ProxyCredentialsProvider
added
NetworkSettings.suppressAuthenticationDialog
added
NetworkSettings
added
org.openide.util.datatransfer.NewType
org.openide.util.Pair
org.openide.util.Parameters
Parameters
org.openide.util.datatransfer.PasteType
org.openide.util.actions.Presenter
org.openide.util.RequestProcessor
RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces)
task.waitFinished(timeout)
added
org.openide.util.io.SafeException
SafeException
is a FoldingIOException
org.openide.ServiceType
ServiceType.createClone
added
org.openide.util.SharedClassObject
org.openide.util.actions.SystemAction
SystemAction
refers to Icon
rather than ImageIcon
org.openide.util.Task
task.waitFinished(timeout)
added
org.openide.util.TopologicalSortException
org.openide.util.Union2
NbCollections
and Union2
org.openide.util.URLStreamHandlerRegistration
@URLStreamHandlerRegistration
org.openide.util.UserQuestionException
org.openide.util.Utilities
keyToString(KeyStroke stroke, boolean portable)
OS_OPENBSD
and OS_UNIX_OTHER
fields
OS_WINVISTA
field
Utilities.isLargeFrameIcons
deprecated.
Utilities.isMac()
method
Utilities.icon2Image
method to perform conversion from Icon
to Image
OS_FREEBSD
to Utilities
Lookup
Utilities.toFile
and toURL
added
org.openide.util.VectorIcon
org.openide.util.WeakListeners
WeakListener
replaced by WeakListeners
class
org.openide.util.WeakSet
org.openide.xml.XMLUtil
XMLUtil
. Seven new methods added.
XMLUtil.validate
ActionInvoker
ActionPresenterProvider
; made by: jglick; issues:
#179289
Added some internal SPI interfaces.
ContextAwareAction
Utilities
CallbackSystemAction
; made by: jtulach pzavadsky; issues:
#27868
Introduction of new action system, which generally means
move from usage of SystemAction
to Action
instances.
That document also focuses on declarative actions
usage which is not subject of current change, it will be part of later changes.
SystemAction
refers to Icon
rather than ImageIcon
SystemAction
; made by: jglick
getIcon
and setIcon
now use the interface
Icon
rather than the particular implementation
ImageIcon
. This corrects an API bug (excessive specificity).
boston
. Any code explicitly using this calls before may break
(source code may be compatible in many cases; binary compatibility has
been preserved). These calls were known to be used only for
Actions
to create presenters; normal code which constructs
SystemAction
s and implements iconResource
should
be unaffected. Actions using the "grouping action" template should check
their getMenuPresenter
method which may be
binary-incompatible; it is easy to replace the code with safer code such
as:
// .... private static Icon icon = null; // .... public JMenuItem getMenuPresenter() { JMenu menu = new JMenu(getName ()); if (icon == null) { icon = new ImageIcon(MyAction.class.getResource(iconResource())); } menu.setIcon(icon); // ....
SystemAction
; made by: jglick
iconResource
may now return null
to indicate no
icon. getIcon(true)
may be used to get an icon created from
the label if there is no icon specified.
ImageUtilities
; made by: sdedic
url
is documented in Javadoc since 8.12 but the key string was not
added to the API. It is now, along with a
convenience method, which should be used in preference.
As a part of the effort to make NetBeans look better on HiDPI displays, the ImageUtilities class has now been completely updated to support scalable implementations of the java.awt.Icon interface, and to support loading of icons and images from SVG files. If an SVG file resource exists with the same base name as an existing bitmap icon, the SVG file will be loaded instead (e.g. "icon.svg" will be loaded instead of "icon.png"). SVG file resources can also be loaded explicitly.
To avoid bloating the core platform modules with large JAR libraries, the actual loading and parsing of SVG files is implemented in a separate, optional module, which is lazily loaded the first time that an SVG file is encountered for loading. A new interface SVGLoader has been added to serve as an SPI for said module to implement. Furthermore, the CachedHiDPIIcon helper class has been made public to assist in the implementation of this and other scalable Icon implementations.
VectorIcon
; made by: ebakke; issues: NETBEANS-1238
It is now increasingly common for NetBeans to run on Windows, Linux, or MacOS machines with so-called "HiDPI" screens, aka. "retina" screens in the Apple world. These screens have about twice the physical pixel density of traditional screens, making it necessary to scale GUI graphics up by some amount, e.g. 150% or 200% (depending on OS and OS-level user settings), in order to remain readable. Since Java 9, this scaling is done automatically by AWT by means of a scaling default transform in each Component's Graphics2D instances. This makes text sharp on HiDPI screens, but leaves bitmap icons blurry.
This change introduces a new abstract class VectorIcon, which can be extended to create custom-painted Icon instances that will look sharp on HiDPI screens, regardless of scaling level. See VectorIcon's Javadoc for a discussion of appropriate use cases.
BooleanStateAction
deprecated in favour of Actions
API and @ActionState
annotation.
BooleanStateAction
; made by: sdedic
The BooleanStateAction base class was deprecated, as there's a programatic API in Actions and a declarative @ActionState annotation which fully supersede the deprecated class.
NetworkSettings.getAuthenticationPassword
added
NetworkSettings
; made by: tstupka; issues:
#268803
The SPI NetworkSettings.ProxyCredentialsProvider allows NetBeans Platform users to provide proxy and network credentials, but the according API should also provide the password, not only the username.
Utilities
; made by: saubrecht; issues:
#203979
Only some platforms provide an audible notification when user
tries to invoke a disabled action. So instead of Toolkit.beep()
which always plays a sound a new method
Utilities.disabledActionSound()
shoud be used instead.
The following classes were spinned of into org.openide.util.base module:
The class Utilities was also split and the client desktop indepenent parts landed in BaseUtilities. Although all the constants and methods are still available through Utilities class, it is advised to change the dependencies and reference them through BaseUtilities.
Runtime compatibility remains, compile time compatibility is
mostly preserved too. It is however recommended to upgrade
dependencies of client modules. Try running
ant fix-dependencies
in your Ant module.
org.openide.util.Mutex
; made by: jtulach; issues:
#240442
Two new methods, tryReadAccess
and tryWriteAccess
,
added to Mutex.Privileged
to allow better control when waiting for a lock.
ImageUtilities
; made by: saubrecht; issues:
#233959
When the IDE is running under a dark look and feel (UIManager.getBoolean("nb.dark.theme")
)
then ImageUtilities
will try to load an image or on icon with a "_dark" suffix.
For example "org/netbeans/modulename/toolbaricon_dark.png" or
"org/netbeans/modulename/imagewithoutextension_dark". If such
resource exists it will be used instead of the default one.
org.openide.util.Pair
; made by: tzezula; issues:
#228994
Added a type safe Pair of 2 elements.
org.openide.util.Exceptions
UserQuestionException
; made by: jtulach; issues:
#57748
The default NetBeans Platform infrastructure knows how to
display dialog when a UserQuestionException
is
reported.
Utilities
; made by: jglick; issues:
#213562
Utilities
gets new methods toURI(File)
and toFile(URI)
which offer the UNC safety of NIO.2
even on JDK 6.
Use the Jackpot-format upgrade hint.
LifecycleManager
; made by: jtulach; issues:
#209018
LifecycleManager
has new exit
method allowing callers to specify
the exit code.
@NbBundle.Messages
available on fields
org.openide.util.NbBundle
; made by: jglick; issues:
#206543
@NbBundle.Messages
may now be used on fields, useful
in case the field initializer involves some complex construction
requiring a localized message. (Merely storing a localized message
in a String constant is poor practice; inline the field instead.)
Existing annotations made on classes but only used from a field within that class will continue to work, but for clarity should be moved onto the field.
HelpCtx.display
added
HelpCtx
; made by: jglick; issues:
#205992
To permit modules to display help pages where available without
a direct dependency on the JavaHelp API, HelpCtx.display()
was added together with a matching SPI.
Modules calling org.netbeans.api.javahelp.Help.showHelp
via reflection should use this new API instead.
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#202354
In order to deal with bug #202354 there were some minor tweaks
inside RequestProcessor
implementation.
cancel(); cancel()
on
the same task returns false
on the second call now.
In spite of that the changes caused bunch of regressions and it took
a week to stabilize them. That is why they deserve a warning note
in compatibility section.
NetworkSettings.ProxyCredentialsProvider
added
NetworkSettings
; made by: jrechtacek; issues:
#201662
Most of the proxy and network credentials are currently read from a default NetBeans storage. This may not be ideal for other Platform aplications storing the settings in a different way or computing them dynamically. A SPI NetworkSettings.ProxyCredentialsProvider allows NetBeans Platform users to provide proxy and network credentials separately. See http://wiki.netbeans.org/Authenticator
NetworkSettings.suppressAuthenticationDialog
added
NetworkSettings
; made by: jrechtacek; issues:
#201662
Some plugins needs a way to suppress java.net.Authenticator
without asking
user a question about the credentials.
Invoke
suppressAuthenticationDialog with a block of code where authentication dialog will be suppressed.
See http://wiki.netbeans.org/Authenticator
NetworkSettings
added
NetworkSettings
; made by: jrechtacek; issues:
#194530
Added new useful methods for getting Network Proxy for specified URI.
ImageUtilities
; made by: jtulach; issues:
#193944
Images loaded by
ImageUtilities.loadImage now
respond to getProperty("url", null)
calls.
putIfAbsent
and resize
org.openide.util.WeakSet
; made by: vv159170; issues:
#192759
New method putIfAbsent gives access to key already stored in Set. Method resize allows to change capacity of internal hash map.
@NbBundle.Messages
org.openide.util.NbBundle
; made by: jglick; issues:
#192750
A new annotation makes it easier to produce localizable strings.
org.openide.util.Exceptions
; made by: jtulach; issues:
#190079
New method Exceptions.attachSeverity
allows
everyone to thrown an exception, which later will not be
logged.
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#180458
Simpler constructor for RequestProcessor.
CharSequences
org.openide.util.CharSequences
; made by: vv159170; issues:
#183162
CharSequences.create
can now be used
to create memory-efficient implementations of CharSequence
for ASCII strings.
NbPreferences.Provider
added
org.openide.util.NbPreferences
; made by: jglick; issues:
#179289
Added an internal SPI interface.
Lookup and its associated interfaces are now available as a separate module.
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.
@URLStreamHandlerRegistration
org.openide.util.URLStreamHandlerRegistration
; made by: jglick; issues:
#20838
Introduced an annotation to register URL protocols.
Modules registering URLStreamHandlerFactory
s into
global lookup will still work but are advised to switch to this
annotation, which is both easier to use and more efficient.
ImageUtilities.createDisabledIcon
and ImageUtilities.createDisabledImage
added.
ImageUtilities
; made by: t_h; issues:
#171400
ImageUtilities.createDisabledIcon
now can be used
to create low color saturation icon for disabled buttons. Also
ImageUtilities.createDisabledImage
was added.
NbBundle.getMessage
can take arbitrarily many format arguments
org.openide.util.NbBundle
; made by: jglick
NbBundle.getMessage
now has a varargs overload that
permits you to specify four or more format arguments without
explicitly constructing an array.
project.ant
for EditableProperties
.
org.openide.util.EditableProperties
; made by: jglick; issues:
#66577
EditableProperties
now available in Utilities API
so it can be used more broadly.
LifecycleManager
; made by: jglick; issues:
#168257
Can now use LifecycleManager.markForRestart
to cause
the application to restart after exiting. Formerly needed to
create special files in the userdir or use similar tricks.
RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces)
org.openide.util.RequestProcessor
; made by: rmichalsky; issues:
#165862
Newly added constructor allows to disable (slow) filling stack traces before posting each task.
loadImageIcon(String resource, boolean localized)
ImageUtilities
; made by: t_h; issues:
#157254
Convenient method for loading icons.
keyToString(KeyStroke stroke, boolean portable)
Utilities
; made by: msauer; issues:
#110492
keyToString(KeyStroke stroke, boolean portable)
provides cross-platform compitable keystroke textual representation
instead of hardcoding Ctrl, Meta or Alt key.
OS_OPENBSD
and OS_UNIX_OTHER
fields
Utilities
; made by: jskrivanek; issues:
#145462
Added a new Utilities.OS_OPENBSD
and OS_UNIX_OTHER
fields. Deprecated OS_WINDOWS_MASK
and OS_UNIX_MASK
.
OS_WINVISTA
field
Utilities
; made by: jskrivanek; issues:
#142629
Added a new Utilities.OS_WINVISTA
field to be able
to recognize Windows Vista operating system.
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#134297
In order to align RequestProcessor
closer to standard
Java 5 concurrency utilities, the class now implements
Executor
interfaces and its execute(Runnable)
method.
Utilities
ImageUtilities
; made by: t_h; issues:
#123469
Image methods were separated to ImageUtilities (renamed IconManager) as replacement for methods in Utilities. There are some additional methods for image tool tips manipulation.
New methods for tool tips manipulation:
Image assignToolTipToImage(Image image, String text)
;
String getImageToolTip(Image image)
;
Image addToolTipToImage(Image image, String text)
;
New method for conversion from Image to Icon:
Icon image2Icon(Image image)
;
"Moved" methods from Utilities:
Image icon2Image(Icon icon)
;
Image loadImage(String resourceID)
;
Image loadImage(String resource, boolean localized)
;
Image mergeImages(Image image1, Image image2, int x, int y)
;
org.openide.util.Mutex
; made by: jtulach; issues:
#123832
Added new constructor Mutex(Privileged, Executor) that allows creators of the mutex to intercept and wrap all actions running inside the mutex with custom code.
Utilities.isLargeFrameIcons
deprecated.
Utilities
; made by: mslama; issues:
#119069
Javadoc says: Test whether the operating system supports icons on frames (windows). But window system used this method to decide if small 16x16 or bigger 32x32 icon should be used for frame (main window). So usage and Javadoc is inconsistent. All OS support small icon in frame. From JDK 6 it is possible to set multiple size icons for frame so OS WM selects appropriate size. I removed useless usage of this method from window system code and this method is not used elsewhere.
ChangeSupport
org.openide.util.ChangeSupport
; made by: abadea; issues:
#95885
Added a ChangeSupport
class to simplify
the management of ChangeListener
s and the
firing of ChangeEvent
s.
Utilities.isMac()
method
Utilities
; made by: rkubacki; issues:
#61044
Added a Utilities.isMac()
method for checking
if current platform is Mac.
Parameters
org.openide.util.Parameters
; made by: abadea; issues:
#89768
Added a Parameters
class for checking the
values of method parameters.
NbCollections.iterable(...)
methods
org.openide.util.NbCollections
; made by: jglick; issues:
#88606
Added two new methods to make enhanced for-loops easier to use
with legacy APIs returning Iterator
or Enumeration
.
NbPreferences.forModule(Class cls)
and
NbPreferences.root()
methods as static factory methods
for getting preference node from NetBeans preference tree.
org.openide.util.NbPreferences
; made by: rmatous; issues:
#73474
NetBeans preference tree is provided by NetBeans implementation of preferences
which uses userdir as a storage. Both newly added methods return
preferences node from NetBeans preference tree.
Method NbPreferences.root()
returns root preference
node.
Method NbPreferences.forModule(Class cls)
returns
preference node whose
path depends whether class provided as a parameter
was loaded as a part of any module or not. If so, then absolute path corresponds to slashified
code name base of module. If not, then absolute path corresponds to class's package.
See document
Preferences in NetBeans
to learn more about preferences in NetBeans.
Utilities.icon2Image
method to perform conversion from Icon
to Image
Utilities
; made by: rkubacki; issues:
#52562
Conversion from Icon
to Image
is done
at various places and newly introduced method avoids the need to
duplicate the same code.
Exceptions
class as a replacement for ErrorManager
org.openide.util.Exceptions
; made by: jtulach; issues:
#35067
ErrorManager
is now deprecated and its replacement
is either Logger
or Exceptions
.
NbCollections
and Union2
org.openide.util.NbCollections
org.openide.util.Union2
; made by: jglick; issues:
#73637
Added two new classes useful for transitioning to JDK 5 generics.
ErrorManager
; made by: jtulach; issues:
#56311
org.mymodule.MyComponentthen the correct way to turn the logging is now to invoke NetBeans with
-J-Dorg.mymodule.MyComponent.level=100
(where the possible constants are taken form
a JDK's definition of level).
There is however a certain benefit in this change, the value
of the property (like org.mymodule.MyComponent.level) can be changed during runtime and thus the logging can be enabled or disabled dynamically (after changing the value, it is necessary to call LogManager.readConfiguration()).
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#68031
Presenter
; made by: mkleint; issues:
#35827
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#33467
public void run () { while (veryLongTimeLook) { doAPieceOfIt (); if (Thread.interrupted ()) return; } }
task.waitFinished(timeout)
added
org.openide.util.Task
org.openide.util.RequestProcessor
; made by: jtulach; issues:
#16849
It is not possible to wait for a limited amount of time for
completion of any task. The RequestProcessor.Task
version is optimized, the Task
version ensures that
the sematics will be compatible for all subclasses, even they did
not know about the method at all.
OS_FREEBSD
to Utilities
Utilities
; made by: jrechtacek
FreeBSD was not recognized as Unix OS. Utilities
has been
enlarged with new field OS_FREEBSD
, part of OS Unix mask. Utilities.isUnix()
now returns true
for applications run on FreeBSD.
Mutex.isReadAccess()
and Mutex.isWriteAcess()
org.openide.util.Mutex
; made by: jtulach; issues:
#49459
Mutex
has already been
granted to it and use it to decide whether it is safe to perform
certain operations or delay them.
SharedClassObject.reset
method to allow subclasses to implement reset correctly
SharedClassObject
; made by: jtulach; issues:
#20962
SharedClassObject.reset
method is called
by the infrastructure in moments when an original (at the time
of start) state of an option or any other SharedClassObject
is requested. Interested subclasses are free to implement any kind of clean
they need. The SystemOption
provides a default
implementation based on fired property changed events, so
its correctly written subclasses do not need
to do anything.
org.openide.util.Enumerations
; made by: jtulach; issues:
#41166
org.openide.util.enum
package. We are providing
replacements of the original classes in form of factory methods
org.openide.util.Enumerations
.
org.openide.util.WeakListeners
; made by: jtulach; issues:
#35726
Lookup
ContextGlobalProvider
Utilities
; made by: jtulach; issues:
#34758
ContextGlobalProvider
and new method
in utilities Utilities.actionsGlobalContext()
had to be
added in order to separate the implementation of actions like
CallbackSystemAction
and NodeAction
from
their dependency on window system.
WeakListener
replaced by WeakListeners
class
org.openide.util.WeakListeners
; made by: jtulach; issues:
#34758
As part of the work on separation of openide.jar into smaller parts
the WeakListener
had to be deprecated as it referenced too
many classes around and replaced by more general WeakListeners
factory class that provides a generic create
method and
specialized factory methods just for JDK own interfaces.
Also few factory methods were spread into appropriate packages like
FileUtil.weakFileChangeListener
and
NodeOp.weakNodeListener
.
HelpCtx
; made by: jtulach; issues:
#32143
HelpCtx.findHelp(Object)
)
has been added to replace
the old InstanceSupport.findHelp
that has been
separated out from the openide.jar.
org.openide.util.RequestProcessor
; made by: dsimonek
AsyncGUIJob
org.openide.util.Cancellable
Utilities
; made by: dsimonek; issues:
#30604
Performance related API addition, allows clients to write asynchronous
initialization of UI components easily by providing AsyncGUIJob
implementation. Also introduced Cancellable
ability.
Utilities.attachInitJob
couples init job with target
UI component.
Utilities
org.openide.util.TopologicalSortException
; made by: jglick; issues:
#27286
Utilities.topologicalSort
was added. It should be
faster and probably more robust than the older partialSort
method, which required a Comparator
; the new method requires
a list of ordering constraints, which should be O(n + m)
rather than O(n2) (where n is the number of
nodes to sort and m the number of edges). If the graph is
not a DAG a TopologicalSortException
is thrown containing
description of unsortable parts of the graph and the best partitial sort
that fullfils as much of ordering constraints as possible. These
information can be used for error reporting and recovery.
Utilities.toFile
and toURL
added
Utilities
; made by: jglick; issues:
#29711
file
protocol. This task is easy and
safe under JDK 1.4, yet JDK 1.3 lacks a single call to do these tasks which
will handle unusual characters in file names, especially hash marks. The
utility methods use the JDK 1.4 variants when possible, else use specially
coded versions of the JDK 1.3 variants which handle hash marks.
File.toURL
should be
examined, as it may be better to call Utilities.toURL
.
Similarly, code which gets the path from a URL and calls the File
constructor may need to be changed to call Utilities.toFile
.
Such changes should improve robustness of code when used in strangely
named directories.
Utilities
SystemAction
; made by: jglick; issues:
#22156
Utilities.loadImage(String, boolean)
which works like Utilities.loadImage(String)
except
that it will search for localized images. Also
SystemAction.getIcon()
will load a localized image now
if there is one.
Utilities
; made by: dsimonek
HelpCtx
ServiceType
SystemAction
NewType
PasteType
; made by: pnejedly
ErrorManager.isNotifiable
added
ErrorManager
; made by: jglick; issues:
#24056
ErrorManager.isNotifiable
was added to capture
the fact that an error manager implementation might be more aggressive
about displaying stack traces than log messages.
isLoggable
can be used for this purpose, or which calls notify
at a low
level such as INFORMATIONAL
without first checking
isNotifiable
for efficiency, should be revised.
Utilities
; made by: jtulach; issues:
#27238
org.openide.util.RequestProcessor
; made by: pnejedly
RequestProcessor.DEFAULT
through the static methods is inherently deadlock-prone,
so the methods are deprecated and their usage should phase out
in the favor of using private RequestProcessor
s
or the shared multithreaded instance available through the new
static method RequestProcessor.getDefault()
.
Utilities
; made by: ttran; issues:
#20882
public static Rectangle getUsableScreenBounds(); public static Rectangle getUsableScreenBounds(GraphicsConfiguration gconf); public static Rectangle findCenterBounds(Dimension componentSize);One should use these methods instead of calling
Toolkit.getScreenSize()
. For the same reason
Utilities.getScreenSize()
is now deprecated.
ErrorManager
; made by: jtulach; issues:
#16854
This method allows independent libraries (nodes, filesystems, utilities) to use the ErrorManager without
testing if it is really present. Just call ErrorManager.getDefault ()
and you can be sure
that a valid instance will be returned.
Also TopManager.getErrorManager
is no longer useful (see change) and is now deprecated.
It is also not abstract as it just delegates.
notifyException
is similarly deprecated.
org.openide.util.Mutex
Privileged
.
Through its public methods one can enter internal states of the
Mutex
to which it was passed.
org.openide.util.Task
Task
has new protected constructor for subclasses and
methods notifyRunning ()
and also non-final version of
waitFinished ()
.
Utilities
Utilities.loadImage()
that uses cache to avoid duplicate
loading of images. mergeImages
uses the cache, too, for the
results of merge.
UserQuestionException
Utilities
mergeImages(Image image1, Image image2, int x, int
y)
for merging images.
org.openide.util.NbBundle
; made by: jglick
getLocalizingSuffixes
added.
Utilities
OS_DEC
changed to OS_TRU64
,
and added OS_VMS
.
ErrorManager.isLoggable
added
ErrorManager
isLoggable(int severity)
added to ErrorManager
.
ServiceType.createClone
added
ServiceType
public final ServiceType createClone()
added.
Cloneable
.
org.openide.util.NbBundle
; made by: jglick
getLocalizedFile
now accepts null
extensions
to suppress the addition of a dot to the resource name.
ErrorManager
ErrorManager
getInstance(String name)
, log(int severity, String s)
, and
log(String s)
added to ErrorManager
.
Utilities
wrapString
which uses
BreakIterator
instead of a flag and a heuristic solution.
wrapString(String,int,boolean,boolean)
deprecated.
org.openide.util.NbBundle
; made by: jglick
getBranding
and setBranding
.
Normally these should only be called by the core implementation during
startup, not module authors. All methods to look up localized objects
may now also search for branded variants, if applicable.
NbBundle
is obsolete
org.openide.util.NbBundle
NbBundle.ClassLoaderFinder
and
NbBundle.setClassLoaderFinder
have been deprecated; they
were quite obsolete.
boston
. No one outside of NbBundle
and the
core implementation should have been using these classes to begin with.
SafeException
is a FoldingIOException
org.openide.util.io.SafeException
FoldingIOException
, meaning that it should
delegate the detail message, etc. to the original.
XMLUtil
. Seven new methods added.
org.openide.xml.XMLUtil
; made by: mvfranz; issues:
#136595
Refactored XML related methods into XMLUtil.
XMLUtil.validate
org.openide.xml.XMLUtil
; made by: jglick; issues:
#42686
Added a new method to validate XML documents against schemas.
org.openide.xml.XMLUtil
; issues:
#16629
toAttribute(String, char, boolean)
method replaced by
toAttributeValue(String)
and
toContent(String, boolean)
method replaced by
toElementContent(String)
. These new simplified
signatures and particular semantics should cover 99% usage of
previous ones. See the original additions.
org.openide.xml.XMLUtil
toAttribute(String, char, boolean)
, toContent(String,
boolean)
, toHex(byte[], int, int)
and
fromHex(char[], int, int)
methods added.
org.openide.xml.XMLUtil
org.openide.xml.EntityCatalog
; affected packages: org.openide.xml
; made by: pkuzel
XMLUtil
utility class introduced. The class provides set of
static methods useful for XML processing. EntityCatalog
class introduced. It provides access to entity mapping registrations
provided by installed modules.
org.openide.xml.XMLUtil
; made by: pkuzel
write()
s, parse()
s,
createDocument()
, createInputSource()
and
createParser()
s methods.
Util
providing
utility methods replacing deprecated ones.
XMLDataObject.Util
itself deprecated on
Mar 3 '01 in favor of
XMLUtil
.
org.openide.xml.XMLUtil
; made by: pkuzel
Document
s interfaces became level 2 ones.
write(Document, Writer)
A conflict between encoding declared in document and actual Writer encoding can cause data loss. Suitable just for UTF-8 and UTF-16 writers.
write(Document, OutputStream, String encoding)
The write method is supposed to be used as an implementation independent way for writing DOM documents until self-writable documents specification will be introduced. The self-writability is considered to be a part of DOM level 3 specs.
Nowadays it is implemented that it can handle following DOM implementations:
org.openide.xml.EntityCatalog
addEntityResolver
and removeEntityResolver
added. These methods allow a user to develop own implementation of
functionality similar to registerCatalogEntry
. E.g. a user
can register EntityResolver
that reads data from persistent
catalog avoiding bunch of calls to the register method in module
restore
code.
EntityCatalog
.