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