Support for token hierarchy snapshots and generic character preprocessing was removed from the API and SPI since there were no usecases yet and it should be possible to add the functionality later in a backward compatible way. Some more changes regarding generification etc. were performed.
LexerInput.integerState() was removed.
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.
Added a method for registering external file that is supposed to be owned by the project, typically used in freeform project to register build products that are external to project dir.
TokenSequence.removeEmbedding() was added as counterpart
to TokenSequence.createEmbedding().
Also TokenSequence.isValid() was added to check whether
the token sequence can be used for iteration (no modifications
of the underlying input in the meantime).
MimeLookup.getLookup(String mimePath) converts
the (usually held) string mimePath to the MimePath
object automatically.
The EditorStyleConstants.Tooltip constant was added
allowing to specify tooltips in highlighting layers.
SQLIdentifiers.Quoter class which
provides a utility method for quoting SQL identifiers.
LibraryTypeProvider.getCustomizer() can return null for some volume types.
Joining sections embeddings now supported and some minor changes
were introduced like adding LanguagePath.parent().
Some is* methods with trivial implementations were removed from LanguagePath.
TokenChange.embeddedChange(Language) was removed because
there might be multiple such changes and they can be gathered
with existing methods.
Added LanguageHierarchy.embeddingPresence() method
and EmbeddingPresence enum to speed up queries
for embedded token sequences.
When TemplateWizard invokes
DataObject.createFromTemplate,
it passes as argument all its properties
to it with wizard. as a prefix. That way they are available to
underlying scripting and templating
engines.
Templates may use ${encoding} and ${nameAndExt} properties in their bodies to be substituted to the real encoding of the template instance file as well as the actual name (with extension) of the file, being created.
Added method isLocked to FileObject.
org.openide.modules.os.Linux and
org.openide.modules.os.Solaris.
For more details read here.
validate(CharSequence path) and
validate(CharSequence type, CharSequence subtype) methods
were added to the MimePath class to allow validating
mime paths and mime type components.
void CompletionResultSet.setHasAdditionalItems(boolean value) was added
to indicate that some items could exist that will likely need a long time to be computed
and added to the result set. It is preferred to add them on the special 'all' code
completion invocation only.
DatabaseMetaDataTransfer class which
contains DataFlavors for database objects and nested classes
representing those database objects during a drag and drop transfer.
Added methods getOrder, setOrder,
and affectsOrder to FileUtil.
Folders may now be ordered by setting the position attribute
on files within the folder, which should have a numeric value.
The original relative ordering constraints are now deprecated but still work.
The CodeTemplateDescription.getUniqueId method was added
and the constructor was extended to accept uniqueId
parameter.
List<Panel<Data>> was added
to ArrayIterator to avoid the need for generic array construction
by client code.
Now it's possible to provide an action that will be invoked when user chose 'Reset' in palette's popup menu or in Palette Manager window.
The CodeTemplateSettings.getCodeTemplates signature was changed
to return Collection<CodeTemplateDescription> instead
of List. Although an incompatible change this class
had never been functional and should not have been used by anybody.
ExtendedNodeModel and ExtendedNodeModelFilter interfaces
and are also added into CompoundModel:
canRename(), canCopy(), canCut(),
clipboardCopy(), clipboardCut(), getPasteTypes(),
setName(), getIconBaseWithExtension().
Added TokenHierarchy.embeddedTokenSequences method.
ChildFactory can also be used to implement synchronous children,
by setting the asynchronous parameter passed to
Children.create() to false. This could replace most
common usages of Children.Keys, and make it easy to switch to
asynchronous child computation if that is determined to be
necessary for performance reasons.
Class NbDocument.Colors was removed to remove dependency on org.openide.options.
Runtime backward compatibility was ensured by moving into org.openide.options module which is
already deprecated.
Field NbDocument.COLORS was removed to remove dependency on org.openide.options.
Class PrintPreferences was added as replacement for original
class PrintSettings.
Classes PrintSettings and PrintSettingsBeanInfo
were removed. Runtime backward compatibility was ensured
by moving both into org.openide.options module which is already deprecated.
To be able to set breakpoint for number of iterations, we need to add a filter for hit counts into Breakpoint API.
Added methods:
Breakpoint.getHitCountFilter(),
Breakpoint.getHitCountFilteringStyle(),
Breakpoint.setHitCountFilter().
Added fields:
Breakpoint.PROP_HIT_COUNT_FILTER,
Breakpoint.HIT_COUNT_FILTERING_STYLE.
In order to implement annotation of method breakpoints in Editor, we need to be able to locate individual methods in Editor, based on their names and signature. Also we need annotation types for fields and methods.
Added methods:
EditorContext.getMethodLineNumber(),
EditorContext.getCurrentMethodDeclaration(),
Added fields:
EditorContext.FIELD_BREAKPOINT_ANNOTATION_TYPE,
EditorContext.DISABLED_FIELD_BREAKPOINT_ANNOTATION_TYPE,
EditorContext.METHOD_BREAKPOINT_ANNOTATION_TYPE
EditorContext.DISABLED_METHOD_BREAKPOINT_ANNOTATION_TYPE
To catch-up with JDI capabilities and be able to implement new enhancements,
we need to add support for new breakpoint properties into the debugger JPDA API.
These are mainly class and thread filters and hit counts.
Added methods:
ExceptionBreakpoint.getClassFilters(),
ExceptionBreakpoint.setClassFilters(),
ExceptionBreakpoint.getClassExclusionFilters(),
ExceptionBreakpoint.setClassExclusionFilters(),
FieldBreakpoint.getInstanceFilters(),
FieldBreakpoint.setInstanceFilters(),
FieldBreakpoint.getThreadFilters(),
FieldBreakpoint.setThreadFilters(),
JPDABreakpoint.getHitCountFilter(),
JPDABreakpoint.getHitCountFilteringStyle(),
JPDABreakpoint.setHitCountFilter(),
LineBreakpoint.getInstanceFilters(),
LineBreakpoint.setInstanceFilters(),
LineBreakpoint.getThreadFilters(),
LineBreakpoint.setThreadFilters(),
MethodBreakpoint.getMethodSignature(),
MethodBreakpoint.setMethodSignature(),
MethodBreakpoint.getInstanceFilters(),
MethodBreakpoint.setInstanceFilters(),
MethodBreakpoint.getThreadFilters(),
MethodBreakpoint.setThreadFilters().
Added fields:
ExceptionBreakpoint.PROP_CLASS_FILTERS,
ExceptionBreakpoint.PROP_CLASS_EXCLUSION_FILTERS,
FieldBreakpoint.PROP_INSTANCE_FILTERS,
FieldBreakpoint.PROP_THREAD_FILTERS,
JPDABreakpoint.PROP_HIT_COUNT_FILTER,
JPDABreakpoint.HIT_COUNT_FILTERING_STYLE,
LineBreakpoint.PROP_INSTANCE_FILTERS,
LineBreakpoint.PROP_THREAD_FILTERS,
MethodBreakpoint.PROP_METHOD_SIGNATURE,
MethodBreakpoint.PROP_INSTANCE_FILTERS,
MethodBreakpoint.PROP_THREAD_FILTERS.
Removed previously added Language.refresh() since
there is an alternative in using LanguageProvider.firePropertyChange(PROP_LANGUAGE).
UILookupMergerSupport.createProjectOpenHookMerger(ProjectOpenedHook) creates an instance of
LookupMerger that ensures that from the ProjectOpenedHook instances in project's lookup, the
project's own is always called first.
WizardDescriptor constructor for subclasses.
It allows to eliminate unchecked warnings.
Added Language.refresh() to allow languages framework
and other clients to update contents of a language dynamically.
Adds few structured logging triggers to cooperate with the UI Gestures Collector.
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.
Added TokenHierarchy.tokenSequenceList() to find
token sequences having certain language path throughout the whole input source
or just within given offset bounds.
Also added LanguagePath.embedded(language)
and LanguagePath.embedded(suffixLanguagePath).
API has changed due to the results of API inception review.
Add framework for extending the project's build script with 3rd party snippets, allowing automated extensions to the build process.
In order to be able to provide heap walking functionality, we need methods for retrieval of class instances and back references.
Added methods:
Field.getDeclaringClass(),
JPDAClassType.getClassLoader(),
JPDAClassType.getSuperClass(),
JPDAClassType.getInstanceCount(),
JPDAClassType.getInstances(),
JPDADebugger.canGetInstanceInfo(),
JPDADebugger.getAllClasses(),
JPDADebugger.getClassesByName(),
JPDADebugger.getInstanceCounts(),
ObjectVariable.getReferringObjects(),
ObjectVariable.getClassType(),
ObjectVariable.getUniqueID().
Added classes:
VariableType,
JPDAArrayType.
The DataEditorSupport adds default implementation of SaveAsCapable interface to the CookieSet of DataObjects created by UniFileLoaders. The default implementation calls copyRename method on the DataObject.
An access to method arguments in source code is necessary for cases where we do not have full debug information.
Added methods:
EditorContext.getArguments()
Added classes:
EditorContext.MethodArgument
Whenever someone queries for encoding of a file object on default file system (e.g. the one that is provided by layers), it will get UTF-8 as the default encoding and not the system one. As a result all resources on layers should be in UTF-8 encoding.
project.license for templates using scripting language.
Added a ChangeSupport class to simplify
the management of ChangeListeners and the
firing of ChangeEvents.
Added TokenChange.isBoundsChange() to check
for changes that only modify token bounds (see method's javadoc).
Improved incrementality for embedded sections for bounds changes.
The DataEditorSupport overides the loadFromStreamToKit and saveFromKitToStream methods. In these methods it uses FileEncodingQuery to find out the encoding of the file, creates the Reader or Writer with obtained encoding and calls EditorKit.read or EditorKit.write.
Repository.getDefaultFileSystem's content can now be influenced by adding own FileSystems into global Lookup.getDefault(). This is supposed to work in a standalone mode as well as inside NetBeans Platform. The tutorial is available in the usecases section of achitecture description.
The Line.show() method accepts show mode constant,
that influences the way the Line is displayed on the request.
These additional constants provide new modes for opening the line
in a shared editor window that can be replaced by subsequent calls of
Line.show(SHOW_REUSE) on Lines from different
Document. This is useful for quick source browsing without
cluttering the UI with too many opened editors.
Classpath implementations can now specify which files and folders/packages to include
or exclude. (This could be used for binary classpaths such as COMPILE but
currently only excludes on SOURCE paths are honored by Java language features.)
Added PartType enum and Token.partType()
that identifies whether the token is COMPLETE or which part
of a complete token this part represents (START, INNER or END).
Ant-based projects can now conveniently specify include and exclude lists for source groups based on Ant's standard patternset syntax.
JTabbedPane that displays a small 'close' button in each tab.
When user clicks the close button a PropertyChangeEvent is fired from the
tabbed pane.
The previous version of palette API mandated that editor TopComponent had to insert a PaletteController instance into its Lookup if it wants to associate the palette with it. Now it is possible to associate the palette also with an existing editor without the need to change its implementation, e.g. to add code snippets palette to java source editor.
If the mime type of active editor window has an associated instance of PaletteController in the XML layer system then palette window opens and displays the specified palette contents. The PaletteController from TopComponent's Lookup takes precedens over the PaletteController found from mime type lookup in the XML layer (if any) for backwards compatibility.
The new API is fully backwards compatible and there are no implications for existing palette providers.
Added fields:
Breakpoint.PROP_VALIDITY -
This constant is used in property change events as a notification about change in validity.
Breakpoint.VALIDITY - enumeration of constants for breakpoint validity.
Added methods:
Breakpoint.getValidity(),
Breakpoint.getValidityMessage(),
Breakpoint.setValidity() - validity management.
The new API BinaryForSourceQuery was added to allow clients to find out the output (class files) corresponding to source root. The query uses instances of a SPI interface BinaryForSourceQueryImplementation registered in the system lookup to find out the binaries. When no binary is found it uses the default algorithm (SFBQ.findSources(ClassPath.EXECUTE) == sourceRoot)
Added a query (FileEncodingQuery) to find out the encoding of the file. The query
delegates to the instances of the SPI interface (FileEncodingQueryImplementation),
when the SPI implementations don't know anything about the file encoding it returns the encoding
corresponding to the file.encoding property. The API also provides getter and setter for default
project encoding which should be used by the project generator.
WizardDescriptor
added to the class.
Two new interfaces - CreateFromTemplateHandler and
CreateFromTemplateAttributesProvider to enhance the abilities
of data object to be created with parametrized values. Also new method
createFromTemplate taking extra map of named arguments
has been added, so users can pass the data object additional info
that can be processed during instantiation of the template.
This is particallary useful when using scripting and templating languages during create from template operation.
The CloneableEditorSupportRedirector
class allows a redirection of operations on a CloneableEditorSupport
object to another one. This can be useful if there are two logical
files representing one physical and one wants to have just a single
editor for both files. In such case just implement the
CloneableEditorSupportRedirector.
WizardDescriptor.Panel and WizardDescriptor.Iterator
has been generified to take generic type for data passed
into readSettings and storeSettings
objects.
Added fields:
ActionsManager.ACTION_STEP_OPERATION,
This constant is used in action performer which implements an operation step.
In order to be able to provide stepping over operations, we need a representation of an operation and some way how to retrieve the operation(s) from a Thread and a CallStackFrame.
Added fields:
JPDAStep.STEP_OPERATION,
EditorContext.CURRENT_LAST_OPERATION_ANNOTATION_TYPE,
EditorContext.CURRENT_EXPRESSION_SECONDARY_LINE_ANNOTATION_TYPE,
EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE
Added methods:
CallStackFrame.getCurrentOperation(),
JPDAThread.getCurrentOperation(),
JPDAThread.getLastOperations(),
EditorContext.createMethodOperation(),
EditorContext.addNextOperationTo(),
EditorContext.createPosition(),
EditorContext.getOperations()
Added classes:
EditorContext.BytecodeProvider,
EditorContext.Operation,
EditorContext.Position
Now it's possible to specify item's display name and tooltip directly in item's XML definition (instead of providing bundle name and keys). It's needed for items created at runtime, for example code snippets highlighted in the editor and dropped to the palette.
Now it's possible to provide an action that will be invoked as part of palette's 'refresh' logic.
The AttributesUtilities class has been added.
Changed the TokenSequence.move() to position before the particular token
that "contains" the offset (or after the last token if the given offset
is too high). Additional moveNext() is necessary
to actually move to the next token.
TokenSequence.moveIndex() was modified in a similar way
(see javadocs).
TokenSequence.moveFirst() and moveLast()
were replaced by moveStart() that positionins before
the first token and by moveEnd() that positions
after the last token.
TokenSequence.isEmpty() added to check whether there are
no tokens in the TS.
Added a Utilities.isMac() method for checking
if current platform is Mac.
Deprecating FontColorSettings.PROP_FONT_COLORS. It
should have never been made public in the first place. Nobody can
listen on this property anyway and the general contract is that
settings instances in MimeLookup are immutable and if anything
changes the whole instance (e.g. FontColorSettings) is replaced.
Added a Parameters class for checking the
values of method parameters.
Added Lexer.release() useful for lexer instances caching.
Extracted TokenHierarchyEvent.Type inner class
into TokenHierarchyEventType top-level class.
Adding TokenSequence.createEmbedding()
method for creation of a custom embedding.
TokenHierarchyEventType.EMBEDDING fired
after embedding creation.
Affected offset information (affectedStartOffset()
and affectedEndOffset()) moved
from TokenChange to TokenHierarchyEvent
There can be now more than one embedded change in a TokenChange.
Removed tokenComplete parameter from
LanguageHierarchy.embedding() because the token incompletness
will be handled in a different way.
Swapped order of token and languagePath
parameters in LanguageProvider to be in sync with
LanguageHierarchy.embedding().
LanguageEmbedding is now a final class
(instead of abstract class) with private constructor
and static create() method. That allows better control
over the evolution of the class and it also allows to cache the created embeddings
to save memory.
LanguageEmbedding is now generified with the
T extends TokenId which is a generification
of the language which it contains.
TokenHierarchy.languagePaths() set contains all language paths
used in the token hierarchy. TokenHierarchyEventType.LANGUAGE_PATHS
fired after change of that set.
The module is now autoload and it needs the org.netbeans.api.editor.settings.implementation
token. This token is provided by the editor/settings/storage module
by default.
Added two new methods to make enhanced for-loops easier to use
with legacy APIs returning Iterator or Enumeration.
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.
The FontColorNames and SimpleValueNames classes used to have a default construtor, even though it had never made sense to create instances of them. The default constructors have been removed and a privat noargs constructor has been added to both of them preventing an accidental instantiation.
getLookup to
allow queries for of its content.
Also there is a new method
assign(clazz, instances) that allows to add/remove
plain old java objects to the CookieSet.
Since now, each DataNode constructed without using own lookup,
shall have FileObject(s) associated with its
DataObject
available in its own lookup.
Also a
DataObject
has been retrofitted to implement a
Lookup.Provider
interface and thus have its
getLookup
method that can be used instead of the old getCookie one.
Adding suspend(String) to ProgressHandle class.
Any progress event coming after this call wakes up the progress bar to previous state.
Currently running task can switch to silent suspend mode where the progress bar stops moving, hides completely or partially. The exact UI behaviour is undefined.
Useful to make progress in status bar less intrusive for very long running tasks, eg. running an ant script that executes user application, debugs user application etc.
ProjectCustomizer.Category that will notify the Category
and it's panel that the changes ought to be applied. This is generally useful as a fallback, general
solution for 3rd party plugging into the project customizer in case the given project type doesn't provide
model-driven project updating mechanism.
Adding the LanguageDescription.find(String mimePath) method, which can
be used for looking up LanguageDescriptions by their
mime types.
OpenProjects.PROPERTY_MAIN_PROJECT property and firing changes in main project property value
to listeners attached to OpenProjects.
Now it's possible to add helpId attribute to palette's root, categories and items that will be used to create appropriate HelpCtx. The attribute can be specified in XML layer as a folder (palette's root and categories) or file attribute (palette items) or it can be provided directly by appropriate Nodes.
When F1 key is pressed in palette's window then first the selected item is asked for HelpCtx id. If no item is selected or it does not provide specific help id then selected category is checked for help id. If the category does not provide any help id either then palette's root is asked for help id. If the root does not define any then the default help id CommonPalette will be used.
As part of a switch to the Preferences API, this class no longer needs to be serialized.
LanguageProvider.findEmbeddedLanguage() method signature was changed. The method is now called findLanguageEmbedding and returns LanguageEmbedding instead of just LanguageDescription.
Generification of methods of LanguagePath, TokenSequence and other classes has been improved.
Added interfaces and support classes that can be used to compose the project's lookup
from multiple 3rd party sources. Framework for creating merged instances included.
LookupMerger implementation for Sources added.
Related to 1.12 change in Project API.
LookupMerger implementation for PrivilegedTemplates and
RecommendedTemplates added.
TokenSequence.moveOffset() was renamed to TokenSequence.move(). The original TokenSequence.move() which is seldom used was renamed to TokenSequence.moveIndex().
The LanguageProvider class was added to the SPI package. It is possible to register instances of this class in the default lookup. The lexer module will use them to find LanguageDescriptions for documents ( according to their mime types) and for tokens, which contain embedded language.
Added a new class and a new method to PropertyUtils to
make it easier to write a customizer version of
AntProjectHelper.getStandardPropertyEvaluator(),
among other things.
Added an interface ProjectConfigurationProvider
which can be included in a project's lookup to support
switchable configurations / profiles.
Added method CommonProjectActions.setProjectConfigurationAction()
to permit projects supporting configurations to include a context menu
item in their logical view to change the active configuration.
Added two utility methods for creation of folders and data files
that take java.io.File as a parameter:
public static FileObject createFolder (final File folder) throws IOException and
public static FileObject createData (final File folder) throws IOException
In order to be able to provide the class name for which the breakpoint should be submitted. This is necessary for JSP.
The TokenIdFilter class was removed from the API. Instead of it
Set<? extends TokenId> should be used where appropriate.
With the TokenFactory now being final the TokenHandler is no longer needed.
The few remaining overridable SPI methods were moved to LanguageHierarchy
and the TokenHandler class was removed.
LanguagePath and InputAttributes parameters were added
to LanguageHierarchy.createLexer() (to the end of the existing
parameters) in order to allow the lexer to react to input attributes.
For consistency the parameters of LanguageHierarchy.embedding()
were reordered so that the LanguagePath and InputAttributes parameters
are also at the end of the list and in the same order.
BeanNode, allowing
subclasses to pass context Lookup.
Added method for adding and removing a new library into/from the library manager. Added a factory class for creating Library (API object) form LibraryImplementation (SPI object). Added a support methods for listing installed LibraryTypeProviders.
Adding createMainLabelComponent(ProgressHandle) and
createDetailLabelComponent(ProgressHandle) to ProgressHandleFactory and AggregateProgressFactory classes.
These are complementary to the createProgressComponent(ProgressHandle) method and allow to
externalize the display of task's display name and detail messages when embedded in custom UI components.
The CloneableEditorSupport.getEditorKit() method
allows to access EditorKits registered in
MimeLookup. This is meant to be the primary way of finding
EditorKits registered by Netbeans modules. The
JEditorPane.createEditorKitForContentType and the
other related methods in JEditorPane should only be
used for finding EditorKits provided by JDK.
FileObjects created on XML layer now support a new
attribute "removeWritables" returning an instance of
Callable which removes the local writable version of the
given FileObject thus reverting the folder or file to
its initial state as defined in XML layers. Please note that is *not*
possible to reset FileObject's attributes.
Split the implementation and APIs of progress component.
showAddConnectionDialog which opens the
New Connection Dialog while pre-filling a specified database user and password.
It also adds showAddConnectionDialogFromEventThread methods
which are counterparts to the showAddConnectionDialog methods,
with the difference that they return the newly added database connection,
but must be called from the event dispatching thread.
If your module depends on org.openide.execution > 1.9 or higher
there is no need to specify that it also requires an implementation of
the API by use of OpenIDE-Module-Requires: org.openide.execution.ExecutionEngine,
this token will be requested automatically by the org.openide.execution
module itself.
If your module depends on org.openide.io > 1.11 or higher
there is no need to specify that it also requires an implementation of
the API by use of OpenIDE-Module-Requires: org.openide.windows.IOProvider,
this token will be requested automatically by the org.openide.io
module itself.
OpenIDE-Module-Needs: token which is slightly
less restrictive than usual
OpenIDE-Module-Requires: token as
explain in the documentation.
In order to be able to provide static context information and return value of methods, three new classes were added.
Conversion from Icon to Image is done
at various places and newly introduced method avoids the need to
duplicate the same code.
AutomaticExtraClasspathProvider can now be
created in a declarative way. So libraries that wish to
provide such Ant extension may just do it in declarative
way without depending on AutomaticExtraClasspathProvider
class.
ErrorManager is now deprecated and its replacement
is either Logger
or Exceptions.
To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.
To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.
Added two new classes useful for transitioning to JDK 5 generics.
When an external object (e.g. file(s)) is dragged over the Explorer, the drag events passed to Nodes under the cursor. It means that the appropriate Node is asked whether the dragged object(s) can be dropped to it. The drag support classes will also provide appropriate visual drag feedback - change cursor shape and/or draw drop line indicator.
When the object is dropped then the Node under the cursor will be
asked to provide supported PasteTypes that will handle
the drop.
Class DataNode add additional DataFlavors
to its Transferable which means that any file or folder
can be dragged from the IDE and dropped to any external application
that supports file drag and drop operations. The same functionality
applies to Copy/Cut and Paste operations.
Class DataFolder.FolderNode now supports file-type
DataFlavors so when a file(s) is dropped to a folder node
in the IDE then the file is copied into that folder. If the file is
a Java source file then the appropriate refactoring will fire up as well.
The custom JEditorPane used by CloneableEditor
has a custom DropTarget
instance which listens for some special objects (usually files) being
dragged over the editor pane and uses an instace of
ExternalDropHandler class from the global
Lookup to see if the drop can be accepted.
If the dragged object is supported then the caret in the editor does
not follow the cursor to indicate the drop position as if when dragging
a text snippet and regular Drop-Copy cursor is shown instead.
When the object is dropped into the editor the ExternalDropHandler
will process it (e.g. opens the file in a new editor tab).
Lookup to get an
instance of ExternalDropHandler class. If such an instance
is available then it will be used to check whether the drop can be accepted
(methods canDrop) and eventually to handle the dropped
object(s) as well - method handleDrop - for example open
dropped files in editor.
DropTargetListeners
(for example Projects view or Files view) therefore the ExternalDropHandler
will not be used when dragging over these components.
XMLFileSystem's
methodvalue now supports also Map
attribute, so one can write factory methods that are completely
independent on filesystems by creating methods like
static Object methodName(Map attrs) or
static Object methodName(Map attrs, String s).
The original API and SPI were rebuilt completely (under editor_api branch)
to comply with the standard requirements for the NetBeans APIs and allow
for better API evolution in the future.
The major version of the lexer module was increased to 2.
Retrieves a source root for a given URL. This is necessary to
match breakpoint locations with the sources selected fopr debugging.
It returns null by default.
Although newly added method FileObject.getOutputStream
doesn't take FileLock as a parameter, the implementation
is responsible for taking a lock before OutputStream is
returned and thus FileAlreadyLockedException exception is thrown
when FileObject is already locked.
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()).
JavaPlatformManager.getDefaultPlatform
could formerly return null, in case no installed
providers returned an instance; typically this
would be due to some storage problem. In the
interests of robustness, it will now as a fallback
return a simple platform instance corresponding
the JRE hosting the NetBeans code. Optional
capabilities may be missing so avoid relying on
this fallback platform implementation.
createCustomizerDialog(String, Lookup, String, ActionListener, HelpCtx) method to ProjectCustomizer.
That allows to construct project customizer from a layer folder content. It assumes to find instances of
ProjectCustomizer.CompositeCategoryProviderin the layer and constructs the UI from them.
The context is passed into the panel via a Lookup instance. What is in the lookup, is up to the individual project
implementations.
ProgressInstantiatingIterator notifies users while instantiate
is running by a progress bar, this progress bar is integrated into wizard panel.
Instantiating of newly created objects is invoked asynchronously.
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.
Option.shortDescription to associate a one-liner
text with an option. This description will be printed when showing
usage for the command line.
CommandException
that can influence the localized message which is then printed
to the user as a description of the error.
DatabaseExplorerUIs.connect()
method, which populates a JComboBox with the list of connections
from a ConnectionManager.
Env.getErrorStream() and Env.getOutputStream()
return PrintStream.
Character ColumnModel.getDisplayedMnemonic() method was
added to ColumnModel class.