|
|
|
SystemOption
and ServiceType
are inside openide.jar;
But the settings infrastructure is distributed
between openide.jar and core.jar;
Instead of SystemOption
or ServiceType
can be used arbitrary object , that
cooperate with convertor. Infrastracture for convertos is in core-settings.jar;
Question (deploy-nbm):
Can you deploy an NBM via the Update Center?
Answer:
openide.nbm and core.nbm) are reachable via the Update Center .
Question (deploy-shared):
Do you need to be installed in the shared location only, or in the user directory only,
or can your module be installed anywhere?
Answer:
openide.jar and core.jar must be in the shared location as it is part of the core of NetBeans.
core-settings.jar.jar can be anywhere.
Question (deploy-packages):
Are packages of your module made inaccessible by not declaring them
public?
Answer:
SystemOption
and ServiceType
are publicly accessible.
The settings infrastructure for SystemOptions
resides in core.jar
and is considered private except InstanceDataObject
which is in openide.jar, which
is public. Infrastracture for convertos is in core-settings.jar exposes some packages explicitly declaring them in manifest,
which means that all other packages are inaccessible.
Question (deploy-dependencies):
What do other modules need to do to declare a dependency on this one?
WARNING: Question with id="deploy-dependencies" has not been answered!java.io.File
directly?
Answer:
No.
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:
Provided layers:
org.openide.util.Lookup
or any similar technology to find any components to communicate with? Which ones?
Answer:
InstanceDataObject.createSettingsFile
is looked up ServiceType.Registry
to be sure,
that ServiceType is unique.
ClassLoader
is looked up often to find ModuleManager.SystemClassLoader
.
SharedClassObject.findObject
lookes
for instance of setting class in the active session to find serialized state of the option, if such state exists it is deserialized before
the object is returned from lookup, then all SystemOptions are deserialized at this place the first time anybody asks for the option.
Environment.Provider
which is ultimately
used to provide Lookup
, that provides InstanceCookie
.
This is a second way how can mainly InstanceDataObject
call
outside implementation (first one are method calls by reflection).
Question (lookup-remove):
Do you remove entries of other modules from lookup?
Answer:
No.
System.getProperty
) property?
Answer:
Neither java system nor (System.getProperty
) property. But attributes
attached to FileObject
are used for configuration. This configuration is too complex
and can't be separated from entity registration and so on. So, here is
description of configuration.
org.openide.util.SharedClassObject.initialize
-
SystemOption
needs to know whether the SharedClassObject
is just performing initialization and this is done using
this.getProperty ("org.openide.util.SharedClassObject.initialize")
which returns null if initialize is not called and Boolean.TRUE
if
it is.
Question (exec-component):
Is execution of your code influenced by any (string) property
of any of your components?
Answer:
No.
Question (exec-ant-tasks):
Do you define or register any ant tasks that other can use?
WARNING: Question with id="exec-ant-tasks" has not been answered!
Question (exec-classloader):
Does your code create its own class loader(s)?
Answer:
No.
Question (exec-reflection):
Does your code use Java Reflection to execute other code?
Answer:
Yes reflection is used heavily.
newInstance
or factory method, that
is defined in setting file.
addPropertyChangeListener
on
setting instances. There is also called pair method removePropertChangeListener
.
getDisplayName
and
getName
.
SystemOption
, then there is necessary to know if is project specific or global, to
be able to reset it to default value after another project was chosen. Then there is called method isGlobal
by reflection on
instance of setting.
XMLPropertiesConvertor
is used for settings based on xml with grammar defined by
-//NetBeans org.netbeans.modules.settings.examples//DTD XML ProxySettings 1.0//EN
, then methods
readProperties
and writeProperties
is used on instance of setting.
InstanceDataObject
that comes from openide.jar, calls
method responsible for storing setting on disk. This method is expected to have
following decaration public void methodName (java.io.Writer w, Object inst)
. Which
method and from which module is invoked depends on configuration.
InstanceDataObject
is used Lookup
to find InstanceCookie
. Then method setInstance
is invoked on instance of InstanceCookie
. This binds instance of setting to setting infrastructure.
Which Lookup
and then also which InstanceCookie
is used depends again on cofiguration.
description of configuration.
instanceof
,
work with java.lang.Class
, etc.)?
Answer:
No answer
Question (exec-threading):
What threading models, if any, does your module adhere to?
WARNING: Question with id="exec-threading" has not been answered!
Question (security-policy):
Does your functionality require modifications to the standard policy file?
WARNING: Question with id="security-policy" has not been answered!
Question (security-grant):
Does your code grant additional rights to some other code?
WARNING: Question with id="security-grant" has not been answered!java.awt.datatransfer.Transferable
?
Answer:
No special implementation.
Built on May 4 2005. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.