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