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.7"
49
author="pbuzek@netbeans.org"
57
<question id="arch-what">
58
What is this project good for?
60
Please provide here few lines describing the the project,
61
what problem it should solve, provide links to documentation,
66
<answer id="arch-what">
67
The <em>HTML module</em> supports creation and editing of HTML files and enables
68
you to view them in a web browser.
75
<question id="compat-i18n">
76
Is your module correctly internationalized?
78
Correct internationalization means that it obeys instuctions
79
at <a href="http://www.netbeans.org/devhome/docs/i18n/index.html">
80
NetBeans I18N pages</a>.
84
<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">
105
<question id="compat-version">
106
Can your module coexist with earlier and future
107
versions? Can you correctly read all old settings? Will future
108
versions be able to read your current settings? Can you read
109
or politely ignore settings stored by a future version?
112
Very helpful for reading settings is to store version number
113
there, so future versions can decide whether how to read/convert
114
the settings and older versions can ignore the new ones.
118
<answer id="compat-version">
126
<question id="dep-jre">
127
Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
129
It is expected that if your module runs on 1.x that it will run
130
on 1.x+1 if no, state that please. Also describe here cases where
131
you run different code on different versions of JRE and why.
135
<answer id="dep-jre">
143
<question id="dep-jrejdk">
144
Do you require the JDK or is the JRE enough?
147
<answer id="dep-jrejdk">
155
<question id="dep-nb">
156
What other NetBeans projects does this one depend on?
158
If you want, describe such projects as imported API using
159
the <code><api name="identification" type="import or export" category="stable" url="where is the description" /></code>
164
<api name="OpenAPIs" type="import" category="official" url="http://openide.netbeans.org/" group="java"/>
171
<question id="dep-non-nb">
172
What other projects outside NetBeans does this one depend on?
175
Some non-NetBeans projects are packaged as NetBeans modules
176
(see <a href="http://libs.netbeans.org">libraries</a>) and
177
it is prefered to use this approach when more modules may
178
depend on such third-party library.
182
<answer id="dep-non-nb">
190
<question id="dep-platform">
191
On which platforms does your module run? Does it run in the same
194
If your module is using JNI or deals with special differences of
195
OSes like filesystems, etc. please describe here what they are.
199
<answer id="dep-platform">
200
There are no platform restrictions or differences.
207
<question id="deploy-jar">
208
Do you deploy just module JAR file(s) or other files as well?
210
If your module consist just from one module JAR file, just confirm that.
211
If it uses more than one JAR, describe where there are located, how
212
they refer to each other.
213
If it consist of module JAR(s) and other files, please describe
214
what is their purpose, why other files are necessary. Please
215
make sure that installation/deinstallation leaves the system
216
in state as it was before installation.
220
<answer id="deploy-jar">
228
<question id="deploy-nbm">
229
Can you deploy an NBM via the Update Center?
235
<answer id="deploy-nbm">
243
<question id="deploy-packages">
244
Are packages of your module made inaccessible by not declaring them
248
NetBeans module system allows restriction of access rights to
249
public classes of your module from other modules. This prevents
250
unwanted dependencies of others on your code and should be used
251
whenever possible (<a href="http://www.netbeans.org/download/apis/org/openide/doc-files/upgrade.html#3.4-public-packages">
257
<answer id="deploy-packages">
265
<question id="deploy-shared">
266
Do you need to be installed in the shared location only, or in the user directory only,
267
or can your module be installed anywhere?
269
Installation location shall not matter, if it does explain why.
270
Consider also whether <code>InstalledFileLocator</code> can help.
274
<answer id="deploy-shared">
275
Module can be installed anywhere.
282
<question id="exec-classloader">
283
Does your code create its own class loader(s)?
285
A bit unusual. Please explain why and what for.
289
<answer id="exec-classloader">
297
<question id="exec-component">
298
Is execution of your code influenced by any (string) property
299
of any of your components?
302
Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
303
or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
304
a behaviour of some code. This of course forms an interface that should
305
be documented. Also if one depends on some interface that an object
306
implements (<code>component instanceof Runnable</code>) that forms an
311
<answer id="exec-component">
319
<question id="exec-privateaccess">
320
Are you aware of any other parts of the system calling some of
321
your methods by reflection?
323
If so, describe the "contract" as an API. Likely private or friend one, but
324
still API and consider rewrite of it.
328
<answer id="exec-privateaccess">
336
<question id="exec-property">
337
Is execution of your code influenced by any environment or
338
Java system (<code>System.getProperty</code>) property?
341
If there is a property that can change the behaviour of your
342
code, somebody will likely use it. You should describe what it does
343
and the stability category of this API. You may use
345
<property name="id" category="private" >
346
description of the property, where it is used, what it influence, etc.
352
<answer id="exec-property">
360
<question id="exec-reflection">
361
Does your code use Java Reflection to execute other code?
363
This usually indicates a missing or unsufficient API in the other
364
part of the system. If the other side is not aware of your dependency
365
this contract can be easily broken.
369
<answer id="exec-reflection">
377
<question id="format-clipboard">
378
Which data flavors (if any) does your code read from or insert to
382
<answer id="format-clipboard">
390
<question id="format-dnd">
391
Which protocols (if any) does your code understand during Drag & Drop?
394
<answer id="format-dnd">
402
<question id="format-types">
403
Which file formats (if any) does your code read or write on disk?
406
<answer id="format-types">
407
HTML and XHTML files.
414
<question id="lookup-lookup">
415
Does your module use <code>org.openide.util.Lookup</code>
416
to find any components to communicate with? Which ones?
419
Please describe the interfaces you are searching for, where
420
are defined, whether you are searching for just one or more of them,
421
if the order is important, etc. Also clasify the stability of such
426
<answer id="lookup-lookup">
434
<question id="lookup-register">
435
Do you register anything into lookup for other code to find?
437
Do you register using layer file or using <code>META-INF/services</code>?
438
Who is supposed to find your component?
442
<answer id="lookup-register">
443
A MIME resolver is registered for HTML and XHTML files.
450
<question id="lookup-remove">
451
Do you remove entries of other modules from lookup?
453
Why? Of course, that is possible, but it can be dangerous. Is the module
454
your are masking resource from aware of what you are doing?
458
<answer id="lookup-remove">
466
<question id="perf-exit">
467
Does your module run any code on exit?
470
<answer id="perf-exit">
478
<question id="perf-huge_dialogs">
479
Does your module contain any dialogs or wizards with a large number of
480
GUI controls such as combo boxes, lists, trees, or text areas?
483
<answer id="perf-huge_dialogs">
491
<question id="perf-limit">
492
Are there any hardcoded or practical limits in the number or size of
493
elements your code can handle?
496
<answer id="perf-limit">
504
<question id="perf-mem">
505
How much memory does your component consume? Estimate
506
with a relation to the number of windows, etc.
509
<answer id="perf-mem">
517
<question id="perf-menus">
518
Does your module use dynamically updated context menus, or
519
context-sensitive actions with complicated enablement logic?
522
<answer id="perf-menus">
530
<question id="perf-progress">
531
Does your module execute any long-running tasks?
532
<hint>Typically they are tasks like connecting over
533
network, computing huge amount of data, compilation.
534
Such communication should be done asynchronously (for example
535
using <code>RequestProcessor</code>), definitively it should
536
not block AWT thread.
540
<answer id="perf-progress">
548
<question id="perf-scale">
549
Which external criteria influence the performance of your
550
program (size of file in editor, number of files in menu,
551
in source directory, etc.) and how well your code scales?
552
Please include some estimates.
555
<answer id="perf-scale">
556
There are no unusual criteria and scalabity is not requested for this module.
563
<question id="perf-startup">
564
Does your module run any code on startup?
567
<answer id="perf-startup">
575
<question id="perf-wakeup">
576
Does any piece of your code wake up periodically and do something
577
even when the system is otherwise idle (no user interaction)?
580
<answer id="perf-wakeup">
588
<question id="resources-file">
589
Does your module use <code>java.io.File</code> directly?
592
NetBeans provide a logical wrapper over plain files called
593
<code>org.openide.filesystems.FileObject</code> that
594
provides uniform access to such resources and is the prefered
595
way that should be used. But of course there can be situations when
596
this is not suitable.
600
<answer id="resources-file">
608
<question id="resources-layer">
609
Does your module provide own layer? Does it create any files or
610
folders in it? What it is trying to communicate by that and with which
614
NetBeans allows automatic and declarative installation of resources
615
by module layers. Module register files into appropriate places
616
and other components use that information to perform their task
617
(build menu, toolbar, window layout, list of templates, set of
622
<answer id="resources-layer">
623
Yes. It contains one HTML template and one XHTML template.
630
<question id="resources-mask">
631
Does your module mask/hide/override any resources provided by other modules in
635
If you mask a file provided by another module, you probably depend
636
on that and do not want the other module to (for example) change
637
the file's name. That module shall thus make that file available as an API
638
of some stability category.
642
<answer id="resources-mask">
650
<question id="resources-read">
651
Does your module read any resources from layers? For what purpose?
654
As this is some kind of intermodule dependency, it is a kind of API.
655
Please describe it and clasify according to
656
<a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
657
common stability categories</a>.
661
<answer id="resources-read">