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-2007 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.29"
49
author="dkaspar@netbeans.org"
56
<question id="arch-overall" when="init">
57
Describe the overall architecture.
60
<a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
61
clients and what support API</a>?
62
What parts will be pluggable?
63
How will plug-ins be registered? Please use <code><api type="export"/></code>
64
to describe your general APIs and specify their
65
<a href="http://openide.netbeans.org/tutorial/api-design.html#category-private">
66
stability categories</a>.
67
If possible please provide simple diagrams.
71
<answer id="arch-overall">
72
<api group="java" name="VisualLibraryAPI" type="export" category="official">
74
The API provides a set of reusable pieces - widgets. By composing them you are creating a visualization.
75
Each widget has various properties including layout, border, assigned actions, ... The library contains a set of pre-defined widgets that can be extended.
76
All pluggable pieces are declared as interfaces or abstract classes - WidgetAction, Anchor, AnchorShape, PointShape, Animator, Border,
77
GraphLayout, LookFeel, Layout, SceneLayout, Router, CollisionsCollector.
78
Also they all have their built-in implementation.
87
<question id="arch-quality" when="init">
88
How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
89
of your code be tested and
90
how are future regressions going to be prevented?
92
What kind of testing do
93
you want to use? How much functionality, in which areas,
94
should be covered by the tests? How you find out that your
95
project was successful?
99
<answer id="arch-quality">
101
The quality is covered by a set of tests in the graph/examples module. The tests are visual and requires to be run manually.
108
<question id="arch-time" when="init">
109
What are the time estimates of the work?
111
Please express your estimates of how long the design, implementation,
112
stabilization are likely to last. How many people will be needed to
113
implement this and what is the expected milestone by which the work should be
118
<answer id="arch-time">
127
<question id="arch-usecases" when="init">
129
Content of this answer will be displayed as part of page at
130
http://www.netbeans.org/download/dev/javadoc/usecases.html
131
You can use tags <usecase name="name> regular html description </usecase>
132
and if you want to use an URL you can prefix if with @TOP@ to begin
133
at the root of your javadoc
136
Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase">
137
use cases</a> of the new API. Who will use it under
138
what circumstances? What kind of code would typically need to be written
142
<answer id="arch-usecases">
144
See <a href="@TOP@/org/netbeans/api/visual/widget/doc-files/documentation.html">documentation</a> for complete set of use-cases.
151
<question id="arch-what" when="init">
152
What is this project good for?
154
Please provide here a few lines describing the project,
155
what problem it should solve, provide links to documentation,
160
<answer id="arch-what">
162
The Visual Library 2.0 is the next generation of the original Graph Library 1.0.
163
It is designed for a general visualization with a support for graph-oriented modeling.
164
Its focus is to become a part of the NetBeans platform and unify the visualization (UI and API) used in NetBeans-Platform-based applications.
165
See http://graph.netbeans.org/ web-site for details.
166
See <a href="@TOP@/org/netbeans/api/visual/widget/doc-files/documentation.html">documentation</a> for complete set of use-cases and code-snippets.
173
<question id="arch-where" when="impl">
174
Where one can find sources for your module?
176
Please provide link to the CVS web client at
177
http://www.netbeans.org/download/source_browse.html
178
or just use tag defaultanswer generate='here'
182
<answer id="arch-where">
183
<defaultanswer generate='here' />
189
<question id="compat-deprecation" when="init">
190
How the introduction of your project influences functionality
191
provided by previous version of the product?
193
If you are planning to deprecate/remove/change any existing APIs,
194
list them here accompanied with the reason explaining why you
199
<answer id="compat-deprecation">
201
Previous Graph Library 1.0 API is deprecated now and is going to be unsupported. The Visual Library 2.0 API is a full replacement of the previous version.
208
<question id="compat-i18n" when="impl">
209
Is your module correctly internationalized?
211
Correct internationalization means that it obeys instructions
212
at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
213
NetBeans I18N pages</a>.
217
<answer id="compat-i18n">
219
Yes. There is no i18n-able string.
226
<question id="compat-standards" when="init">
227
Does the module implement or define any standards? Is the
228
implementation exact or does it deviate somehow?
231
<answer id="compat-standards">
240
<question id="compat-version" when="impl">
241
Can your module coexist with earlier and future
242
versions of itself? Can you correctly read all old settings? Will future
243
versions be able to read your current settings? Can you read
244
or politely ignore settings stored by a future version?
247
Very helpful for reading settings is to store version number
248
there, so future versions can decide whether how to read/convert
249
the settings and older versions can ignore the new ones.
253
<answer id="compat-version">
255
Yes, it can. No settings are stored.
262
<question id="dep-jre" when="final">
263
Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
265
It is expected that if your module runs on 1.x that it will run
266
on 1.x+1 if no, state that please. Also describe here cases where
267
you run different code on different versions of JRE and why.
271
<answer id="dep-jre">
280
<question id="dep-jrejdk" when="final">
281
Do you require the JDK or is the JRE enough?
284
<answer id="dep-jrejdk">
293
<question id="dep-nb" when="init">
294
What other NetBeans projects and modules does this one depend on?
296
Depending on other NetBeans projects influnces the ability of
297
users of your work to customize their own branded version of
298
NetBeans by enabling and disabling some modules. Too
299
much dependencies restrict this kind of customization. If that
300
is your case, then you may want to split your functionality into
301
pieces of autoload, eager and regular modules which can be
302
enabled independently. Usually the answer to this question
303
is generated from your <code>project.xml</code> file, but
304
if it is not guessed correctly, you can suppress it by
305
specifying <defaultanswer generate="none"/> and
306
write here your own. Please describe such projects as imported APIs using
307
the <code><api name="identification" type="import or export" category="stable" url="where is the description" /></code>.
308
By doing this information gets listed in the summary page of your
314
<defaultanswer generate='here' />
320
<question id="dep-non-nb" when="init">
321
What other projects outside NetBeans does this one depend on?
324
Depending on 3rd party libraries is always problematic,
325
especially if they are not open source, as that complicates
326
the licensing scheme of NetBeans. Please enumerate your
327
external dependencies here, so it is correctly understood since
328
the begining what are the legal implications of your project.
329
Also please note that
330
some non-NetBeans projects are packaged as NetBeans modules
331
(see <a href="http://libs.netbeans.org/">libraries</a>) and
332
it is preferred to use this approach when more modules may
333
depend and share such third-party libraries.
337
<answer id="dep-non-nb">
346
<question id="dep-platform" when="init">
347
On which platforms does your module run? Does it run in the same
350
If you plan any dependency on OS or any usage of native code,
351
please describe why you are doing so and describe how you envision
352
to enforce the portability of your code.
353
Please note that there is a support for <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific">OS conditionally
354
enabled modules</a> which together with autoload/eager modules
355
can allow you to enable to provide the best OS aware support
356
on certain OSes while providing compatibility bridge on the not
358
Also please list the supported
359
OSes/HW platforms and mentioned the lovest version of JDK required
360
for your project to run on. Also state whether JRE is enough or
365
<answer id="dep-platform">
367
It runs on any platform with JavaSE 5.0+ and AWT/Swing.
374
<question id="deploy-dependencies" when="final">
375
What do other modules need to do to declare a dependency on this one,
376
in addition to or instead of the normal module dependency declaration
377
(e.g. tokens to require)?
379
Provide a sample of the actual lines you would add to a module manifest
380
to declare a dependency, for example OpenIDE-Module-Requires: some.token.
381
If other modules should not depend on this module, or should just use a
382
simple regular module dependency, you can just answer "nothing". If you
383
intentionally expose a semistable API to clients using implementation
384
dependencies, you should mention that here (but there is no need to give
385
an example of usage).
389
<answer id="deploy-dependencies">
391
No. Just set a normal project dependency on org.netbeans.api.visual (spec no.: 2.0) module.
398
<question id="deploy-jar" when="impl">
399
Do you deploy just module JAR file(s) or other files as well?
401
Usually a module consist of one JAR file (perhaps with Class-Path
402
extensions) and also a configuration file that enables it. If you
403
have any other files, use
404
<api group="java.io.File" name="yourname" type="export" category="friend">...</api>
405
to define the location, name and stability of your files (of course
406
changing "yourname" and "friend" to suit your needs).
408
If it uses more than one JAR, describe where they are located, how
409
they refer to each other.
410
If it consist of module JAR(s) and other files, please describe
411
what is their purpose, why other files are necessary. Please
412
make sure that installation/uninstallation leaves the system
413
in state as it was before installation.
417
<answer id="deploy-jar">
419
Just the jar file of the library.
426
<question id="deploy-nbm" when="impl">
427
Can you deploy an NBM via the Update Center?
433
<answer id="deploy-nbm">
442
<question id="deploy-packages" when="init">
443
Are packages of your module made inaccessible by not declaring them
447
By default NetBeans build harness treats all packages are private.
448
If you export some of them - either as public or friend packages,
449
you should have a reason. If the reason is described elsewhere
450
in this document, you can ignore this question.
454
<answer id="deploy-packages">
456
Only org.netbeans.api.visual.* packages are public.
463
<question id="deploy-shared" when="final">
464
Do you need to be installed in the shared location only, or in the user directory only,
465
or can your module be installed anywhere?
467
Installation location shall not matter, if it does explain why.
468
Consider also whether <code>InstalledFileLocator</code> can help.
472
<answer id="deploy-shared">
481
<question id="exec-ant-tasks" when="impl">
482
Do you define or register any ant tasks that other can use?
485
If you provide an ant task that users can use, you need to be very
486
careful about its syntax and behaviour, as it most likely forms an
487
API for end users and as there is a lot of end users, their reaction
488
when such API gets broken can be pretty strong.
492
<answer id="exec-ant-tasks">
501
<question id="exec-classloader" when="impl">
502
Does your code create its own class loader(s)?
504
A bit unusual. Please explain why and what for.
508
<answer id="exec-classloader">
517
<question id="exec-component" when="impl">
518
Is execution of your code influenced by any (string) property
519
of any of your components?
522
Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
523
or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
524
a behavior of some code. This of course forms an interface that should
525
be documented. Also if one depends on some interface that an object
526
implements (<code>component instanceof Runnable</code>) that forms an
531
<answer id="exec-component">
533
PanAction requires a scene view JComponent to be placed into JScrollPane.
534
For scene rendering, rendering hints in "awt.font.desktophints" property are used.
541
<question id="exec-introspection" when="impl">
542
Does your module use any kind of runtime type information (<code>instanceof</code>,
543
work with <code>java.lang.Class</code>, etc.)?
545
Check for cases when you have an object of type A and you also
546
expect it to (possibly) be of type B and do some special action. That
547
should be documented. The same applies on operations in meta-level
548
(Class.isInstance(...), Class.isAssignableFrom(...), etc.).
552
<answer id="exec-introspection">
554
AddRemoveControlPointAction must be assigned to ConnectionWidget only.
555
SceneAction.animateBackgroundColor could be used only for Widget with a Color background otherwise white color is used.
556
CycleObjectSceneFocusProvider could be used for ObjectScene only.
557
Object in ObjectScene cannot based on Widget class.
558
LabelWidget has to have a Color-based background for proper work of its paintAsDisabled property.
559
LayoutFactory.getActiveCard and LayoutFactory.setActiveCard expects a widget with a CardLayout assigned.
560
MoveControlPointAction must be assigned to ConnectionWidget only.
561
ObjectSceneRectangularSelectProvider works select ConnectionWidget by their linear path between control points and other widgets are selected by their boundary.
562
PanAction requires a scene view JComponent to be placed into a JScrollPane.
563
ReconnectAction must be assigned to ConnectionWidget only.
564
WidgetCollisionCollector is treats ConnectionWidget specially by their linear path between control points and only for horizontal or vertical segments.
567
VerticalFlowLayout and HorizontalFlowLayout recognizes a Number-class constraint assigned to a child widget of a parent widget where the layout is assigned.
574
<question id="exec-privateaccess" when="final">
575
Are you aware of any other parts of the system calling some of
576
your methods by reflection?
578
If so, describe the "contract" as an API. Likely private or friend one, but
579
still API and consider rewrite of it.
583
<answer id="exec-privateaccess">
592
<question id="exec-process" when="impl">
593
Do you execute an external process from your module? How do you ensure
594
that the result is the same on different platforms? Do you parse output?
595
Do you depend on result code?
597
If you feed an input, parse the output please declare that as an API.
601
<answer id="exec-process">
610
<question id="exec-property" when="impl">
611
Is execution of your code influenced by any environment or
612
Java system (<code>System.getProperty</code>) property?
613
On a similar note, is there something interesting that you
614
pass to <code>java.util.logging.Logger</code>? Or do you observe
617
If there is a property that can change the behavior of your
618
code, somebody will likely use it. You should describe what it does
619
and the <a href="http://openide.netbeans.org/tutorial/api-design.html#life">stability category</a>
620
of this API. You may use
622
<api type="export" group="property" name="id" category="private" url="http://...">
623
description of the property, where it is used, what it influence, etc.
629
<answer id="exec-property">
631
For scene rendering, rendering hints in "awt.font.desktophints" property are used.
638
<question id="exec-reflection" when="impl">
639
Does your code use Java Reflection to execute other code?
641
This usually indicates a missing or insufficient API in the other
642
part of the system. If the other side is not aware of your dependency
643
this contract can be easily broken.
647
<answer id="exec-reflection">
656
<question id="exec-threading" when="init">
657
What threading models, if any, does your module adhere to? How the
658
project behaves with respect to threading?
660
Is your API threadsafe? Can it be accessed from any threads or
661
just from some dedicated ones? Any special relation to AWT and
662
its Event Dispatch thread? Also
663
if your module calls foreign APIs which have a specific threading model,
664
indicate how you comply with the requirements for multithreaded access
665
(synchronization, mutexes, etc.) applicable to those APIs.
666
If your module defines any APIs, or has complex internal structures
667
that might be used from multiple threads, declare how you protect
668
data against concurrent access, race conditions, deadlocks, etc.,
669
and whether such rules are enforced by runtime warnings, errors, assertions, etc.
670
Examples: a class might be non-thread-safe (like Java Collections); might
671
be fully thread-safe (internal locking); might require access through a mutex
672
(and may or may not automatically acquire that mutex on behalf of a client method);
673
might be able to run only in the event queue; etc.
674
Also describe when any events are fired: synchronously, asynchronously, etc.
675
Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
679
<answer id="exec-threading">
681
All methods in the API has to be called in AWT-thread only.
682
Widget.Dependency and Scene.SceneListener is notified asynchronously at the moment when a scene is validation or painting.
683
Other listeners are notified synchronously.
690
<question id="format-clipboard" when="impl">
691
Which data flavors (if any) does your code read from or insert to
692
the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
695
Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
696
Check your code for overriding these methods.
700
<answer id="format-clipboard">
709
<question id="format-dnd" when="impl">
710
Which protocols (if any) does your code understand during Drag & Drop?
712
Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>.
713
Check your code for overriding these methods. Btw. if they are not overridden, they
714
by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
718
<answer id="format-dnd">
720
None. Particular DnD logic has to be implemented by a user of the library.
727
<question id="format-types" when="impl">
728
Which protocols and file formats (if any) does your module read or write on disk,
729
or transmit or receive over the network? Do you generate an ant build script?
730
Can it be edited and modified?
734
Files can be read and written by other programs, modules and users. If they influence
735
your behaviour, make sure you either document the format or claim that it is a private
736
api (using the <api> tag).
740
If you generate an ant build file, this is very likely going to be seen by end users and
741
they will be attempted to edit it. You should be ready for that and provide here a link
742
to documentation that you have for such purposes and also describe how you are going to
743
understand such files during next release, when you (very likely) slightly change the
749
<answer id="format-types">
758
<question id="lookup-lookup" when="init">
759
Does your module use <code>org.openide.util.Lookup</code>
760
or any similar technology to find any components to communicate with? Which ones?
763
NetBeans is build around a generic registry of services called
764
lookup. It is preferable to use it for registration and discovery
766
<a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
767
The Solution to Comunication Between Components
768
</a>. If you do not plan to use lookup and insist usage
769
of other solution, then please describe why it is not working for
772
When filling the final version of your arch document, please
773
describe the interfaces you are searching for, where
774
are defined, whether you are searching for just one or more of them,
775
if the order is important, etc. Also classify the stability of such
776
API contract. Use <api group=&lookup& /> tag, so
777
your information gets listed in the summary page of your javadoc.
781
<answer id="lookup-lookup">
783
No. Lookup is used for future extensibility of Widget class.
790
<question id="lookup-register" when="final">
791
Do you register anything into lookup for other code to find?
793
Do you register using layer file or using <code>META-INF/services</code>?
794
Who is supposed to find your component?
798
<answer id="lookup-register">
807
<question id="lookup-remove" when="final">
808
Do you remove entries of other modules from lookup?
810
Why? Of course, that is possible, but it can be dangerous. Is the module
811
your are masking resource from aware of what you are doing?
815
<answer id="lookup-remove">
824
<question id="perf-exit" when="final">
825
Does your module run any code on exit?
828
<answer id="perf-exit">
837
<question id="perf-huge_dialogs" when="final">
838
Does your module contain any dialogs or wizards with a large number of
839
GUI controls such as combo boxes, lists, trees, or text areas?
842
<answer id="perf-huge_dialogs">
851
<question id="perf-limit" when="init">
852
Are there any hard-coded or practical limits in the number or size of
853
elements your code can handle?
855
Most of algorithms have increasing memory and speed complexity
856
with respect to size of data they operate on. What is the critical
857
part of your project that can be seen as a bottleneck with
858
respect to speed or required memory? What are the practical
859
sizes of data you tested your project with? What is your estimate
860
of potential size of data that would cause visible performance
861
problems? Is there some kind of check to detect such situation
862
and prevent "hard" crashes - for example the CloneableEditorSupport
863
checks for size of a file to be opened in editor
864
and if it is larger than 1Mb it shows a dialog giving the
865
user the right to decide - e.g. to cancel or commit suicide.
869
<answer id="perf-limit">
871
OrthogonalSearchRouter works with a scene of size [-10000,-10000,20000,20000] pixels.
872
Other limits are defined by Integer.MAX_VALUE.
879
<question id="perf-mem" when="final">
880
How much memory does your component consume? Estimate
881
with a relation to the number of windows, etc.
884
<answer id="perf-mem">
886
It depends on a scene, number of widgets and actions. Usually 100-200 bytes per a widget.
887
A scene has a single primary and multiple secondary view. Each represented as a JComponent.
894
<question id="perf-menus" when="final">
895
Does your module use dynamically updated context menus, or
896
context-sensitive actions with complicated and slow enablement logic?
898
If you do a lot of tricks when adding actions to regular or context menus, you can significantly
899
slow down display of the menu, even when the user is not using your action. Pay attention to
900
actions you add to the main menu bar, and to context menus of foreign nodes or components. If
901
the action is conditionally enabled, or changes its display dynamically, you need to check the
902
impact on performance. In some cases it may be more appropriate to make a simple action that is
903
always enabled but does more detailed checks in a dialog if it is actually run.
907
<answer id="perf-menus">
916
<question id="perf-progress" when="final">
917
Does your module execute any long-running tasks?
919
<hint>Long running tasks should never block
920
AWT thread as it badly hurts the UI
921
<a href="http://performance.netbeans.org/responsiveness/issues.html">
923
Tasks like connecting over
924
network, computing huge amount of data, compilation
925
be done asynchronously (for example
926
using <code>RequestProcessor</code>), definitively it should
927
not block AWT thread.
931
<answer id="perf-progress">
940
<question id="perf-scale" when="init">
941
Which external criteria influence the performance of your
942
program (size of file in editor, number of files in menu,
943
in source directory, etc.) and how well your code scales?
945
Please include some estimates, there are other more detailed
946
questions to answer in later phases of implementation.
950
<answer id="perf-scale">
952
The only critical problem is the OrthogonalSearchRouter implementation
953
which significantly slow-down performance in a scene with +-50 objects and +-50 connections.
960
<question id="perf-spi" when="init">
961
How the performance of the plugged in code will be enforced?
963
If you allow foreign code to be plugged into your own module, how
964
do you enforce that it will behave correctly and quickly and will not
965
negatively influence the performance of your own module?
969
<answer id="perf-spi">
971
It is not enforced. The performance could be broken by plugging any custom implementation of an interface.
978
<question id="perf-startup" when="final">
979
Does your module run any code on startup?
982
<answer id="perf-startup">
991
<question id="perf-wakeup" when="final">
992
Does any piece of your code wake up periodically and do something
993
even when the system is otherwise idle (no user interaction)?
996
<answer id="perf-wakeup">
998
No. Only when an animation is started. It should last in 500ms unless it is invoked again.
1005
<question id="resources-file" when="final">
1006
Does your module use <code>java.io.File</code> directly?
1009
NetBeans provide a logical wrapper over plain files called
1010
<code>org.openide.filesystems.FileObject</code> that
1011
provides uniform access to such resources and is the preferred
1012
way that should be used. But of course there can be situations when
1013
this is not suitable.
1017
<answer id="resources-file">
1026
<question id="resources-layer" when="final">
1027
Does your module provide own layer? Does it create any files or
1028
folders in it? What it is trying to communicate by that and with which
1032
NetBeans allows automatic and declarative installation of resources
1033
by module layers. Module register files into appropriate places
1034
and other components use that information to perform their task
1035
(build menu, toolbar, window layout, list of templates, set of
1040
<answer id="resources-layer">
1049
<question id="resources-mask" when="final">
1050
Does your module mask/hide/override any resources provided by other modules in
1054
If you mask a file provided by another module, you probably depend
1055
on that and do not want the other module to (for example) change
1056
the file's name. That module shall thus make that file available as an API
1057
of some stability category.
1061
<answer id="resources-mask">
1070
<question id="resources-preferences" when="final">
1071
Does your module uses preferences via Preferences API? Does your module use NbPreferences or
1072
or regular JDK Preferences ? Does it read, write or both ?
1073
Does it share preferences with other modules ? If so, then why ?
1076
<api type="export" group="preferences"
1077
name="preference node name" category="private">
1078
description of individual keys, where it is used, what it
1079
influences, whether the module reads/write it, etc.
1081
Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
1082
Note that if you use NbPreferences this name will then be the same as the code name base of the module.
1086
<answer id="resources-preferences">
1095
<question id="resources-read" when="final">
1096
Does your module read any resources from layers? For what purpose?
1099
As this is some kind of intermodule dependency, it is a kind of API.
1100
Please describe it and classify according to
1101
<a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
1102
common stability categories</a>.
1106
<answer id="resources-read">
1115
<question id="security-grant" when="final">
1116
Does your code grant additional rights to some other code?
1117
<hint>Avoid using a class loader that adds extra
1118
permissions to loaded code unless really necessary.
1119
Also note that your API implementation
1120
can also expose unneeded permissions to enemy code by
1121
calling AccessController.doPrivileged().</hint>
1124
<answer id="security-grant">
1133
<question id="security-policy" when="final">
1134
Does your functionality require modifications to the standard policy file?
1135
<hint>Your code might pass control to third-party code not
1136
coming from trusted domains. This could be code downloaded over the
1137
network or code coming from libraries that are not bundled
1138
with NetBeans. Which permissions need to be granted to which domains?</hint>
1141
<answer id="security-policy">