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