|
|
|
|
|
|
org.netbeans and org.netbeans.core packages
which directly support early startup features, such as command-line
options.
Question (arch-overall):
Describe the overall architecture.
Answer:
XXX no answer for arch-overall
Question (arch-usecases): Describe the main use cases of the new API. Who will use it under what circumstances? What kind of code would typically need to be written to use the module? Answer:XXX no answer for arch-usecases
Question (arch-time): What are the time estimates of the work? Answer:XXX no answer for arch-time
Question (arch-quality): How will the quality of your code be tested and how are future regressions going to be prevented? Answer:XXX no answer for arch-quality
Question (arch-where): Where one can find sources for your module? Answer:
The sources for the module are in the NetBeans Mercurial repositories.
The nbexec launcher is fully featured and supported. It should work on any Unix flavor. Implemented as a shell script.
lock-file
-
The lock file ${netbeans.user}/lock will have file
permissions changed to go-rwx for safety on Unix
systems (requires presence of chmod)
The nbexec.exe launcher is fully featured and supported. Implemented using Visual C++; prebuilt binary is kept in CVS along with sources.
org.netbeans.TopSecurityManager.
Modules may use org.netbeans.CLIHandler to add command-line
option handling (currently used by utilities).
Question (deploy-dependencies):
What do other modules need to do to declare a dependency on this one,
in addition to or instead of the normal module dependency declaration
(e.g. tokens to require)?
Answer:
XXX no answer for deploy-dependencies
XXX no answer for compat-deprecation
java.io.File directly?
Answer:
Yes, it must. The Filesystems API has not been loaded when it runs.
.lastModified
-
To speedup testing that module caches are up-to-date, the system
recognizes special file inside of each cluster. If .lastModified
file is present in a cluster, then the content of the cluster is not
scanned any more deeply and instead the time stamp of the file is
used as last modification for the whole content of the cluster.
This API is primarily intended for use by installer and RPM packagers and also autoupdate, that are supposed to create such file, as soon as they finish modifications to any cluster.
This file is ignored when accessing user directory, as it is expected that user can modify it, while the user usually does not have access permision or need to modify the shared installation clusters.
cached.lastModified -
If the .lastModified file is not present in cluster
directory, it is recomputed on startup and stored in
$userdir/var/cache/lastModified/$clustername. This
file and its content is meant just for private consumption of the
IDE.
To speedup class loading during startup, the system keeps a cache of resources needed during startup in var/cache/all-resources.dat. If the cache is valid, it is loaded during startup and class and resource loading requests are redirected there.
The file is binary and shouldn't be modified by other code than org.netbeans.Archive. The file content uses magic header and versioning to allow evolution of its (private) format.
Question (resources-layer): Does your module provide own layer? Does it create any files or folders in it? What it is trying to communicate by that and with which components? Answer: No. Question (resources-read): Does your module read any resources from layers? For what purpose? Answer: No. Question (resources-mask): Does your module mask/hide/override any resources provided by other modules in their layers? Answer: No. Question (resources-preferences): Does your module uses preferences via Preferences API? Does your module use NbPreferences or or regular JDK Preferences ? Does it read, write or both ? Does it share preferences with other modules ? If so, then why ? Answer:XXX no answer for resources-preferences
org.openide.util.Lookup
or any similar technology to find any components to communicate with? Which ones?
Answer:
lookup.org.netbeans.CLIHandler
-
Instances of org.netbeans.CLIHandler are found using
services lookup in the "dynamic classpath loader" (i.e. startup
classpath plus ${netbeans.home}/core/*.jar).
Instances of org.netbeans.ModuleFactory are found using
services lookup in the "dynamic classpath loader" (i.e. startup
classpath plus ${netbeans.home}/core/*.jar). ModuleFactory
can be used to create alternative module implementations.
The communication between core.jar and rest of the platform code
in org-netbeans-core.jar is handled thru
handled thru CoreBridge calls.
Additional callbacks from core.jar after the module system is started
are done using RunLevel interface. Currently it starts window system.
There is a communication bridge between the default logging handler registered by core/startup and the UI handler in core that presents certain log records in the UI.
Question (lookup-register): Do you register anything into lookup for other code to find? Answer: No. Question (lookup-remove): Do you remove entries of other modules from lookup? Answer: No.System.getProperty) property?
On a similar note, is there something interesting that you
pass to java.util.logging.Logger? Or do you observe
what others log?
Answer:
Software\JavaSoft\Java Development Kit is the
default JDK installation directory to use, unless
--jdkhome is given. [Windows only]
org.netbeans.core.startup.Main).
Might be used by alternate launchers.
Software\netbeans.org\NetBeans IDE\Dev
Default user directory, unless --userdir is
given. The name of this registry key is brandable, as is its
default value. [Windows only]
user.dir.
WARNING level about accessing resources from the default package.
core/*.jar files has been initialized
and the user dir has not yet been updated (see bellow) the
launcher checks for value of netbeans.importclass
system property and if provided it loads that class and invokes
its main method (in AWT thread) and if no exception is thrown it
marks the userdir as already upgraded.
imported-marker
-
${netbeans.user}/var/imported is used to identify whether a userdir has already been updated
or it still needs an update. Can be created by installer if no update
check should be performed, no other code is supposed to realy on
this file.
netbeans.accept_license_class
-
Before first usage of IDE user must accept license. If user does not install IDE
by installer (user must accept license during installation) user must accept license
during IDE first start.
Launcher calls method showLicensePanel of netbeans.acceptlicenseclass
if license was not yet accepted by user and it is necessary to show license
in dialog to user.
Controls whether to log messages to the console, or just to the log file.
Setting this property to less than zero value enables logging of what is
going on in the CLIHandler - e.g. in the code that locks user directory and
handles processing of command line options. Use -J-Dorg.netbeans.CLIHandler=-1
to send the logging to System.err.
Contains class name of a class that can serve as provider of the writable layer of the
system file system. The class must be a subclass of
org.openide.filesystems.FileSystem and have public default constructor.
Morevoer the class denoted by the property must be on the classpath.
System.exit.
One can disable this behavior by providing -Dnetbeans.security.nocheck=true.
Since version 2.47 such property also allows the SecurityManager
to be replaced by another.
There are also some options passed to the launcher (interpreted
either by the script itself, or by early startup Java code).
Options parsed by plugins using org.netbeans.CLIHandler
(e.g. -open FILE) are not included in this list:
netbeans.dirs.
Some of the branded keys may also be of some interest, they are
enumerated under the property group, but all of them are currently
part of org/netbeans/core/startup/Bundle.properties file and thus
can be branded by overriding them in
org/netbeans/core/startup/Bundle_brandingname.properties
true or false, allows
some applications build on top of the platform to disable
splash by default
DialogDisplayer.
netbeans.exception.alert.min.level
-
Minimum integer level that triggers the blinking icon signaling an
exceptional state. By default 900 - e.g. WARNING.
netbeans.exception.report.min.level
-
Minimum integer level that triggers the dialog with exception.
By default 900 with assertions on and 1001 without them.
Question (exec-ant-tasks):
Do you define or register any ant tasks that other can use?
Answer:
XXX no answer for exec-ant-tasks
Question (exec-classloader): Does your code create its own class loader(s)? Answer: ClassPath-Composition - Bootstrap code creates a class loader to load the rest of the core from. The bootstrap code is loaded from the Java application class loader, using the classpath lib/*.jar. Dynamic-ClassPath-Composition - After creating bootstrap classpath another low level set of JARs is loaded with a new classloader from core/*.jar directories in each clusters. Question (exec-reflection): Does your code use Java Reflection to execute other code? Answer:The bootstrap code of course uses reflection to start the normal core. Currently some reflection is used in bootstrap class loaders to work around a variety of JRE bugs in handling loading from JAR files, especially on Windows which has mandatory file locking - the JRE code to load from JARs is rather buggy when it comes to changing or removing the JAR during the JVM session.
Javeleon -When present as a Java agent on the boot classpath, Javeleon is invoked reflectively to enhance module reloading.
Question (exec-privateaccess): Are you aware of any other parts of the system calling some of your methods by reflection? Answer: None known. Question (exec-process): Do you execute an external process from your module? How do you ensure that the result is the same on different platforms? Do you parse output? Do you depend on result code? Answer: No, except for the updater tool (part of Auto Update, q.v.).chmod is run if available to disable read access for other users
to ${netbeans.user}/lock; no output is parsed but the result
code is checked (if the executable in fact exists).
Question (exec-introspection):
Does your module use any kind of runtime type information (instanceof,
work with java.lang.Class, etc.)?
Answer:
ProxyClassLoader (the general NetBeans class loader which
loads all of core and modules) checks to see if its parent loaders
include instances of ProxyClassLoader, in which case it
delegates to them differently. This is necessary due to the design of
that loader.
ExceptionAnnotatableUsingLogRecords
-
To support classification of exceptions and also annotation of
exceptions with logging levels and additional localized messages,
logged exceptions and their initCause's are searched for
implementation of Callable<LogRecord[]>.
If an exception implements this interface, the call()
method is called and returned LogRecords then
scanned for messages, levels, etc.
XXX no answer for exec-threading
Question (security-policy): Does your functionality require modifications to the standard policy file? Answer:XXX no answer for security-policy
Question (security-grant): Does your code grant additional rights to some other code? Answer:XXX no answer for security-grant
java.awt.datatransfer.Transferable?
Answer:
N/A
XXX no answer for perf-spi
Built on May 22 2012. | Portions Copyright 1997-2012 Oracle. All rights reserved.