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