Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
3 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
4 |
|
5 |
Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved. |
6 |
|
7 |
Oracle and Java are registered trademarks of Oracle and/or its affiliates. |
8 |
Other names may be trademarks of their respective owners. |
9 |
|
10 |
|
11 |
The contents of this file are subject to the terms of either the GNU |
12 |
General Public License Version 2 only ("GPL") or the Common |
13 |
Development and Distribution License("CDDL") (collectively, the |
14 |
"License"). You may not use this file except in compliance with the |
15 |
License. You can obtain a copy of the License at |
16 |
http://www.netbeans.org/cddl-gplv2.html |
17 |
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the |
18 |
specific language governing permissions and limitations under the |
19 |
License. When distributing the software, include this License Header |
20 |
Notice in each file and include the License file at |
21 |
nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this |
22 |
particular file as subject to the "Classpath" exception as provided |
23 |
by Oracle in the GPL Version 2 section of the License file that |
24 |
accompanied this code. If applicable, add the following below the |
25 |
License Header, with the fields enclosed by brackets [] replaced by |
26 |
your own identifying information: |
27 |
"Portions Copyrighted [year] [name of copyright owner]" |
28 |
|
29 |
Contributor(s): |
30 |
|
31 |
The Original Software is NetBeans. The Initial Developer of the Original |
32 |
Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun |
33 |
Microsystems, Inc. All Rights Reserved. |
34 |
|
35 |
If you wish your version of this file to be governed by only the CDDL |
36 |
or only the GPL Version 2, indicate your decision by adding |
37 |
"[Contributor] elects to include this software in this distribution |
38 |
under the [CDDL or GPL Version 2] license." If you do not indicate a |
39 |
single choice of license, a recipient has the option to distribute |
40 |
your version of this file under either the CDDL, the GPL Version 2 or |
41 |
to extend the choice of license to its licensees as provided above. |
42 |
However, if you add GPL Version 2 code and therefore, elected the GPL |
43 |
Version 2 license, then the option applies only if the new code is |
44 |
made subject to such option by the copyright holder. |
45 |
--> |
46 |
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [ |
47 |
<!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml"> |
48 |
]> |
49 |
|
50 |
<api-answers |
51 |
question-version="1.0" |
52 |
author="tstupka@netbeans.org" |
53 |
> |
54 |
|
55 |
&api-questions; |
56 |
|
57 |
|
58 |
<!-- |
59 |
<question id="arch-overall" when="init"> |
60 |
Describe the overall architecture. |
61 |
<hint> |
62 |
What will be API for |
63 |
<a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> |
64 |
clients and what support API</a>? |
65 |
What parts will be pluggable? |
66 |
How will plug-ins be registered? Please use <code><api type="export"/></code> |
67 |
to describe your general APIs. |
68 |
If possible please provide |
69 |
simple diagrams. |
70 |
</hint> |
71 |
</question> |
72 |
--> |
73 |
<answer id="arch-overall"> |
74 |
<ul> |
75 |
<li> |
76 |
<api group="java" name="MavenArchetypeAPI" type="export" category="devel"> |
77 |
<p> |
78 |
The Maven Archetype API provides some miscellaneous APIs related to |
79 |
maven-archetype-plugin. |
80 |
</p> |
81 |
</api> |
82 |
</li> |
83 |
</ul> |
84 |
</answer> |
85 |
|
86 |
<!-- |
87 |
<question id="arch-usecases" when="init"> |
88 |
Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase"> |
89 |
use cases</a> of the new API. Who will use it at |
90 |
what circumstances and what will be the typical code to write |
91 |
to use the module. |
92 |
</question> |
93 |
--> |
94 |
<answer id="arch-usecases"> |
95 |
<p> |
96 |
creating of New Project wizards based on the maven-archetype-plugin. |
97 |
</p> |
98 |
</answer> |
99 |
|
100 |
|
101 |
|
102 |
<!-- |
103 |
<question id="resources-read" when="final"> |
104 |
Does your module read any resources from layers? For what purpose? |
105 |
|
106 |
<hint> |
107 |
As this is some kind of intermodule dependency, it is a kind of API. |
108 |
Please describe it and classify according to |
109 |
<a href="http://openide.netbeans.org/tutorial/api-design.html#categories"> |
110 |
common stability categories</a>. |
111 |
</hint> |
112 |
</question> |
113 |
--> |
114 |
<answer id="resources-read"> |
115 |
|
116 |
<api group="layer" name="MavenArchetypes" type="export" category="official"> |
117 |
<p> |
118 |
"Projects/org-netbeans-modules-maven/Archetypes" folder contains fileobjects |
119 |
that represent archetypes. The archetypes are defined by the following file attributes: |
120 |
</p> |
121 |
<table> |
122 |
<tbody> |
123 |
<tr><td>groupId</td><td>mandatory</td><td></td></tr> |
124 |
<tr><td>artifactId</td><td>mandatory</td><td></td></tr> |
125 |
<tr><td>version</td><td>mandatory</td><td></td></tr> |
126 |
<tr><td>repository</td><td>optional</td><td>url of the archetype's repository</td></tr> |
127 |
<tr><td>nameBundleKey</td><td>optional</td><td>key in bundle file that holds localized name</td></tr> |
128 |
<tr><td>descriptionBundleKey</td><td>optional</td><td>key in bundle file that holds localized description</td></tr> |
129 |
</tbody> |
130 |
</table> |
131 |
</api> |
132 |
|
133 |
</answer> |
134 |
|
135 |
<!-- |
136 |
<question id="exec-property" when="impl"> |
137 |
Is execution of your code influenced by any environment or |
138 |
Java system (<code>System.getProperty</code>) property? |
139 |
On a similar note, is there something interesting that you |
140 |
pass to <code>java.util.logging.Logger</code>? Or do you observe |
141 |
what others log? |
142 |
<hint> |
143 |
If there is a property that can change the behavior of your |
144 |
code, somebody will likely use it. You should describe what it does |
145 |
and the <a href="http://wiki.netbeans.org/API_Stability">stability category</a> |
146 |
of this API. You may use |
147 |
<pre> |
148 |
<api type="export" group="property" name="id" category="private" url="http://..."> |
149 |
description of the property, where it is used, what it influence, etc. |
150 |
</api> |
151 |
</pre> |
152 |
</hint> |
153 |
</question> |
154 |
--> |
155 |
<answer id="exec-property"> |
156 |
<p> |
157 |
No environment or Java System properties. |
158 |
</p> |
159 |
</answer> |
160 |
|
161 |
|
162 |
|
163 |
|
164 |
<!-- |
165 |
<question id="arch-quality" when="init"> |
166 |
How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html" shape="rect">quality</a> |
167 |
of your code be tested and |
168 |
how are future regressions going to be prevented? |
169 |
<hint> |
170 |
What kind of testing do |
171 |
you want to use? How much functionality, in which areas, |
172 |
should be covered by the tests? How you find out that your |
173 |
project was successful? |
174 |
</hint> |
175 |
</question> |
176 |
--> |
177 |
<answer id="arch-quality"> |
178 |
<p> |
179 |
XXX no answer for arch-quality |
180 |
</p> |
181 |
</answer> |
182 |
|
183 |
|
184 |
|
185 |
<!-- |
186 |
<question id="arch-time" when="init"> |
187 |
What are the time estimates of the work? |
188 |
<hint> |
189 |
Please express your estimates of how long the design, implementation, |
190 |
stabilization are likely to last. How many people will be needed to |
191 |
implement this and what is the expected milestone by which the work should be |
192 |
ready? |
193 |
</hint> |
194 |
</question> |
195 |
--> |
196 |
<answer id="arch-time"> |
197 |
<p> |
198 |
XXX no answer for arch-time |
199 |
</p> |
200 |
</answer> |
201 |
|
202 |
|
203 |
|
204 |
<!-- |
205 |
<question id="arch-what" when="init"> |
206 |
What is this project good for? |
207 |
<hint> |
208 |
Please provide here a few lines describing the project, |
209 |
what problem it should solve, provide links to documentation, |
210 |
specifications, etc. |
211 |
</hint> |
212 |
</question> |
213 |
--> |
214 |
<answer id="arch-what"> |
215 |
<p> |
216 |
XXX no answer for arch-what |
217 |
</p> |
218 |
</answer> |
219 |
|
220 |
|
221 |
|
222 |
<!-- |
223 |
<question id="arch-where" when="impl"> |
224 |
Where one can find sources for your module? |
225 |
<hint> |
226 |
Please provide link to the Hg web client at |
227 |
http://hg.netbeans.org/ |
228 |
or just use tag defaultanswer generate='here' |
229 |
</hint> |
230 |
</question> |
231 |
--> |
232 |
<answer id="arch-where"> |
233 |
<defaultanswer generate='here' /> |
234 |
</answer> |
235 |
|
236 |
|
237 |
|
238 |
<!-- |
239 |
<question id="compat-deprecation" when="init"> |
240 |
How the introduction of your project influences functionality |
241 |
provided by previous version of the product? |
242 |
<hint> |
243 |
If you are planning to deprecate/remove/change any existing APIs, |
244 |
list them here accompanied with the reason explaining why you |
245 |
are doing so. |
246 |
</hint> |
247 |
</question> |
248 |
--> |
249 |
<answer id="compat-deprecation"> |
250 |
<p> |
251 |
XXX no answer for compat-deprecation |
252 |
</p> |
253 |
</answer> |
254 |
|
255 |
|
256 |
|
257 |
<!-- |
258 |
<question id="compat-i18n" when="impl"> |
259 |
Is your module correctly internationalized? |
260 |
<hint> |
261 |
Correct internationalization means that it obeys instructions |
262 |
at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html" shape="rect"> |
263 |
NetBeans I18N pages</a>. |
264 |
</hint> |
265 |
</question> |
266 |
--> |
267 |
<answer id="compat-i18n"> |
268 |
<p> |
269 |
XXX no answer for compat-i18n |
270 |
</p> |
271 |
</answer> |
272 |
|
273 |
|
274 |
|
275 |
<!-- |
276 |
<question id="compat-standards" when="init"> |
277 |
Does the module implement or define any standards? Is the |
278 |
implementation exact or does it deviate somehow? |
279 |
</question> |
280 |
--> |
281 |
<answer id="compat-standards"> |
282 |
<p> |
283 |
XXX no answer for compat-standards |
284 |
</p> |
285 |
</answer> |
286 |
|
287 |
|
288 |
|
289 |
<!-- |
290 |
<question id="compat-version" when="impl"> |
291 |
Can your module coexist with earlier and future |
292 |
versions of itself? Can you correctly read all old settings? Will future |
293 |
versions be able to read your current settings? Can you read |
294 |
or politely ignore settings stored by a future version? |
295 |
|
296 |
<hint> |
297 |
Very helpful for reading settings is to store version number |
298 |
there, so future versions can decide whether how to read/convert |
299 |
the settings and older versions can ignore the new ones. |
300 |
</hint> |
301 |
</question> |
302 |
--> |
303 |
<answer id="compat-version"> |
304 |
<p> |
305 |
XXX no answer for compat-version |
306 |
</p> |
307 |
</answer> |
308 |
|
309 |
|
310 |
|
311 |
<!-- |
312 |
<question id="dep-jre" when="final"> |
313 |
Which version of JRE do you need (1.2, 1.3, 1.4, etc.)? |
314 |
<hint> |
315 |
It is expected that if your module runs on 1.x that it will run |
316 |
on 1.x+1 if no, state that please. Also describe here cases where |
317 |
you run different code on different versions of JRE and why. |
318 |
</hint> |
319 |
</question> |
320 |
--> |
321 |
<answer id="dep-jre"> |
322 |
<p> |
323 |
XXX no answer for dep-jre |
324 |
</p> |
325 |
</answer> |
326 |
|
327 |
|
328 |
|
329 |
<!-- |
330 |
<question id="dep-jrejdk" when="final"> |
331 |
Do you require the JDK or is the JRE enough? |
332 |
</question> |
333 |
--> |
334 |
<answer id="dep-jrejdk"> |
335 |
<p> |
336 |
XXX no answer for dep-jrejdk |
337 |
</p> |
338 |
</answer> |
339 |
|
340 |
|
341 |
|
342 |
<!-- |
343 |
<question id="dep-nb" when="init"> |
344 |
What other NetBeans projects and modules does this one depend on? |
345 |
<hint> |
346 |
Depending on other NetBeans projects influnces the ability of |
347 |
users of your work to customize their own branded version of |
348 |
NetBeans by enabling and disabling some modules. Too |
349 |
much dependencies restrict this kind of customization. If that |
350 |
is your case, then you may want to split your functionality into |
351 |
pieces of autoload, eager and regular modules which can be |
352 |
enabled independently. Usually the answer to this question |
353 |
is generated from your <code>project.xml</code> file, but |
354 |
if it is not guessed correctly, you can suppress it by |
355 |
specifying <defaultanswer generate="none"/> and |
356 |
write here your own. Please describe such projects as imported APIs using |
357 |
the <code><api name="identification" type="import or export" category="stable" url="where is the description" /></code>. |
358 |
By doing this information gets listed in the summary page of your |
359 |
javadoc. |
360 |
</hint> |
361 |
</question> |
362 |
--> |
363 |
<answer id="dep-nb"> |
364 |
<defaultanswer generate='here' /> |
365 |
</answer> |
366 |
|
367 |
|
368 |
|
369 |
<!-- |
370 |
<question id="dep-non-nb" when="init"> |
371 |
What other projects outside NetBeans does this one depend on? |
372 |
|
373 |
<hint> |
374 |
Depending on 3rd party libraries is always problematic, |
375 |
especially if they are not open source, as that complicates |
376 |
the licensing scheme of NetBeans. Please enumerate your |
377 |
external dependencies here, so it is correctly understood since |
378 |
the begining what are the legal implications of your project. |
379 |
Also please note that |
380 |
some non-NetBeans projects are packaged as NetBeans modules |
381 |
(see <a href="http://libs.netbeans.org/" shape="rect">libraries</a>) and |
382 |
it is preferred to use this approach when more modules may |
383 |
depend and share such third-party libraries. |
384 |
</hint> |
385 |
</question> |
386 |
--> |
387 |
<answer id="dep-non-nb"> |
388 |
<p> |
389 |
XXX no answer for dep-non-nb |
390 |
</p> |
391 |
</answer> |
392 |
|
393 |
|
394 |
|
395 |
<!-- |
396 |
<question id="dep-platform" when="init"> |
397 |
On which platforms does your module run? Does it run in the same |
398 |
way on each? |
399 |
<hint> |
400 |
If you plan any dependency on OS or any usage of native code, |
401 |
please describe why you are doing so and describe how you envision |
402 |
to enforce the portability of your code. |
403 |
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" shape="rect">OS conditionally |
404 |
enabled modules</a> which together with autoload/eager modules |
405 |
can allow you to enable to provide the best OS aware support |
406 |
on certain OSes while providing compatibility bridge on the not |
407 |
supported ones. |
408 |
Also please list the supported |
409 |
OSes/HW platforms and mentioned the lovest version of JDK required |
410 |
for your project to run on. Also state whether JRE is enough or |
411 |
you really need JDK. |
412 |
</hint> |
413 |
</question> |
414 |
--> |
415 |
<answer id="dep-platform"> |
416 |
<p> |
417 |
XXX no answer for dep-platform |
418 |
</p> |
419 |
</answer> |
420 |
|
421 |
|
422 |
|
423 |
<!-- |
424 |
<question id="deploy-dependencies" when="final"> |
425 |
What do other modules need to do to declare a dependency on this one, |
426 |
in addition to or instead of the normal module dependency declaration |
427 |
(e.g. tokens to require)? |
428 |
<hint> |
429 |
Provide a sample of the actual lines you would add to a module manifest |
430 |
to declare a dependency, for example OpenIDE-Module-Requires: some.token. |
431 |
If other modules should not depend on this module, or should just use a |
432 |
simple regular module dependency, you can just answer "nothing". If you |
433 |
intentionally expose a semistable API to clients using implementation |
434 |
dependencies, you should mention that here (but there is no need to give |
435 |
an example of usage). |
436 |
</hint> |
437 |
</question> |
438 |
--> |
439 |
<answer id="deploy-dependencies"> |
440 |
<p> |
441 |
No special requirements here. |
442 |
</p> |
443 |
</answer> |
444 |
|
445 |
|
446 |
|
447 |
<!-- |
448 |
<question id="deploy-jar" when="impl"> |
449 |
Do you deploy just module JAR file(s) or other files as well? |
450 |
<hint> |
451 |
Usually a module consist of one JAR file (perhaps with Class-Path |
452 |
extensions) and also a configuration file that enables it. If you |
453 |
have any other files, use |
454 |
<api group="java.io.File" name="yourname" type="export" category="friend">...</api> |
455 |
to define the location, name and stability of your files (of course |
456 |
changing "yourname" and "friend" to suit your needs). |
457 |
|
458 |
If it uses more than one JAR, describe where they are located, how |
459 |
they refer to each other. |
460 |
If it consist of module JAR(s) and other files, please describe |
461 |
what is their purpose, why other files are necessary. Please |
462 |
make sure that installation/uninstallation leaves the system |
463 |
in state as it was before installation. |
464 |
</hint> |
465 |
</question> |
466 |
--> |
467 |
<answer id="deploy-jar"> |
468 |
<p> |
469 |
XXX no answer for deploy-jar |
470 |
</p> |
471 |
</answer> |
472 |
|
473 |
|
474 |
|
475 |
<!-- |
476 |
<question id="deploy-nbm" when="impl"> |
477 |
Can you deploy an NBM via the Update Center? |
478 |
<hint> |
479 |
If not why? |
480 |
</hint> |
481 |
</question> |
482 |
--> |
483 |
<answer id="deploy-nbm"> |
484 |
<p> |
485 |
XXX no answer for deploy-nbm |
486 |
</p> |
487 |
</answer> |
488 |
|
489 |
|
490 |
|
491 |
<!-- |
492 |
<question id="deploy-packages" when="init"> |
493 |
Are packages of your module made inaccessible by not declaring them |
494 |
public? |
495 |
|
496 |
<hint> |
497 |
By default NetBeans build harness treats all packages are private. |
498 |
If you export some of them - either as public or friend packages, |
499 |
you should have a reason. If the reason is described elsewhere |
500 |
in this document, you can ignore this question. |
501 |
</hint> |
502 |
</question> |
503 |
--> |
504 |
<answer id="deploy-packages"> |
505 |
<p> |
506 |
XXX no answer for deploy-packages |
507 |
</p> |
508 |
</answer> |
509 |
|
510 |
|
511 |
|
512 |
<!-- |
513 |
<question id="deploy-shared" when="final"> |
514 |
Do you need to be installed in the shared location only, or in the user directory only, |
515 |
or can your module be installed anywhere? |
516 |
<hint> |
517 |
Installation location shall not matter, if it does explain why. |
518 |
Consider also whether <code>InstalledFileLocator</code> can help. |
519 |
</hint> |
520 |
</question> |
521 |
--> |
522 |
<answer id="deploy-shared"> |
523 |
<p> |
524 |
XXX no answer for deploy-shared |
525 |
</p> |
526 |
</answer> |
527 |
|
528 |
|
529 |
|
530 |
<!-- |
531 |
<question id="exec-ant-tasks" when="impl"> |
532 |
Do you define or register any ant tasks that other can use? |
533 |
|
534 |
<hint> |
535 |
If you provide an ant task that users can use, you need to be very |
536 |
careful about its syntax and behaviour, as it most likely forms an |
537 |
API for end users and as there is a lot of end users, their reaction |
538 |
when such API gets broken can be pretty strong. |
539 |
</hint> |
540 |
</question> |
541 |
--> |
542 |
<answer id="exec-ant-tasks"> |
543 |
<p> |
544 |
XXX no answer for exec-ant-tasks |
545 |
</p> |
546 |
</answer> |
547 |
|
548 |
|
549 |
|
550 |
<!-- |
551 |
<question id="exec-classloader" when="impl"> |
552 |
Does your code create its own class loader(s)? |
553 |
<hint> |
554 |
A bit unusual. Please explain why and what for. |
555 |
</hint> |
556 |
</question> |
557 |
--> |
558 |
<answer id="exec-classloader"> |
559 |
<p> |
560 |
XXX no answer for exec-classloader |
561 |
</p> |
562 |
</answer> |
563 |
|
564 |
|
565 |
|
566 |
<!-- |
567 |
<question id="exec-component" when="impl"> |
568 |
Is execution of your code influenced by any (string) property |
569 |
of any of your components? |
570 |
|
571 |
<hint> |
572 |
Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code> |
573 |
or <code>PropertyDescriptor.getValue</code>, etc. are used to influence |
574 |
a behavior of some code. This of course forms an interface that should |
575 |
be documented. Also if one depends on some interface that an object |
576 |
implements (<code>component instanceof Runnable</code>) that forms an |
577 |
API as well. |
578 |
</hint> |
579 |
</question> |
580 |
--> |
581 |
<answer id="exec-component"> |
582 |
<p> |
583 |
XXX no answer for exec-component |
584 |
</p> |
585 |
</answer> |
586 |
|
587 |
|
588 |
|
589 |
<!-- |
590 |
<question id="exec-introspection" when="impl"> |
591 |
Does your module use any kind of runtime type information (<code>instanceof</code>, |
592 |
work with <code>java.lang.Class</code>, etc.)? |
593 |
<hint> |
594 |
Check for cases when you have an object of type A and you also |
595 |
expect it to (possibly) be of type B and do some special action. That |
596 |
should be documented. The same applies on operations in meta-level |
597 |
(Class.isInstance(...), Class.isAssignableFrom(...), etc.). |
598 |
</hint> |
599 |
</question> |
600 |
--> |
601 |
<answer id="exec-introspection"> |
602 |
<p> |
603 |
XXX no answer for exec-introspection |
604 |
</p> |
605 |
</answer> |
606 |
|
607 |
|
608 |
|
609 |
<!-- |
610 |
<question id="exec-privateaccess" when="final"> |
611 |
Are you aware of any other parts of the system calling some of |
612 |
your methods by reflection? |
613 |
<hint> |
614 |
If so, describe the "contract" as an API. Likely private or friend one, but |
615 |
still API and consider rewrite of it. |
616 |
</hint> |
617 |
</question> |
618 |
--> |
619 |
<answer id="exec-privateaccess"> |
620 |
<p> |
621 |
XXX no answer for exec-privateaccess |
622 |
</p> |
623 |
</answer> |
624 |
|
625 |
|
626 |
|
627 |
<!-- |
628 |
<question id="exec-process" when="impl"> |
629 |
Do you execute an external process from your module? How do you ensure |
630 |
that the result is the same on different platforms? Do you parse output? |
631 |
Do you depend on result code? |
632 |
<hint> |
633 |
If you feed an input, parse the output please declare that as an API. |
634 |
</hint> |
635 |
</question> |
636 |
--> |
637 |
<answer id="exec-process"> |
638 |
<p> |
639 |
XXX no answer for exec-process |
640 |
</p> |
641 |
</answer> |
642 |
|
643 |
|
644 |
|
645 |
<!-- |
646 |
<question id="exec-reflection" when="impl"> |
647 |
Does your code use Java Reflection to execute other code? |
648 |
<hint> |
649 |
This usually indicates a missing or insufficient API in the other |
650 |
part of the system. If the other side is not aware of your dependency |
651 |
this contract can be easily broken. |
652 |
</hint> |
653 |
</question> |
654 |
--> |
655 |
<answer id="exec-reflection"> |
656 |
<p> |
657 |
XXX no answer for exec-reflection |
658 |
</p> |
659 |
</answer> |
660 |
|
661 |
|
662 |
|
663 |
<!-- |
664 |
<question id="exec-threading" when="init"> |
665 |
What threading models, if any, does your module adhere to? How the |
666 |
project behaves with respect to threading? |
667 |
<hint> |
668 |
Is your API threadsafe? Can it be accessed from any threads or |
669 |
just from some dedicated ones? Any special relation to AWT and |
670 |
its Event Dispatch thread? Also |
671 |
if your module calls foreign APIs which have a specific threading model, |
672 |
indicate how you comply with the requirements for multithreaded access |
673 |
(synchronization, mutexes, etc.) applicable to those APIs. |
674 |
If your module defines any APIs, or has complex internal structures |
675 |
that might be used from multiple threads, declare how you protect |
676 |
data against concurrent access, race conditions, deadlocks, etc., |
677 |
and whether such rules are enforced by runtime warnings, errors, assertions, etc. |
678 |
Examples: a class might be non-thread-safe (like Java Collections); might |
679 |
be fully thread-safe (internal locking); might require access through a mutex |
680 |
(and may or may not automatically acquire that mutex on behalf of a client method); |
681 |
might be able to run only in the event queue; etc. |
682 |
Also describe when any events are fired: synchronously, asynchronously, etc. |
683 |
Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations" shape="rect">Threading Recommendations</a> (in progress) |
684 |
</hint> |
685 |
</question> |
686 |
--> |
687 |
<answer id="exec-threading"> |
688 |
<p> |
689 |
XXX no answer for exec-threading |
690 |
</p> |
691 |
</answer> |
692 |
|
693 |
|
694 |
|
695 |
<!-- |
696 |
<question id="format-clipboard" when="impl"> |
697 |
Which data flavors (if any) does your code read from or insert to |
698 |
the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>? |
699 |
|
700 |
<hint> |
701 |
Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>. |
702 |
Check your code for overriding these methods. |
703 |
</hint> |
704 |
</question> |
705 |
--> |
706 |
<answer id="format-clipboard"> |
707 |
<p> |
708 |
XXX no answer for format-clipboard |
709 |
</p> |
710 |
</answer> |
711 |
|
712 |
|
713 |
|
714 |
<!-- |
715 |
<question id="format-dnd" when="impl"> |
716 |
Which protocols (if any) does your code understand during Drag & Drop? |
717 |
<hint> |
718 |
Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. |
719 |
Check your code for overriding these methods. Btw. if they are not overridden, they |
720 |
by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>. |
721 |
</hint> |
722 |
</question> |
723 |
--> |
724 |
<answer id="format-dnd"> |
725 |
<p> |
726 |
XXX no answer for format-dnd |
727 |
</p> |
728 |
</answer> |
729 |
|
730 |
|
731 |
|
732 |
<!-- |
733 |
<question id="format-types" when="impl"> |
734 |
Which protocols and file formats (if any) does your module read or write on disk, |
735 |
or transmit or receive over the network? Do you generate an ant build script? |
736 |
Can it be edited and modified? |
737 |
|
738 |
<hint> |
739 |
<p> |
740 |
Files can be read and written by other programs, modules and users. If they influence |
741 |
your behaviour, make sure you either document the format or claim that it is a private |
742 |
api (using the <api> tag). |
743 |
</p> |
744 |
|
745 |
<p> |
746 |
If you generate an ant build file, this is very likely going to be seen by end users and |
747 |
they will be attempted to edit it. You should be ready for that and provide here a link |
748 |
to documentation that you have for such purposes and also describe how you are going to |
749 |
understand such files during next release, when you (very likely) slightly change the |
750 |
format. |
751 |
</p> |
752 |
</hint> |
753 |
</question> |
754 |
--> |
755 |
<answer id="format-types"> |
756 |
<p> |
757 |
XXX no answer for format-types |
758 |
</p> |
759 |
</answer> |
760 |
|
761 |
|
762 |
|
763 |
<!-- |
764 |
<question id="lookup-lookup" when="init"> |
765 |
Does your module use <code>org.openide.util.Lookup</code> |
766 |
or any similar technology to find any components to communicate with? Which ones? |
767 |
|
768 |
<hint> |
769 |
NetBeans is build around a generic registry of services called |
770 |
lookup. It is preferable to use it for registration and discovery |
771 |
if possible. See |
772 |
<a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html" shape="rect"> |
773 |
The Solution to Comunication Between Components |
774 |
</a>. If you do not plan to use lookup and insist usage |
775 |
of other solution, then please describe why it is not working for |
776 |
you. |
777 |
<br/> |
778 |
When filling the final version of your arch document, please |
779 |
describe the interfaces you are searching for, where |
780 |
are defined, whether you are searching for just one or more of them, |
781 |
if the order is important, etc. Also classify the stability of such |
782 |
API contract. Use <api group=&lookup& /> tag, so |
783 |
your information gets listed in the summary page of your javadoc. |
784 |
</hint> |
785 |
</question> |
786 |
--> |
787 |
<answer id="lookup-lookup"> |
788 |
<p> |
789 |
XXX no answer for lookup-lookup |
790 |
</p> |
791 |
</answer> |
792 |
|
793 |
|
794 |
|
795 |
<!-- |
796 |
<question id="lookup-register" when="final"> |
797 |
Do you register anything into lookup for other code to find? |
798 |
<hint> |
799 |
Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>? |
800 |
Who is supposed to find your component? |
801 |
</hint> |
802 |
</question> |
803 |
--> |
804 |
<answer id="lookup-register"> |
805 |
<p> |
806 |
XXX no answer for lookup-register |
807 |
</p> |
808 |
</answer> |
809 |
|
810 |
|
811 |
|
812 |
<!-- |
813 |
<question id="lookup-remove" when="final"> |
814 |
Do you remove entries of other modules from lookup? |
815 |
<hint> |
816 |
Why? Of course, that is possible, but it can be dangerous. Is the module |
817 |
your are masking resource from aware of what you are doing? |
818 |
</hint> |
819 |
</question> |
820 |
--> |
821 |
<answer id="lookup-remove"> |
822 |
<p> |
823 |
XXX no answer for lookup-remove |
824 |
</p> |
825 |
</answer> |
826 |
|
827 |
|
828 |
|
829 |
<!-- |
830 |
<question id="perf-exit" when="final"> |
831 |
Does your module run any code on exit? |
832 |
</question> |
833 |
--> |
834 |
<answer id="perf-exit"> |
835 |
<p> |
836 |
XXX no answer for perf-exit |
837 |
</p> |
838 |
</answer> |
839 |
|
840 |
|
841 |
|
842 |
<!-- |
843 |
<question id="perf-huge_dialogs" when="final"> |
844 |
Does your module contain any dialogs or wizards with a large number of |
845 |
GUI controls such as combo boxes, lists, trees, or text areas? |
846 |
</question> |
847 |
--> |
848 |
<answer id="perf-huge_dialogs"> |
849 |
<p> |
850 |
XXX no answer for perf-huge_dialogs |
851 |
</p> |
852 |
</answer> |
853 |
|
854 |
|
855 |
|
856 |
<!-- |
857 |
<question id="perf-limit" when="init"> |
858 |
Are there any hard-coded or practical limits in the number or size of |
859 |
elements your code can handle? |
860 |
<hint> |
861 |
Most of algorithms have increasing memory and speed complexity |
862 |
with respect to size of data they operate on. What is the critical |
863 |
part of your project that can be seen as a bottleneck with |
864 |
respect to speed or required memory? What are the practical |
865 |
sizes of data you tested your project with? What is your estimate |
866 |
of potential size of data that would cause visible performance |
867 |
problems? Is there some kind of check to detect such situation |
868 |
and prevent "hard" crashes - for example the CloneableEditorSupport |
869 |
checks for size of a file to be opened in editor |
870 |
and if it is larger than 1Mb it shows a dialog giving the |
871 |
user the right to decide - e.g. to cancel or commit suicide. |
872 |
</hint> |
873 |
</question> |
874 |
--> |
875 |
<answer id="perf-limit"> |
876 |
<p> |
877 |
XXX no answer for perf-limit |
878 |
</p> |
879 |
</answer> |
880 |
|
881 |
|
882 |
|
883 |
<!-- |
884 |
<question id="perf-mem" when="final"> |
885 |
How much memory does your component consume? Estimate |
886 |
with a relation to the number of windows, etc. |
887 |
</question> |
888 |
--> |
889 |
<answer id="perf-mem"> |
890 |
<p> |
891 |
XXX no answer for perf-mem |
892 |
</p> |
893 |
</answer> |
894 |
|
895 |
|
896 |
|
897 |
<!-- |
898 |
<question id="perf-menus" when="final"> |
899 |
Does your module use dynamically updated context menus, or |
900 |
context-sensitive actions with complicated and slow enablement logic? |
901 |
<hint> |
902 |
If you do a lot of tricks when adding actions to regular or context menus, you can significantly |
903 |
slow down display of the menu, even when the user is not using your action. Pay attention to |
904 |
actions you add to the main menu bar, and to context menus of foreign nodes or components. If |
905 |
the action is conditionally enabled, or changes its display dynamically, you need to check the |
906 |
impact on performance. In some cases it may be more appropriate to make a simple action that is |
907 |
always enabled but does more detailed checks in a dialog if it is actually run. |
908 |
</hint> |
909 |
</question> |
910 |
--> |
911 |
<answer id="perf-menus"> |
912 |
<p> |
913 |
XXX no answer for perf-menus |
914 |
</p> |
915 |
</answer> |
916 |
|
917 |
|
918 |
|
919 |
<!-- |
920 |
<question id="perf-progress" when="final"> |
921 |
Does your module execute any long-running tasks? |
922 |
|
923 |
<hint>Long running tasks should never block |
924 |
AWT thread as it badly hurts the UI |
925 |
<a href="http://performance.netbeans.org/responsiveness/issues.html" shape="rect"> |
926 |
responsiveness</a>. |
927 |
Tasks like connecting over |
928 |
network, computing huge amount of data, compilation |
929 |
be done asynchronously (for example |
930 |
using <code>RequestProcessor</code>), definitively it should |
931 |
not block AWT thread. |
932 |
</hint> |
933 |
</question> |
934 |
--> |
935 |
<answer id="perf-progress"> |
936 |
<p> |
937 |
XXX no answer for perf-progress |
938 |
</p> |
939 |
</answer> |
940 |
|
941 |
|
942 |
|
943 |
<!-- |
944 |
<question id="perf-scale" when="init"> |
945 |
Which external criteria influence the performance of your |
946 |
program (size of file in editor, number of files in menu, |
947 |
in source directory, etc.) and how well your code scales? |
948 |
<hint> |
949 |
Please include some estimates, there are other more detailed |
950 |
questions to answer in later phases of implementation. |
951 |
</hint> |
952 |
</question> |
953 |
--> |
954 |
<answer id="perf-scale"> |
955 |
<p> |
956 |
XXX no answer for perf-scale |
957 |
</p> |
958 |
</answer> |
959 |
|
960 |
|
961 |
|
962 |
<!-- |
963 |
<question id="perf-spi" when="init"> |
964 |
How the performance of the plugged in code will be enforced? |
965 |
<hint> |
966 |
If you allow foreign code to be plugged into your own module, how |
967 |
do you enforce that it will behave correctly and quickly and will not |
968 |
negatively influence the performance of your own module? |
969 |
</hint> |
970 |
</question> |
971 |
--> |
972 |
<answer id="perf-spi"> |
973 |
<p> |
974 |
XXX no answer for perf-spi |
975 |
</p> |
976 |
</answer> |
977 |
|
978 |
|
979 |
|
980 |
<!-- |
981 |
<question id="perf-startup" when="final"> |
982 |
Does your module run any code on startup? |
983 |
</question> |
984 |
--> |
985 |
<answer id="perf-startup"> |
986 |
<p> |
987 |
XXX no answer for perf-startup |
988 |
</p> |
989 |
</answer> |
990 |
|
991 |
|
992 |
|
993 |
<!-- |
994 |
<question id="perf-wakeup" when="final"> |
995 |
Does any piece of your code wake up periodically and do something |
996 |
even when the system is otherwise idle (no user interaction)? |
997 |
</question> |
998 |
--> |
999 |
<answer id="perf-wakeup"> |
1000 |
<p> |
1001 |
XXX no answer for perf-wakeup |
1002 |
</p> |
1003 |
</answer> |
1004 |
|
1005 |
|
1006 |
|
1007 |
<!-- |
1008 |
<question id="resources-file" when="final"> |
1009 |
Does your module use <code>java.io.File</code> directly? |
1010 |
|
1011 |
<hint> |
1012 |
NetBeans provide a logical wrapper over plain files called |
1013 |
<code>org.openide.filesystems.FileObject</code> that |
1014 |
provides uniform access to such resources and is the preferred |
1015 |
way that should be used. But of course there can be situations when |
1016 |
this is not suitable. |
1017 |
</hint> |
1018 |
</question> |
1019 |
--> |
1020 |
<answer id="resources-file"> |
1021 |
<p> |
1022 |
XXX no answer for resources-file |
1023 |
</p> |
1024 |
</answer> |
1025 |
|
1026 |
|
1027 |
|
1028 |
<!-- |
1029 |
<question id="resources-layer" when="final"> |
1030 |
Does your module provide own layer? Does it create any files or |
1031 |
folders in it? What it is trying to communicate by that and with which |
1032 |
components? |
1033 |
|
1034 |
<hint> |
1035 |
NetBeans allows automatic and declarative installation of resources |
1036 |
by module layers. Module register files into appropriate places |
1037 |
and other components use that information to perform their task |
1038 |
(build menu, toolbar, window layout, list of templates, set of |
1039 |
options, etc.). |
1040 |
</hint> |
1041 |
</question> |
1042 |
--> |
1043 |
<answer id="resources-layer"> |
1044 |
<p> |
1045 |
XXX no answer for resources-layer |
1046 |
</p> |
1047 |
</answer> |
1048 |
|
1049 |
|
1050 |
|
1051 |
<!-- |
1052 |
<question id="resources-mask" when="final"> |
1053 |
Does your module mask/hide/override any resources provided by other modules in |
1054 |
their layers? |
1055 |
|
1056 |
<hint> |
1057 |
If you mask a file provided by another module, you probably depend |
1058 |
on that and do not want the other module to (for example) change |
1059 |
the file's name. That module shall thus make that file available as an API |
1060 |
of some stability category. |
1061 |
</hint> |
1062 |
</question> |
1063 |
--> |
1064 |
<answer id="resources-mask"> |
1065 |
<p> |
1066 |
XXX no answer for resources-mask |
1067 |
</p> |
1068 |
</answer> |
1069 |
|
1070 |
|
1071 |
|
1072 |
<!-- |
1073 |
<question id="resources-preferences" when="final"> |
1074 |
Does your module uses preferences via Preferences API? Does your module use NbPreferences or |
1075 |
or regular JDK Preferences ? Does it read, write or both ? |
1076 |
Does it share preferences with other modules ? If so, then why ? |
1077 |
<hint> |
1078 |
You may use |
1079 |
<api type="export" group="preferences" |
1080 |
name="preference node name" category="private"> |
1081 |
description of individual keys, where it is used, what it |
1082 |
influences, whether the module reads/write it, etc. |
1083 |
</api> |
1084 |
Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo. |
1085 |
Note that if you use NbPreferences this name will then be the same as the code name base of the module. |
1086 |
</hint> |
1087 |
</question> |
1088 |
--> |
1089 |
<answer id="resources-preferences"> |
1090 |
<p> |
1091 |
XXX no answer for resources-preferences |
1092 |
</p> |
1093 |
</answer> |
1094 |
|
1095 |
|
1096 |
|
1097 |
<!-- |
1098 |
<question id="security-grant" when="final"> |
1099 |
Does your code grant additional rights to some other code? |
1100 |
<hint>Avoid using a class loader that adds extra |
1101 |
permissions to loaded code unless really necessary. |
1102 |
Also note that your API implementation |
1103 |
can also expose unneeded permissions to enemy code by |
1104 |
calling AccessController.doPrivileged().</hint> |
1105 |
</question> |
1106 |
--> |
1107 |
<answer id="security-grant"> |
1108 |
<p> |
1109 |
XXX no answer for security-grant |
1110 |
</p> |
1111 |
</answer> |
1112 |
|
1113 |
|
1114 |
|
1115 |
<!-- |
1116 |
<question id="security-policy" when="final"> |
1117 |
Does your functionality require modifications to the standard policy file? |
1118 |
<hint>Your code might pass control to third-party code not |
1119 |
coming from trusted domains. This could be code downloaded over the |
1120 |
network or code coming from libraries that are not bundled |
1121 |
with NetBeans. Which permissions need to be granted to which domains?</hint> |
1122 |
</question> |
1123 |
--> |
1124 |
<answer id="security-policy"> |
1125 |
<p> |
1126 |
XXX no answer for security-policy |
1127 |
</p> |
1128 |
</answer> |
1129 |
|
1130 |
</api-answers> |