This document lists changes made to the Loaders
API. Please ask on the dev@openide.netbeans.org
mailing list
if you have any questions about the details of a
change, or are wondering how to convert existing code to be compatible.
Most module authors should start by reading the Upgrade Guide for the current release.
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.
ChangeableDataFilter
interface
DataShadow
uses URL for storage
DataNode.getHtmlDisplayName
was implemented
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: org.openide.loaders > 1.20
ChangeableDataFilter
interface
DataShadow
uses URL for storage
DataNode.getHtmlDisplayName
was implemented
org.openide.loaders.ChangeableDataFilter
ChangeableDataFilter
interface
org.openide.loaders.DataFolder
org.openide.loaders.DataNode
DataNode.getHtmlDisplayName
was implemented
org.openide.loaders.DataObject
org.openide.awt.Toolbar
org.openide.awt.ToolbarPool
ChangeableDataFilter
interface
ChangeableDataFilter
; made by: phrebejk; issues:
#44368
The class FolderChildren
was able to filter the children
using DataFilter
. But the data filter was constant for the
entire life of the FolderChildren
instance. ChangeableDataFilter
class adds the ability to change the filtering strategy, where
the change is reflected immediatley in the folder children.
Toolbar
ToolbarPool
; made by: mslama; issues:
#34574
Toolbar.getBasicHeight()
was added to replace Toolbar.BASIC_HEIGHT
.
ToolbarPool.getPreferredIconSize()
and ToolbarPool.setPreferredIconSize(int)
were added.
DataShadow
uses URL for storage
DataNode.getHtmlDisplayName
was implemented
DataNode
; made by: tboudreau; issues:
#29466
DataNode
now implements getHtmlDisplayName()
as follows: If the
underlying filesystem implements the new FileSystem.HtmlStatus
, it will
call FileSystem.HtmlStatus.annotateNameHtml()
and return the result.
This enables, for example, CVS annotations to be shown with a different
font color.
DataFolder
; made by: jglick; issues:
#26667
LAST_MODIFIED
and
SIZE
, were added.
DataObject
; made by: jtulach; issues:
#33750
DataObjects
and DataLoaders
.
This change has been introduced to make the behaviour
safer and more predicatable. Its goal is not to introduce
new deadlocks, but everybody writing its own loaders has
to keep in mind that it is dangerous to perform a long
running operation in the handleCopy, handleMove,
handleRename, handleCreateFromTemplate methods.
DataObject
; made by: jtulach; issues:
#33469
org.openide.loaders
package
the possibility to invoke DataObject
's constructor has been
restricted.
There is an OperationListener
class in the org.openide.loaders
package that shall be notified about every created DataObject. It is easy
to be notified when the DataObject is being created, but the notification
shall be done when its constructor finishes otherwise magic race
conditions can happen, see for example
issue 20022.
The previous solution was to wait 500ms after the start of DataObject's
constructor and notifying the creation than, but of course it means
that if the constructor takes longer time, we were in the same problem again.
Because DataObjects shall be created only by DataLoaders in method
DataLoader.handleFindDataObject
, we can notify each data
object when the execution is returning from DataLoader.handleFindDataObject,
but in order for the system to work correctly we shall prevent creation
of DataObjects outside of this place.
DataObject constructor will throw an exception if invoked outside of
DataLoader.handleFindDataObject
or MultiFileLoader.createDataObject
methods. This is incompatible change, but nobody should really be affected,
as creating data objects outside of DataLoader has no real
meaning.
org.openide.loaders
package were separated
out from the whole openide.jar into their own openide-loaders.jar.
Built on December 9 2004. | Portions Copyright 1997-2004 Sun Microsystems, Inc. All rights reserved.