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