|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Loaders API | |
org.openide.actions | |
org.openide.awt | |
org.openide.loaders | Datasystems are the logical layer between a filesystem and the regular functions of the IDE. |
org.openide.text |
DataFolder.FolderNode.setName()
Refactoring needs to handle rename of DataFolder's Node. It is allowed through FolderRenameHandler. Any client can put it's FolderRenameHandler into Lookup (only one instance is allowed). Implementation of FolderNode.setName() will use this instance to handle rename request.
DataEditorSupport
Many people subclass DataEditorSupport
to provide editing ability for data
objects. The great majority of them wish to provide an editor cookie
and with standard semantics for open, modify, save, undo,
close, reload, etc. By using the
DataEditorSupport.create
factory
method this task is simplified to two lines of code.
DataLoaderPool.getDefault()
DataLoaderPool
now has a new method getDefault()
to allow simple access to the default system loader pool.
DataLoader
can be specified in a layer
DataLoader
now has a new method protected String actionsContext()
which by default returns null
but can be overriden to identify name
of a place on default file system where layers can store instances of javax.swing.Action
that will then be used as a return value of DataNode.getActions(boolean)
.
This allows smooth extensibility of one data object's node with actions
from other modules.
The change is compatible, as if one does not override this method,
the behaviour remains the same as it used to be. If the method is overridden
and returns non-null value,
the DataLoader.setActions
uses the given context to
store the actions into it.
The standard loader for folder use Loaders/folder/any/Actions
as its context, so any module who wishes to add anything to its
popup menu, may register actions layer file like
any regular actions just into the folder Loaders/folder/any/Actions
.
ChangeableDataFilter
interface
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.
Loaders/folder/any/Actions
so if any module wishes
to extend, hide or reorder some of them it can just register its actions there.<folder name="Loaders" > <folder name="folder" > <folder name="any" > <folder name="Actions" > <file name="org-mymodule-MyAction.instance" > <attr name="instanceCreate" stringvalue="org.mymodule.MyAction" /> </file> </folder> </folder> </folder> </folder>As described in general actions registration tutorial. This functionality is available since version 5.0 of the loaders module. Please use
OpenIDE-Module-Module-Dependencies: org.openide.loaders > 5.0
in your
module dependencies.
DataObject
s produced by your DataLoader
and you
are either using DataNode
or its subclass, you can just override
protected String actionsContext()
method to return non-null
location of context in layers from where to read the actions.
The usual value should match Loaders/mime/type/Actions
scheme,
for example java is using Loaders/text/x-java/Actions
, but
the name can be arbitrary.
This functionality is available since version 5.0 of the loaders module. Please use
OpenIDE-Module-Module-Dependencies: org.openide.loaders > 5.0
in your
module dependencies.
|
|
|
|
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |