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