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