1
<?xml version="1.0" encoding="UTF-8"?>
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License. When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
43
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
44
<!ENTITY api-questions SYSTEM "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
48
question-version="1.14"
49
author="dkonecny@netbeans.org"
56
<question id="arch-what">
57
What is this project good for?
59
Please provide here a few lines describing the project,
60
what problem it should solve, provide links to documentation,
65
<answer id="arch-what">
66
The Registry over FileSystem is a library implementing registry contexts over
67
the filesystem. The library has very limited API and allows just create
68
context for the FileObject. It is not expected that regular modules should
70
<api name="RegistryOverFSAPI" group="java" type="export" category="devel" url="@org-openide-filesystems@/index.html"/>
76
<question id="compat-i18n">
77
Is your module correctly internationalized?
79
Correct internationalization means that it obeys instuctions
80
at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
81
NetBeans I18N pages</a>.
85
<answer id="compat-i18n">
92
<question id="compat-standards">
93
Does the module implement or define any standards? Is the
94
implementation exact or does it deviate somehow?
97
<answer id="compat-standards">
104
<question id="compat-version">
105
Can your module coexist with earlier and future
106
versions of itself? Can you correctly read all old settings? Will future
107
versions be able to read your current settings? Can you read
108
or politely ignore settings stored by a future version?
111
Very helpful for reading settings is to store version number
112
there, so future versions can decide whether how to read/convert
113
the settings and older versions can ignore the new ones.
117
<answer id="compat-version">
124
<question id="dep-jre">
125
Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
127
It is expected that if your module runs on 1.x that it will run
128
on 1.x+1 if no, state that please. Also describe here cases where
129
you run different code on different versions of JRE and why.
133
<answer id="dep-jre">
140
<question id="dep-jrejdk">
141
Do you require the JDK or is the JRE enough?
144
<answer id="dep-jrejdk">
151
<question id="dep-nb">
152
What other NetBeans projects does this one depend on?
154
If you want, describe such projects as imported API using
155
the <code><api name="identification" type="import or export" category="stable" url="where is the description" /></code>
160
<defaultanswer generate='none' />
162
<li><api type='import' group='java' category='private' name='org.openide.filesystems' url='@org-openide-filesystems@/overview-summary.html' >
163
The module is needed for compilation.
165
The module is used during runtime.
167
Specification version
172
<li><api type='import' group='java' category='private' name='org.openide.util' url='@org-openide-util@/overview-summary.html' >
173
The module is needed for compilation.
175
The module is used during runtime.
177
Specification version
182
<li><api type='import' group='java' category='private' name='org.openide.util.enumerations' url='@org-openide-util-enumerations@/overview-summary.html' >
183
The module is needed for compilation.
185
The module is used during runtime.
187
Specification version
192
<li><api type='import' group='java' category='private' name='org.openide.modules' url='@org-openide-modules@/overview-summary.html' >
193
The module is needed for compilation.
195
The module is used during runtime.
197
Specification version
202
<li><api type='import' group='java' category='private' name='org.openide.nodes' url='@org-openide-nodes@/overview-summary.html' >
203
The module is needed for compilation.
205
The module is used during runtime.
207
Specification version
212
<li><api type='import' group='java' category='private' name='org.openide.explorer' url='@org-openide-explorer@/overview-summary.html' >
213
The module is needed for compilation.
215
The module is used during runtime.
217
Specification version
222
<li><api type='import' group='java' category='private' name='org.openide.awt' url='@org-openide-awt@/overview-summary.html' >
223
The module is needed for compilation.
225
The module is used during runtime.
227
Specification version
232
<li><api type='import' group='java' category='private' name='org.openide.dialogs' url='@org-openide-dialogs@/overview-summary.html' >
233
The module is needed for compilation.
235
The module is used during runtime.
237
Specification version
242
<li><api type='import' group='java' category='private' name='org.openide.options' url='@org-openide-options@/overview-summary.html' >
243
The module is needed for compilation.
245
The module is used during runtime.
247
Specification version
252
<li><api type='import' group='java' category='private' name='org.openide.windows' url='@org-openide-windows@/overview-summary.html' >
253
The module is needed for compilation.
255
The module is used during runtime.
257
Specification version
262
<li><api type='import' group='java' category='private' name='org.openide.text' url='@org-openide-text@/overview-summary.html' >
263
The module is needed for compilation.
265
The module is used during runtime.
267
Specification version
272
<li><api type='import' group='java' category='private' name='org.openide.actions' url='@org-openide-actions@/overview-summary.html' >
273
The module is needed for compilation.
275
The module is used during runtime.
277
Specification version
282
<li><api type='import' group='java' category='private' name='org.openide.loaders' url='@org-openide-loaders@/overview-summary.html' >
283
The module is needed for compilation.
285
The module is used during runtime.
288
<li><api type='import' group='java' category='private' name='org.netbeans.modules.convertor' url='@org-netbeans-modules-convertor@/overview-summary.html' >
289
The module is needed for compilation.
291
The module is used during runtime.
293
Specification version
298
<li><api type='import' group='java' category='private' name='org.netbeans.modules.registry' url='@org-netbeans-modules-registry@/overview-summary.html' >
299
The module is needed for compilation.
301
The module is used during runtime.
303
Specification version
308
<li><api type='import' group='java' category='private' name='org.netbeans.core.startup' >
309
The module is needed for compilation.
310
The module is used during runtime to access details about layers.
313
<li><api type='import' group='java' category='private' name='org.netbeans.libs.xerces' >
314
The library module is used during runtime.
316
Specification version
327
<question id="dep-non-nb">
328
What other projects outside NetBeans does this one depend on?
331
Some non-NetBeans projects are packaged as NetBeans modules
332
(see <a href="http://libs.netbeans.org/">libraries</a>) and
333
it is prefered to use this approach when more modules may
334
depend on such third-party library.
338
<answer id="dep-non-nb">
345
<question id="dep-platform">
346
On which platforms does your module run? Does it run in the same
349
If your module is using JNI or deals with special differences of
350
OSes like filesystems, etc. please describe here what they are.
354
<answer id="dep-platform">
361
<question id="deploy-jar">
362
Do you deploy just module JAR file(s) or other files as well?
364
If your module consists of just one module JAR file, just confirm that.
365
If it uses more than one JAR, describe where they are located, how
366
they refer to each other.
367
If it consist of module JAR(s) and other files, please describe
368
what is their purpose, why other files are necessary. Please
369
make sure that installation/deinstallation leaves the system
370
in state as it was before installation.
374
<answer id="deploy-jar">
381
<question id="deploy-nbm">
382
Can you deploy an NBM via the Update Center?
388
<answer id="deploy-nbm">
395
<question id="deploy-packages">
396
Are packages of your module made inaccessible by not declaring them
400
NetBeans module system allows restriction of access rights to
401
public classes of your module from other modules. This prevents
402
unwanted dependencies of others on your code and should be used
403
whenever possible (<a href="http://www.netbeans.org/download/apis/org/openide/doc-files/upgrade.html#3.4-public-packages">
409
<answer id="deploy-packages">
416
<question id="deploy-shared">
417
Do you need to be installed in the shared location only, or in the user directory only,
418
or can your module be installed anywhere?
420
Installation location shall not matter, if it does explain why.
421
Consider also whether <code>InstalledFileLocator</code> can help.
425
<answer id="deploy-shared">
432
<question id="exec-classloader">
433
Does your code create its own class loader(s)?
435
A bit unusual. Please explain why and what for.
439
<answer id="exec-classloader">
446
<question id="exec-component">
447
Is execution of your code influenced by any (string) property
448
of any of your components?
451
Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
452
or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
453
a behaviour of some code. This of course forms an interface that should
454
be documented. Also if one depends on some interface that an object
455
implements (<code>component instanceof Runnable</code>) that forms an
460
<answer id="exec-component">
467
<question id="exec-introspection">
468
Does your module use any kind of runtime type information (<code>instanceof</code>,
469
work with <code>java.lang.Class</code>, etc.)?
471
Check for cases when you have an object of type A and you also
472
expect it to (possibly) be of type B and do some special action. That
473
should be documented. The same applies on operations in meta-level
474
(Class.isInstance(...), Class.isAssignableFrom(...), etc.).
478
<answer id="exec-introspection">
485
<question id="exec-privateaccess">
486
Are you aware of any other parts of the system calling some of
487
your methods by reflection?
489
If so, describe the "contract" as an API. Likely private or friend one, but
490
still API and consider rewrite of it.
494
<answer id="exec-privateaccess">
501
<question id="exec-process">
502
Do you execute an external process from your module? How do you ensure
503
that the result is the same on different platforms? Do you parse output?
504
Do you depend on result code?
506
If you feed an input, parse the output please declare that as an API.
510
<answer id="exec-process">
517
<question id="exec-property">
518
Is execution of your code influenced by any environment or
519
Java system (<code>System.getProperty</code>) property?
522
If there is a property that can change the behaviour of your
523
code, somebody will likely use it. You should describe what it does
524
and the stability category of this API. You may use
526
<property name="id" category="private" >
527
description of the property, where it is used, what it influence, etc.
533
<answer id="exec-property">
540
<question id="exec-reflection">
541
Does your code use Java Reflection to execute other code?
543
This usually indicates a missing or unsufficient API in the other
544
part of the system. If the other side is not aware of your dependency
545
this contract can be easily broken.
549
<answer id="exec-reflection">
556
<question id="format-clipboard">
557
Which data flavors (if any) does your code read from or insert to
558
the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
561
Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
562
Check your code for overriding these methods.
566
<answer id="format-clipboard">
573
<question id="format-dnd">
574
Which protocols (if any) does your code understand during Drag & Drop?
576
Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>.
577
Check your code for overriding these methods. Btw. if they are not overriden, they
578
by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
582
<answer id="format-dnd">
589
<question id="format-types">
590
Which protocols and file formats (if any) does your module read or write on disk,
591
or transmit or receive over the network?
594
<answer id="format-types">
601
<question id="lookup-lookup">
602
Does your module use <code>org.openide.util.Lookup</code>
603
to find any components to communicate with? Which ones?
606
Please describe the interfaces you are searching for, where
607
are defined, whether you are searching for just one or more of them,
608
if the order is important, etc. Also clasify the stability of such
613
<answer id="lookup-lookup">
620
<question id="lookup-register">
621
Do you register anything into lookup for other code to find?
623
Do you register using layer file or using <code>META-INF/services</code>?
624
Who is supposed to find your component?
628
<answer id="lookup-register">
635
<question id="lookup-remove">
636
Do you remove entries of other modules from lookup?
638
Why? Of course, that is possible, but it can be dangerous. Is the module
639
your are masking resource from aware of what you are doing?
643
<answer id="lookup-remove">
650
<question id="perf-exit">
651
Does your module run any code on exit?
654
<answer id="perf-exit">
661
<question id="perf-huge_dialogs">
662
Does your module contain any dialogs or wizards with a large number of
663
GUI controls such as combo boxes, lists, trees, or text areas?
666
<answer id="perf-huge_dialogs">
673
<question id="perf-limit">
674
Are there any hardcoded or practical limits in the number or size of
675
elements your code can handle?
678
<answer id="perf-limit">
685
<question id="perf-mem">
686
How much memory does your component consume? Estimate
687
with a relation to the number of windows, etc.
690
<answer id="perf-mem">
697
<question id="perf-menus">
698
Does your module use dynamically updated context menus, or
699
context-sensitive actions with complicated enablement logic?
702
<answer id="perf-menus">
709
<question id="perf-progress">
710
Does your module execute any long-running tasks?
711
<hint>Typically they are tasks like connecting over
712
network, computing huge amount of data, compilation.
713
Such communication should be done asynchronously (for example
714
using <code>RequestProcessor</code>), definitively it should
715
not block AWT thread.
719
<answer id="perf-progress">
726
<question id="perf-scale">
727
Which external criteria influence the performance of your
728
program (size of file in editor, number of files in menu,
729
in source directory, etc.) and how well your code scales?
730
Please include some estimates.
733
<answer id="perf-scale">
740
<question id="perf-startup">
741
Does your module run any code on startup?
744
<answer id="perf-startup">
751
<question id="perf-wakeup">
752
Does any piece of your code wake up periodically and do something
753
even when the system is otherwise idle (no user interaction)?
756
<answer id="perf-wakeup">
763
<question id="resources-file">
764
Does your module use <code>java.io.File</code> directly?
767
NetBeans provide a logical wrapper over plain files called
768
<code>org.openide.filesystems.FileObject</code> that
769
provides uniform access to such resources and is the prefered
770
way that should be used. But of course there can be situations when
771
this is not suitable.
775
<answer id="resources-file">
782
<question id="resources-layer">
783
Does your module provide own layer? Does it create any files or
784
folders in it? What it is trying to communicate by that and with which
788
NetBeans allows automatic and declarative installation of resources
789
by module layers. Module register files into appropriate places
790
and other components use that information to perform their task
791
(build menu, toolbar, window layout, list of templates, set of
796
<answer id="resources-layer">
803
<question id="resources-mask">
804
Does your module mask/hide/override any resources provided by other modules in
808
If you mask a file provided by another module, you probably depend
809
on that and do not want the other module to (for example) change
810
the file's name. That module shall thus make that file available as an API
811
of some stability category.
815
<answer id="resources-mask">
822
<question id="resources-read">
823
Does your module read any resources from layers? For what purpose?
826
As this is some kind of intermodule dependency, it is a kind of API.
827
Please describe it and clasify according to
828
<a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
829
common stability categories</a>.
833
<answer id="resources-read">
841
<question id="arch-overall" when="init">
842
Describe the overall architecture.
845
<a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi" shape="rect">
846
clients and what support API</a>?
847
What parts will be pluggable?
848
How will plug-ins be registered? Please use <code><api type="export"/></code>
849
to describe your general APIs.
850
If possible please provide
855
<answer id="arch-overall">
857
XXX no answer for arch-overall
864
<question id="arch-quality" when="init">
865
How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html" shape="rect">quality</a>
866
of your code be tested and
867
how are future regressions going to be prevented?
869
What kind of testing do
870
you want to use? How much functionality, in which areas,
871
should be covered by the tests?
875
<answer id="arch-quality">
877
XXX no answer for arch-quality
884
<question id="arch-time" when="init">
885
What are the time estimates of the work?
887
Please express your estimates of how long the design, implementation,
888
stabilization are likely to last. How many people will be needed to
889
implement this and what is the expected milestone by which the work should be
894
<answer id="arch-time">
896
XXX no answer for arch-time
903
<question id="arch-usecases" when="init">
905
Content of this answer will be displayed as part of page at
906
http://www.netbeans.org/download/dev/javadoc/usecases.html
907
You can use tags <usecase name="name> regular html description </usecase>
908
and if you want to use an URL you can prefix if with @TOP@ to begin
909
at the root of your javadoc
912
Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase" shape="rect">
913
use cases</a> of the new API. Who will use it under
914
what circumstances? What kind of code would typically need to be written
918
<answer id="arch-usecases">
920
XXX no answer for arch-usecases
927
<question id="arch-where" when="init">
928
Where one can find sources for your module?
930
Please provide link to the CVS web client at
931
http://www.netbeans.org/download/source_browse.html
932
or just use tag defaultanswer generate='here'
936
<answer id="arch-where">
937
<defaultanswer generate='here' />
942
<answer id="deploy-dependencies">
951
<question id="exec-ant-tasks" when="impl">
952
Do you define or register any ant tasks that other can use?
955
If you provide an ant task that users can use, you need to be very
956
careful about its syntax and behaviour, as it most likely forms an
957
API for end users and as there is a lot of end users, their reaction
958
when such API gets broken can be pretty strong.
962
<answer id="exec-ant-tasks">
964
XXX no answer for exec-ant-tasks
971
<question id="exec-threading" when="impl">
972
What threading models, if any, does your module adhere to?
974
If your module calls foreign APIs which have a specific threading model,
975
indicate how you comply with the requirements for multithreaded access
976
(synchronization, mutexes, etc.) applicable to those APIs.
977
If your module defines any APIs, or has complex internal structures
978
that might be used from multiple threads, declare how you protect
979
data against concurrent access, race conditions, deadlocks, etc.,
980
and whether such rules are enforced by runtime warnings, errors, assertions, etc.
981
Examples: a class might be non-thread-safe (like Java Collections); might
982
be fully thread-safe (internal locking); might require access through a mutex
983
(and may or may not automatically acquire that mutex on behalf of a client method);
984
might be able to run only in the event queue; etc.
985
Also describe when any events are fired: synchronously, asynchronously, etc.
986
Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations" shape="rect">Threading Recommendations</a> (in progress)
990
<answer id="exec-threading">
992
XXX no answer for exec-threading
999
<question id="perf-spi" when="init">
1000
How the performance of the plugged in code will be enforced?
1002
If you allow foreign code to be plugged into your own module, how
1003
do you enforce that it will behave correctly and quickly and will not
1004
negatively influence the performance of your own module?
1008
<answer id="perf-spi">
1010
XXX no answer for perf-spi
1017
<question id="security-grant" when="final">
1018
Does your code grant additional rights to some other code?
1019
<hint>Avoid using a class loader that adds extra
1020
permissions to loaded code unless really necessary.
1021
Also note that your API implementation
1022
can also expose unneeded permissions to enemy code by
1023
calling AccessController.doPrivileged().</hint>
1026
<answer id="security-grant">
1028
XXX no answer for security-grant
1035
<question id="security-policy" when="final">
1036
Does your functionality require modifications to the standard policy file?
1037
<hint>Your code might pass control to third-party code not
1038
coming from trusted domains. This could be code downloaded over the
1039
network or code coming from libraries that are not bundled
1040
with NetBeans. Which permissions need to be granted to which domains?</hint>
1043
<answer id="security-policy">
1045
XXX no answer for security-policy