This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 178311
Collapse All | Expand All

(-)a/editor.indent.project/apichanges.xml (+146 lines)
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-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
<?xml-stylesheet type="text/xml" href="../nbbuild/javadoctools/apichanges.xsl"?>
44
<!DOCTYPE apichanges PUBLIC "-//NetBeans//DTD API changes list 1.0//EN" "../nbbuild/javadoctools/apichanges.dtd">
45
46
<!--
47
48
INFO FOR PEOPLE ADDING CHANGES:
49
50
Check the DTD (apichanges.dtd) for details on the syntax. You do not
51
need to regenerate the HTML, as this is part of Javadoc generation; just
52
change the XML. Rough syntax of a change (several parts optional):
53
54
<change>
55
    <api name="compiler"/>
56
    <summary>Some brief description here, can use <b>XHTML</b></summary>
57
    <version major="1" minor="99"/>
58
    <date day="13" month="6" year="2001"/>
59
    <author login="jrhacker"/>
60
    <compatibility addition="yes"/>
61
    <description>
62
        The main description of the change here.
63
        Again can use full <b>XHTML</b> as needed.
64
    </description>
65
    <class package="org.openide.compiler" name="DoWhatIWantCompiler"/>
66
    <issue number="14309"/>
67
</change>
68
69
Also permitted elements: <package>, <branch>. <version> is API spec
70
version, recommended for all new changes. <compatibility> should say
71
if things were added/modified/deprecated/etc. and give all information
72
related to upgrading old code. List affected top-level classes and
73
link to issue numbers if applicable. See the DTD for more details.
74
75
Changes need not be in any particular order, they are sorted in various
76
ways by the stylesheet anyway.
77
78
Dates are assumed to mean "on the trunk". If you *also* make the same
79
change on a stabilization branch, use the <branch> tag to indicate this
80
and explain why the change was made on a branch in the <description>.
81
82
Please only change this file on the trunk! Rather: you can change it
83
on branches if you want, but these changes will be ignored; only the
84
trunk version of this file is important.
85
86
Deprecations do not count as incompatible, assuming that code using the
87
deprecated calls continues to see their documented behavior. But do
88
specify deprecation="yes" in <compatibility>.
89
90
This file is not a replacement for Javadoc: it is intended to list changes,
91
not describe the complete current behavior, for which ordinary documentation
92
is the proper place.
93
94
-->
95
96
<apichanges>
97
98
    <!-- First, a list of API names you may use: -->
99
    <apidefs>
100
        <apidef name="EditorIndentationForProjectsAPI">Editor Indentation for Projects</apidef>
101
        <!-- etc. -->
102
    </apidefs>
103
104
    <!-- ACTUAL CHANGES BEGIN HERE: -->
105
106
    <changes>
107
108
        <change id="created">
109
            <summary>editor.indent.project module was created</summary>
110
            <version major="1" minor="0"/>
111
            <date day="17" month="2" year="2010"/>
112
            <author login="vstejskal"/>
113
            <compatibility binary="compatible" source="compatible" semantic="compatible"/>
114
            <description>
115
                The module was created.
116
            </description>
117
        </change>
118
119
    </changes>
120
121
    <!-- Now the surrounding HTML text and document structure: -->
122
123
    <htmlcontents>
124
<!-- Generated from apichanges.xml -->
125
    <head>
126
      <title>Change History of Editor Indentation for Projects API</title>
127
      <link rel="stylesheet" href="prose.css" type="text/css"/>
128
    </head>
129
    <body>
130
131
<p class="overviewlink"><a href="overview-summary.html">Overview</a></p>
132
133
<h1>Introduction</h1>
134
135
<p>This document lists changes made to the <a href="overview-summary.html">Editor Indentation for Projects API</a>.</p>
136
137
<!-- The actual lists of changes, as summaries and details: -->
138
      <hr/>
139
      <standard-changelists module-code-name="org.netbeans.modules.editor.indent.project/0"/>
140
141
      <hr/><p>@FOOTER@</p>
142
143
    </body>
144
  </htmlcontents>
145
146
</apichanges>
(-)a/editor.indent.project/arch.xml (+1076 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
3
  <!ENTITY api-questions SYSTEM "../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
4
]>
5
6
<api-answers
7
  question-version="1.29"
8
  author="vstejskal@netbeans.org"
9
>
10
11
  &api-questions;
12
13
14
<!--
15
        <question id="arch-overall" when="init">
16
            Describe the overall architecture. 
17
            <hint>
18
            What will be API for 
19
            <a href="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi">
20
                clients and what support API</a>? 
21
            What parts will be pluggable?
22
            How will plug-ins be registered? Please use <code>&lt;api type="export"/&gt;</code>
23
            to describe your general APIs and specify their
24
            <a href="http://openide.netbeans.org/tutorial/api-design.html#category-private">
25
            stability categories</a>.
26
            If possible please provide simple diagrams.
27
            </hint>
28
        </question>
29
-->
30
 <answer id="arch-overall">
31
  <p>
32
	<api name="EditorIndentationForProjectsAPI" group="java" type="export" category="devel" />
33
  </p>
34
 </answer>
35
36
37
38
<!--
39
        <question id="arch-quality" when="init">
40
            How will the <a href="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a>
41
            of your code be tested and 
42
            how are future regressions going to be prevented?
43
            <hint>
44
            What kind of testing do
45
            you want to use? How much functionality, in which areas,
46
            should be covered by the tests? How you find out that your
47
            project was successful?
48
            </hint>
49
        </question>
50
-->
51
 <answer id="arch-quality">
52
  <p>
53
   XXX no answer for arch-quality
54
  </p>
55
 </answer>
56
57
58
59
<!--
60
        <question id="arch-time" when="init">
61
            What are the time estimates of the work?
62
            <hint>
63
            Please express your estimates of how long the design, implementation,
64
            stabilization are likely to last. How many people will be needed to
65
            implement this and what is the expected milestone by which the work should be 
66
            ready?
67
            </hint>
68
        </question>
69
-->
70
 <answer id="arch-time">
71
  <p>
72
   XXX no answer for arch-time
73
  </p>
74
 </answer>
75
76
77
78
<!--
79
        <question id="arch-usecases" when="init">
80
            <hint>
81
                Content of this answer will be displayed as part of page at
82
                http://www.netbeans.org/download/dev/javadoc/usecases.html 
83
                You can use tags &lt;usecase name="name&gt; regular html description &lt;/usecase&gt;
84
                and if you want to use an URL you can prefix if with @TOP@ to begin
85
                at the root of your javadoc
86
            </hint>
87
        
88
            Describe the main <a href="http://openide.netbeans.org/tutorial/api-design.html#usecase">
89
            use cases</a> of the new API. Who will use it under
90
            what circumstances? What kind of code would typically need to be written
91
            to use the module?
92
        </question>
93
-->
94
 <answer id="arch-usecases">
95
  <p>
96
   XXX no answer for arch-usecases
97
  </p>
98
 </answer>
99
100
101
102
<!--
103
        <question id="arch-what" when="init">
104
            What is this project good for?
105
            <hint>
106
            Please provide here a few lines describing the project, 
107
            what problem it should solve, provide links to documentation, 
108
            specifications, etc.
109
            </hint>
110
        </question>
111
-->
112
 <answer id="arch-what">
113
  <p>
114
   XXX no answer for arch-what
115
  </p>
116
 </answer>
117
118
119
120
<!--
121
        <question id="arch-where" when="impl">
122
            Where one can find sources for your module?
123
            <hint>
124
                Please provide link to the Hg web client at
125
                http://hg.netbeans.org/
126
                or just use tag defaultanswer generate='here'
127
            </hint>
128
        </question>
129
-->
130
 <answer id="arch-where">
131
  <defaultanswer generate='here' />
132
 </answer>
133
134
135
136
<!--
137
        <question id="compat-deprecation" when="init">
138
            How the introduction of your project influences functionality
139
            provided by previous version of the product?
140
            <hint>
141
            If you are planning to deprecate/remove/change any existing APIs,
142
            list them here accompanied with the reason explaining why you
143
            are doing so.
144
            </hint>
145
        </question>
146
-->
147
 <answer id="compat-deprecation">
148
  <p>
149
   XXX no answer for compat-deprecation
150
  </p>
151
 </answer>
152
153
154
155
<!--
156
        <question id="compat-i18n" when="impl">
157
            Is your module correctly internationalized?
158
            <hint>
159
            Correct internationalization means that it obeys instructions 
160
            at <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/i18n-branding.html">
161
            NetBeans I18N pages</a>.
162
            </hint>
163
        </question>
164
-->
165
 <answer id="compat-i18n">
166
  <p>
167
   XXX no answer for compat-i18n
168
  </p>
169
 </answer>
170
171
172
173
<!--
174
        <question id="compat-standards" when="init">
175
            Does the module implement or define any standards? Is the 
176
            implementation exact or does it deviate somehow?
177
        </question>
178
-->
179
 <answer id="compat-standards">
180
  <p>
181
   XXX no answer for compat-standards
182
  </p>
183
 </answer>
184
185
186
187
<!--
188
        <question id="compat-version" when="impl">
189
            Can your module coexist with earlier and future
190
            versions of itself? Can you correctly read all old settings? Will future
191
            versions be able to read your current settings? Can you read
192
            or politely ignore settings stored by a future version?
193
            
194
            <hint>
195
            Very helpful for reading settings is to store version number
196
            there, so future versions can decide whether how to read/convert
197
            the settings and older versions can ignore the new ones.
198
            </hint>
199
        </question>
200
-->
201
 <answer id="compat-version">
202
  <p>
203
   XXX no answer for compat-version
204
  </p>
205
 </answer>
206
207
208
209
<!--
210
        <question id="dep-jre" when="final">
211
            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
212
            <hint>
213
            It is expected that if your module runs on 1.x that it will run 
214
            on 1.x+1 if no, state that please. Also describe here cases where
215
            you run different code on different versions of JRE and why.
216
            </hint>
217
        </question>
218
-->
219
 <answer id="dep-jre">
220
  <p>
221
   XXX no answer for dep-jre
222
  </p>
223
 </answer>
224
225
226
227
<!--
228
        <question id="dep-jrejdk" when="final">
229
            Do you require the JDK or is the JRE enough?
230
        </question>
231
-->
232
 <answer id="dep-jrejdk">
233
  <p>
234
   XXX no answer for dep-jrejdk
235
  </p>
236
 </answer>
237
238
239
240
<!--
241
        <question id="dep-nb" when="init">
242
            What other NetBeans projects and modules does this one depend on?
243
            <hint>
244
            Depending on other NetBeans projects influnces the ability of
245
            users of your work to customize their own branded version of
246
            NetBeans by enabling and disabling some modules. Too
247
            much dependencies restrict this kind of customization. If that
248
            is your case, then you may want to split your functionality into
249
            pieces of autoload, eager and regular modules which can be
250
            enabled independently. Usually the answer to this question
251
            is generated from your <code>project.xml</code> file, but
252
            if it is not guessed correctly, you can suppress it by
253
            specifying &lt;defaultanswer generate="none"/&gt; and
254
            write here your own. Please describe such projects as imported APIs using
255
            the <code>&lt;api name="identification" type="import or export" category="stable" url="where is the description" /&gt;</code>.
256
            By doing this information gets listed in the summary page of your
257
            javadoc.
258
            </hint>
259
        </question>
260
-->
261
 <answer id="dep-nb">
262
  <defaultanswer generate='here' />
263
 </answer>
264
265
266
267
<!--
268
        <question id="dep-non-nb" when="init">
269
            What other projects outside NetBeans does this one depend on?
270
            
271
            <hint>
272
            Depending on 3rd party libraries is always problematic,
273
            especially if they are not open source, as that complicates
274
            the licensing scheme of NetBeans. Please enumerate your
275
            external dependencies here, so it is correctly understood since
276
            the begining what are the legal implications of your project.
277
            Also please note that
278
            some non-NetBeans projects are packaged as NetBeans modules
279
            (see <a href="http://libs.netbeans.org/">libraries</a>) and
280
            it is preferred to use this approach when more modules may
281
            depend and share such third-party libraries.
282
            </hint>
283
        </question>
284
-->
285
 <answer id="dep-non-nb">
286
  <p>
287
   XXX no answer for dep-non-nb
288
  </p>
289
 </answer>
290
291
292
293
<!--
294
        <question id="dep-platform" when="init">
295
            On which platforms does your module run? Does it run in the same
296
            way on each?
297
            <hint>
298
            If you plan any dependency on OS or any usage of native code,
299
            please describe why you are doing so and describe how you envision
300
            to enforce the portability of your code.
301
            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
302
            enabled modules</a> which together with autoload/eager modules
303
            can allow you to enable to provide the best OS aware support
304
            on certain OSes while providing compatibility bridge on the not
305
            supported ones.
306
            Also please list the supported
307
            OSes/HW platforms and mentioned the lovest version of JDK required
308
            for your project to run on. Also state whether JRE is enough or
309
            you really need JDK.
310
            </hint>
311
        </question>
312
-->
313
 <answer id="dep-platform">
314
  <p>
315
   XXX no answer for dep-platform
316
  </p>
317
 </answer>
318
319
320
321
<!--
322
        <question id="deploy-dependencies" when="final">
323
            What do other modules need to do to declare a dependency on this one,
324
            in addition to or instead of the normal module dependency declaration
325
            (e.g. tokens to require)?
326
            <hint>
327
                Provide a sample of the actual lines you would add to a module manifest
328
                to declare a dependency, for example OpenIDE-Module-Requires: some.token.
329
                If other modules should not depend on this module, or should just use a
330
                simple regular module dependency, you can just answer "nothing". If you
331
                intentionally expose a semistable API to clients using implementation
332
                dependencies, you should mention that here (but there is no need to give
333
                an example of usage).
334
            </hint>
335
        </question>
336
-->
337
 <answer id="deploy-dependencies">
338
  <p>
339
   XXX no answer for deploy-dependencies
340
  </p>
341
 </answer>
342
343
344
345
<!--
346
        <question id="deploy-jar" when="impl">
347
            Do you deploy just module JAR file(s) or other files as well?
348
            <hint>
349
            Usually a module consist of one JAR file (perhaps with Class-Path
350
            extensions) and also a configuration file that enables it. If you
351
            have any other files, use
352
            &lt;api group="java.io.File" name="yourname" type="export" category="friend"&gt;...&lt;/api&gt;
353
            to define the location, name and stability of your files (of course
354
            changing "yourname" and "friend" to suit your needs).
355
            
356
            If it uses more than one JAR, describe where they are located, how
357
            they refer to each other. 
358
            If it consist of module JAR(s) and other files, please describe
359
            what is their purpose, why other files are necessary. Please 
360
            make sure that installation/uninstallation leaves the system 
361
            in state as it was before installation.
362
            </hint>
363
        </question>
364
-->
365
 <answer id="deploy-jar">
366
  <p>
367
   XXX no answer for deploy-jar
368
  </p>
369
 </answer>
370
371
372
373
<!--
374
        <question id="deploy-nbm" when="impl">
375
            Can you deploy an NBM via the Update Center?
376
            <hint>
377
            If not why?
378
            </hint>
379
        </question>
380
-->
381
 <answer id="deploy-nbm">
382
  <p>
383
   XXX no answer for deploy-nbm
384
  </p>
385
 </answer>
386
387
388
389
<!--
390
        <question id="deploy-packages" when="init">
391
            Are packages of your module made inaccessible by not declaring them
392
            public?
393
            
394
            <hint>
395
            By default NetBeans build harness treats all packages are private.
396
            If you export some of them - either as public or friend packages,
397
            you should have a reason. If the reason is described elsewhere
398
            in this document, you can ignore this question.
399
            </hint>
400
        </question>
401
-->
402
 <answer id="deploy-packages">
403
  <p>
404
   XXX no answer for deploy-packages
405
  </p>
406
 </answer>
407
408
409
410
<!--
411
        <question id="deploy-shared" when="final">
412
            Do you need to be installed in the shared location only, or in the user directory only,
413
            or can your module be installed anywhere?
414
            <hint>
415
            Installation location shall not matter, if it does explain why.
416
            Consider also whether <code>InstalledFileLocator</code> can help.
417
            </hint>
418
        </question>
419
-->
420
 <answer id="deploy-shared">
421
  <p>
422
   XXX no answer for deploy-shared
423
  </p>
424
 </answer>
425
426
427
428
<!--
429
        <question id="exec-ant-tasks" when="impl">
430
            Do you define or register any ant tasks that other can use?
431
            
432
            <hint>
433
            If you provide an ant task that users can use, you need to be very
434
            careful about its syntax and behaviour, as it most likely forms an
435
	          API for end users and as there is a lot of end users, their reaction
436
            when such API gets broken can be pretty strong.
437
            </hint>
438
        </question>
439
-->
440
 <answer id="exec-ant-tasks">
441
  <p>
442
   XXX no answer for exec-ant-tasks
443
  </p>
444
 </answer>
445
446
447
448
<!--
449
        <question id="exec-classloader" when="impl">
450
            Does your code create its own class loader(s)?
451
            <hint>
452
            A bit unusual. Please explain why and what for.
453
            </hint>
454
        </question>
455
-->
456
 <answer id="exec-classloader">
457
  <p>
458
   XXX no answer for exec-classloader
459
  </p>
460
 </answer>
461
462
463
464
<!--
465
        <question id="exec-component" when="impl">
466
            Is execution of your code influenced by any (string) property
467
            of any of your components?
468
            
469
            <hint>
470
            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
471
            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
472
            a behavior of some code. This of course forms an interface that should
473
            be documented. Also if one depends on some interface that an object
474
            implements (<code>component instanceof Runnable</code>) that forms an
475
            API as well.
476
            </hint>
477
        </question>
478
-->
479
 <answer id="exec-component">
480
  <p>
481
   XXX no answer for exec-component
482
  </p>
483
 </answer>
484
485
486
487
<!--
488
        <question id="exec-introspection" when="impl">
489
            Does your module use any kind of runtime type information (<code>instanceof</code>,
490
            work with <code>java.lang.Class</code>, etc.)?
491
            <hint>
492
            Check for cases when you have an object of type A and you also
493
            expect it to (possibly) be of type B and do some special action. That
494
            should be documented. The same applies on operations in meta-level
495
            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
496
            </hint>
497
        </question>
498
-->
499
 <answer id="exec-introspection">
500
  <p>
501
   XXX no answer for exec-introspection
502
  </p>
503
 </answer>
504
505
506
507
<!--
508
        <question id="exec-privateaccess" when="final">
509
            Are you aware of any other parts of the system calling some of 
510
            your methods by reflection?
511
            <hint>
512
            If so, describe the "contract" as an API. Likely private or friend one, but
513
            still API and consider rewrite of it.
514
            </hint>
515
        </question>
516
-->
517
 <answer id="exec-privateaccess">
518
  <p>
519
   XXX no answer for exec-privateaccess
520
  </p>
521
 </answer>
522
523
524
525
<!--
526
        <question id="exec-process" when="impl">
527
            Do you execute an external process from your module? How do you ensure
528
            that the result is the same on different platforms? Do you parse output?
529
            Do you depend on result code?
530
            <hint>
531
            If you feed an input, parse the output please declare that as an API.
532
            </hint>
533
        </question>
534
-->
535
 <answer id="exec-process">
536
  <p>
537
   XXX no answer for exec-process
538
  </p>
539
 </answer>
540
541
542
543
<!--
544
        <question id="exec-property" when="impl">
545
            Is execution of your code influenced by any environment or
546
            Java system (<code>System.getProperty</code>) property?
547
            On a similar note, is there something interesting that you
548
            pass to <code>java.util.logging.Logger</code>? Or do you observe
549
            what others log?
550
            <hint>
551
            If there is a property that can change the behavior of your 
552
            code, somebody will likely use it. You should describe what it does 
553
            and the <a href="http://openide.netbeans.org/tutorial/api-design.html#life">stability category</a>
554
            of this API. You may use
555
            <pre>
556
                &lt;api type="export" group="property" name="id" category="private" url="http://..."&gt;
557
                    description of the property, where it is used, what it influence, etc.
558
                &lt;/api&gt;            
559
            </pre>
560
            </hint>
561
        </question>
562
-->
563
 <answer id="exec-property">
564
  <p>
565
   XXX no answer for exec-property
566
  </p>
567
 </answer>
568
569
570
571
<!--
572
        <question id="exec-reflection" when="impl">
573
            Does your code use Java Reflection to execute other code?
574
            <hint>
575
            This usually indicates a missing or insufficient API in the other
576
            part of the system. If the other side is not aware of your dependency
577
            this contract can be easily broken.
578
            </hint>
579
        </question>
580
-->
581
 <answer id="exec-reflection">
582
  <p>
583
   XXX no answer for exec-reflection
584
  </p>
585
 </answer>
586
587
588
589
<!--
590
        <question id="exec-threading" when="init">
591
            What threading models, if any, does your module adhere to? How the
592
            project behaves with respect to threading?
593
            <hint>
594
                Is your API threadsafe? Can it be accessed from any threads or
595
                just from some dedicated ones? Any special relation to AWT and
596
                its Event Dispatch thread? Also
597
                if your module calls foreign APIs which have a specific threading model,
598
                indicate how you comply with the requirements for multithreaded access
599
                (synchronization, mutexes, etc.) applicable to those APIs.
600
                If your module defines any APIs, or has complex internal structures
601
                that might be used from multiple threads, declare how you protect
602
                data against concurrent access, race conditions, deadlocks, etc.,
603
                and whether such rules are enforced by runtime warnings, errors, assertions, etc.
604
                Examples: a class might be non-thread-safe (like Java Collections); might
605
                be fully thread-safe (internal locking); might require access through a mutex
606
                (and may or may not automatically acquire that mutex on behalf of a client method);
607
                might be able to run only in the event queue; etc.
608
                Also describe when any events are fired: synchronously, asynchronously, etc.
609
                Ideas: <a href="http://core.netbeans.org/proposals/threading/index.html#recommendations">Threading Recommendations</a> (in progress)
610
            </hint>
611
        </question>
612
-->
613
 <answer id="exec-threading">
614
  <p>
615
   XXX no answer for exec-threading
616
  </p>
617
 </answer>
618
619
620
621
<!--
622
        <question id="format-clipboard" when="impl">
623
            Which data flavors (if any) does your code read from or insert to
624
            the clipboard (by access to clipboard on means calling methods on <code>java.awt.datatransfer.Transferable</code>?
625
            
626
            <hint>
627
            Often Node's deal with clipboard by usage of <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
628
            Check your code for overriding these methods.
629
            </hint>
630
        </question>
631
-->
632
 <answer id="format-clipboard">
633
  <p>
634
   XXX no answer for format-clipboard
635
  </p>
636
 </answer>
637
638
639
640
<!--
641
        <question id="format-dnd" when="impl">
642
            Which protocols (if any) does your code understand during Drag &amp; Drop?
643
            <hint>
644
            Often Node's deal with clipboard by usage of <code>Node.drag, Node.getDropType</code>. 
645
            Check your code for overriding these methods. Btw. if they are not overridden, they
646
            by default delegate to <code>Node.clipboardCopy, Node.clipboardCut and Node.pasteTypes</code>.
647
            </hint>
648
        </question>
649
-->
650
 <answer id="format-dnd">
651
  <p>
652
   XXX no answer for format-dnd
653
  </p>
654
 </answer>
655
656
657
658
<!--
659
        <question id="format-types" when="impl">
660
            Which protocols and file formats (if any) does your module read or write on disk,
661
            or transmit or receive over the network? Do you generate an ant build script?
662
            Can it be edited and modified? 
663
            
664
            <hint>
665
            <p>
666
            Files can be read and written by other programs, modules and users. If they influence
667
            your behaviour, make sure you either document the format or claim that it is a private
668
            api (using the &lt;api&gt; tag). 
669
            </p>
670
            
671
            <p>
672
            If you generate an ant build file, this is very likely going to be seen by end users and
673
            they will be attempted to edit it. You should be ready for that and provide here a link
674
            to documentation that you have for such purposes and also describe how you are going to
675
            understand such files during next release, when you (very likely) slightly change the 
676
            format.
677
            </p>
678
            </hint>
679
        </question>
680
-->
681
 <answer id="format-types">
682
  <p>
683
   XXX no answer for format-types
684
  </p>
685
 </answer>
686
687
688
689
<!--
690
        <question id="lookup-lookup" when="init">
691
            Does your module use <code>org.openide.util.Lookup</code>
692
            or any similar technology to find any components to communicate with? Which ones?
693
            
694
            <hint>
695
            NetBeans is build around a generic registry of services called
696
            lookup. It is preferable to use it for registration and discovery
697
            if possible. See
698
            <a href="http://www.netbeans.org/download/dev/javadoc/org-openide-util/org/openide/util/lookup/doc-files/index.html">
699
            The Solution to Comunication Between Components
700
            </a>. If you do not plan to use lookup and insist usage
701
            of other solution, then please describe why it is not working for
702
            you.
703
            <br/>
704
            When filling the final version of your arch document, please
705
            describe the interfaces you are searching for, where 
706
            are defined, whether you are searching for just one or more of them,
707
            if the order is important, etc. Also classify the stability of such
708
            API contract. Use &lt;api group=&amp;lookup&amp; /&gt; tag, so
709
            your information gets listed in the summary page of your javadoc.
710
            </hint>
711
        </question>
712
-->
713
 <answer id="lookup-lookup">
714
  <p>
715
   XXX no answer for lookup-lookup
716
  </p>
717
 </answer>
718
719
720
721
<!--
722
        <question id="lookup-register" when="final">
723
            Do you register anything into lookup for other code to find?
724
            <hint>
725
            Do you register using layer file or using a declarative annotation such as <code>@ServiceProvider</code>?
726
            Who is supposed to find your component?
727
            </hint>
728
        </question>
729
-->
730
 <answer id="lookup-register">
731
  <p>
732
   XXX no answer for lookup-register
733
  </p>
734
 </answer>
735
736
737
738
<!--
739
        <question id="lookup-remove" when="final">
740
            Do you remove entries of other modules from lookup?
741
            <hint>
742
            Why? Of course, that is possible, but it can be dangerous. Is the module
743
            your are masking resource from aware of what you are doing?
744
            </hint>
745
        </question>
746
-->
747
 <answer id="lookup-remove">
748
  <p>
749
   XXX no answer for lookup-remove
750
  </p>
751
 </answer>
752
753
754
755
<!--
756
        <question id="perf-exit" when="final">
757
            Does your module run any code on exit?
758
        </question>
759
-->
760
 <answer id="perf-exit">
761
  <p>
762
   XXX no answer for perf-exit
763
  </p>
764
 </answer>
765
766
767
768
<!--
769
        <question id="perf-huge_dialogs" when="final">
770
            Does your module contain any dialogs or wizards with a large number of
771
            GUI controls such as combo boxes, lists, trees, or text areas?
772
        </question>
773
-->
774
 <answer id="perf-huge_dialogs">
775
  <p>
776
   XXX no answer for perf-huge_dialogs
777
  </p>
778
 </answer>
779
780
781
782
<!--
783
        <question id="perf-limit" when="init">
784
            Are there any hard-coded or practical limits in the number or size of
785
            elements your code can handle?
786
            <hint>
787
                Most of algorithms have increasing memory and speed complexity
788
                with respect to size of data they operate on. What is the critical
789
                part of your project that can be seen as a bottleneck with
790
                respect to speed or required memory? What are the practical
791
                sizes of data you tested your project with? What is your estimate
792
                of potential size of data that would cause visible performance
793
                problems? Is there some kind of check to detect such situation
794
                and prevent "hard" crashes - for example the CloneableEditorSupport
795
                checks for size of a file to be opened in editor
796
                and if it is larger than 1Mb it shows a dialog giving the
797
                user the right to decide - e.g. to cancel or commit suicide.
798
            </hint>
799
        </question>
800
-->
801
 <answer id="perf-limit">
802
  <p>
803
   XXX no answer for perf-limit
804
  </p>
805
 </answer>
806
807
808
809
<!--
810
        <question id="perf-mem" when="final">
811
            How much memory does your component consume? Estimate
812
            with a relation to the number of windows, etc.
813
        </question>
814
-->
815
 <answer id="perf-mem">
816
  <p>
817
   XXX no answer for perf-mem
818
  </p>
819
 </answer>
820
821
822
823
<!--
824
        <question id="perf-menus" when="final">
825
            Does your module use dynamically updated context menus, or
826
            context-sensitive actions with complicated and slow enablement logic?
827
            <hint>
828
                If you do a lot of tricks when adding actions to regular or context menus, you can significantly
829
                slow down display of the menu, even when the user is not using your action. Pay attention to
830
                actions you add to the main menu bar, and to context menus of foreign nodes or components. If
831
                the action is conditionally enabled, or changes its display dynamically, you need to check the
832
                impact on performance. In some cases it may be more appropriate to make a simple action that is
833
                always enabled but does more detailed checks in a dialog if it is actually run.
834
            </hint>
835
        </question>
836
-->
837
 <answer id="perf-menus">
838
  <p>
839
   XXX no answer for perf-menus
840
  </p>
841
 </answer>
842
843
844
845
<!--
846
        <question id="perf-progress" when="final">
847
            Does your module execute any long-running tasks?
848
            
849
            <hint>Long running tasks should never block 
850
            AWT thread as it badly hurts the UI
851
            <a href="http://performance.netbeans.org/responsiveness/issues.html">
852
            responsiveness</a>.
853
            Tasks like connecting over
854
            network, computing huge amount of data, compilation
855
            be done asynchronously (for example
856
            using <code>RequestProcessor</code>), definitively it should 
857
            not block AWT thread.
858
            </hint>
859
        </question>
860
-->
861
 <answer id="perf-progress">
862
  <p>
863
   XXX no answer for perf-progress
864
  </p>
865
 </answer>
866
867
868
869
<!--
870
        <question id="perf-scale" when="init">
871
            Which external criteria influence the performance of your
872
            program (size of file in editor, number of files in menu, 
873
            in source directory, etc.) and how well your code scales?
874
            <hint>
875
            Please include some estimates, there are other more detailed 
876
            questions to answer in later phases of implementation. 
877
            </hint>
878
        </question>
879
-->
880
 <answer id="perf-scale">
881
  <p>
882
   XXX no answer for perf-scale
883
  </p>
884
 </answer>
885
886
887
888
<!--
889
        <question id="perf-spi" when="init">
890
            How the performance of the plugged in code will be enforced?
891
            <hint>
892
            If you allow foreign code to be plugged into your own module, how
893
            do you enforce that it will behave correctly and quickly and will not
894
            negatively influence the performance of your own module?
895
            </hint>
896
        </question>
897
-->
898
 <answer id="perf-spi">
899
  <p>
900
   XXX no answer for perf-spi
901
  </p>
902
 </answer>
903
904
905
906
<!--
907
        <question id="perf-startup" when="final">
908
            Does your module run any code on startup?
909
        </question>
910
-->
911
 <answer id="perf-startup">
912
  <p>
913
   XXX no answer for perf-startup
914
  </p>
915
 </answer>
916
917
918
919
<!--
920
        <question id="perf-wakeup" when="final">
921
            Does any piece of your code wake up periodically and do something
922
            even when the system is otherwise idle (no user interaction)?
923
        </question>
924
-->
925
 <answer id="perf-wakeup">
926
  <p>
927
   XXX no answer for perf-wakeup
928
  </p>
929
 </answer>
930
931
932
933
<!--
934
        <question id="resources-file" when="final">
935
            Does your module use <code>java.io.File</code> directly?
936
            
937
            <hint>
938
            NetBeans provide a logical wrapper over plain files called 
939
            <code>org.openide.filesystems.FileObject</code> that
940
            provides uniform access to such resources and is the preferred
941
            way that should be used. But of course there can be situations when
942
            this is not suitable.
943
            </hint>
944
        </question>
945
-->
946
 <answer id="resources-file">
947
  <p>
948
   XXX no answer for resources-file
949
  </p>
950
 </answer>
951
952
953
954
<!--
955
        <question id="resources-layer" when="final">
956
            Does your module provide own layer? Does it create any files or
957
            folders in it? What it is trying to communicate by that and with which 
958
            components?
959
            
960
            <hint>
961
            NetBeans allows automatic and declarative installation of resources 
962
            by module layers. Module register files into appropriate places
963
            and other components use that information to perform their task
964
            (build menu, toolbar, window layout, list of templates, set of
965
            options, etc.). 
966
            </hint>
967
        </question>
968
-->
969
 <answer id="resources-layer">
970
  <p>
971
   XXX no answer for resources-layer
972
  </p>
973
 </answer>
974
975
976
977
<!--
978
        <question id="resources-mask" when="final">
979
            Does your module mask/hide/override any resources provided by other modules in
980
            their layers?
981
            
982
            <hint>
983
            If you mask a file provided by another module, you probably depend
984
            on that and do not want the other module to (for example) change
985
            the file's name. That module shall thus make that file available as an API
986
            of some stability category.
987
            </hint>
988
        </question>
989
-->
990
 <answer id="resources-mask">
991
  <p>
992
   XXX no answer for resources-mask
993
  </p>
994
 </answer>
995
996
997
998
<!--
999
        <question id="resources-preferences" when="final">
1000
            Does your module uses preferences via Preferences API? Does your module use NbPreferences or
1001
            or regular JDK Preferences ? Does it read, write or both ? 
1002
            Does it share preferences with other modules ? If so, then why ?
1003
            <hint>
1004
                You may use
1005
                    &lt;api type="export" group="preferences"
1006
                    name="preference node name" category="private"&gt;
1007
                    description of individual keys, where it is used, what it
1008
                    influences, whether the module reads/write it, etc.
1009
                    &lt;/api&gt;
1010
                Due to XML ID restrictions, rather than /org/netbeans/modules/foo give the "name" as org.netbeans.modules.foo.
1011
                Note that if you use NbPreferences this name will then be the same as the code name base of the module.
1012
            </hint>
1013
        </question>
1014
-->
1015
 <answer id="resources-preferences">
1016
  <p>
1017
   XXX no answer for resources-preferences
1018
  </p>
1019
 </answer>
1020
1021
1022
1023
<!--
1024
        <question id="resources-read" when="final">
1025
            Does your module read any resources from layers? For what purpose?
1026
            
1027
            <hint>
1028
            As this is some kind of intermodule dependency, it is a kind of API.
1029
            Please describe it and classify according to 
1030
            <a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
1031
            common stability categories</a>.
1032
            </hint>
1033
        </question>
1034
-->
1035
 <answer id="resources-read">
1036
  <p>
1037
   XXX no answer for resources-read
1038
  </p>
1039
 </answer>
1040
1041
1042
1043
<!--
1044
        <question id="security-grant" when="final">
1045
            Does your code grant additional rights to some other code?
1046
            <hint>Avoid using a class loader that adds extra
1047
            permissions to loaded code unless really necessary.
1048
            Also note that your API implementation
1049
            can also expose unneeded permissions to enemy code by
1050
            calling AccessController.doPrivileged().</hint>
1051
        </question>
1052
-->
1053
 <answer id="security-grant">
1054
  <p>
1055
   XXX no answer for security-grant
1056
  </p>
1057
 </answer>
1058
1059
1060
1061
<!--
1062
        <question id="security-policy" when="final">
1063
            Does your functionality require modifications to the standard policy file?
1064
            <hint>Your code might pass control to third-party code not
1065
            coming from trusted domains. This could be code downloaded over the
1066
            network or code coming from libraries that are not bundled
1067
            with NetBeans. Which permissions need to be granted to which domains?</hint>
1068
        </question>
1069
-->
1070
 <answer id="security-policy">
1071
  <p>
1072
   XXX no answer for security-policy
1073
  </p>
1074
 </answer>
1075
1076
</api-answers>
(-)a/editor.indent.project/build.xml (+5 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project basedir="." default="netbeans" name="editor.indent.project">
3
    <description>Builds, tests, and runs the project org.netbeans.modules.editor.indent.project</description>
4
    <import file="../nbbuild/templates/projectized.xml"/>
5
</project>
(-)a/editor.indent.project/manifest.mf (+6 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.editor.indent.project/0
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/indent/project/Bundle.properties
4
OpenIDE-Module-Provides: org.netbeans.modules.editor.indent.spi.CodeStylePreferences.Provider
5
OpenIDE-Module-Specification-Version: 1.0
6
(-)a/editor.indent.project/nbproject/project.properties (+46 lines)
Line 0 Link Here
1
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2
#
3
# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
4
#
5
# The contents of this file are subject to the terms of either the GNU
6
# General Public License Version 2 only ("GPL") or the Common
7
# Development and Distribution License("CDDL") (collectively, the
8
# "License"). You may not use this file except in compliance with the
9
# License. You can obtain a copy of the License at
10
# http://www.netbeans.org/cddl-gplv2.html
11
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
12
# specific language governing permissions and limitations under the
13
# License.  When distributing the software, include this License Header
14
# Notice in each file and include the License file at
15
# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
16
# particular file as subject to the "Classpath" exception as provided
17
# by Sun in the GPL Version 2 section of the License file that
18
# accompanied this code. If applicable, add the following below the
19
# License Header, with the fields enclosed by brackets [] replaced by
20
# your own identifying information:
21
# "Portions Copyrighted [year] [name of copyright owner]"
22
#
23
# Contributor(s):
24
#
25
# The Original Software is NetBeans. The Initial Developer of the Original
26
# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
27
# Microsystems, Inc. All Rights Reserved.
28
#
29
# If you wish your version of this file to be governed by only the CDDL
30
# or only the GPL Version 2, indicate your decision by adding
31
# "[Contributor] elects to include this software in this distribution
32
# under the [CDDL or GPL Version 2] license." If you do not indicate a
33
# single choice of license, a recipient has the option to distribute
34
# your version of this file under either the CDDL, the GPL Version 2 or
35
# to extend the choice of license to its licensees as provided above.
36
# However, if you add GPL Version 2 code and therefore, elected the GPL
37
# Version 2 license, then the option applies only if the new code is
38
# made subject to such option by the copyright holder.
39
40
is.eager=true
41
javac.source=1.6
42
javac.compilerargs=-Xlint -Xlint:-serial
43
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
46
javadoc.title=Editor Indentation for Projects
(-)a/editor.indent.project/nbproject/project.xml (+165 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.editor.indent.project</code-name-base>
7
            <module-dependencies>
8
                <dependency>
9
                    <code-name-base>org.jdesktop.layout</code-name-base>
10
                    <build-prerequisite/>
11
                    <compile-dependency/>
12
                    <run-dependency>
13
                        <release-version>1</release-version>
14
                        <specification-version>1.12</specification-version>
15
                    </run-dependency>
16
                </dependency>
17
                <dependency>
18
                    <code-name-base>org.netbeans.modules.editor.indent</code-name-base>
19
                    <build-prerequisite/>
20
                    <compile-dependency/>
21
                    <run-dependency>
22
                        <release-version>2</release-version>
23
                        <specification-version>1.17</specification-version>
24
                    </run-dependency>
25
                </dependency>
26
                <dependency>
27
                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
28
                    <build-prerequisite/>
29
                    <compile-dependency/>
30
                    <run-dependency>
31
                        <release-version>1</release-version>
32
                        <specification-version>1.15</specification-version>
33
                    </run-dependency>
34
                </dependency>
35
                <dependency>
36
                    <code-name-base>org.netbeans.modules.editor.settings</code-name-base>
37
                    <build-prerequisite/>
38
                    <compile-dependency/>
39
                    <run-dependency>
40
                        <release-version>1</release-version>
41
                        <specification-version>1.28</specification-version>
42
                    </run-dependency>
43
                </dependency>
44
                <dependency>
45
                    <code-name-base>org.netbeans.modules.editor.settings.storage</code-name-base>
46
                    <build-prerequisite/>
47
                    <compile-dependency/>
48
                    <run-dependency>
49
                        <release-version>1</release-version>
50
                        <specification-version>1.24</specification-version>
51
                    </run-dependency>
52
                </dependency>
53
                <dependency>
54
                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
55
                    <build-prerequisite/>
56
                    <compile-dependency/>
57
                    <run-dependency>
58
                        <release-version>1</release-version>
59
                        <specification-version>1.17</specification-version>
60
                    </run-dependency>
61
                </dependency>
62
                <dependency>
63
                    <code-name-base>org.netbeans.modules.options.editor</code-name-base>
64
                    <build-prerequisite/>
65
                    <compile-dependency/>
66
                    <run-dependency>
67
                        <release-version>1</release-version>
68
                        <specification-version>1.19</specification-version>
69
                    </run-dependency>
70
                </dependency>
71
                <dependency>
72
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
73
                    <build-prerequisite/>
74
                    <compile-dependency/>
75
                    <run-dependency>
76
                        <release-version>1</release-version>
77
                        <specification-version>1.29</specification-version>
78
                    </run-dependency>
79
                </dependency>
80
                <dependency>
81
                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
82
                    <build-prerequisite/>
83
                    <compile-dependency/>
84
                    <run-dependency>
85
                        <release-version>1</release-version>
86
                        <specification-version>1.41</specification-version>
87
                    </run-dependency>
88
                </dependency>
89
                <dependency>
90
                    <code-name-base>org.openide.awt</code-name-base>
91
                    <build-prerequisite/>
92
                    <compile-dependency/>
93
                    <run-dependency>
94
                        <specification-version>7.21</specification-version>
95
                    </run-dependency>
96
                </dependency>
97
                <dependency>
98
                    <code-name-base>org.openide.dialogs</code-name-base>
99
                    <build-prerequisite/>
100
                    <compile-dependency/>
101
                    <run-dependency>
102
                        <specification-version>7.14</specification-version>
103
                    </run-dependency>
104
                </dependency>
105
                <dependency>
106
                    <code-name-base>org.openide.filesystems</code-name-base>
107
                    <build-prerequisite/>
108
                    <compile-dependency/>
109
                    <run-dependency>
110
                        <specification-version>7.35</specification-version>
111
                    </run-dependency>
112
                </dependency>
113
                <dependency>
114
                    <code-name-base>org.openide.loaders</code-name-base>
115
                    <build-prerequisite/>
116
                    <compile-dependency/>
117
                    <run-dependency>
118
                        <specification-version>7.12</specification-version>
119
                    </run-dependency>
120
                </dependency>
121
                <dependency>
122
                    <code-name-base>org.openide.nodes</code-name-base>
123
                    <build-prerequisite/>
124
                    <compile-dependency/>
125
                    <run-dependency>
126
                        <specification-version>7.14</specification-version>
127
                    </run-dependency>
128
                </dependency>
129
                <dependency>
130
                    <code-name-base>org.openide.util</code-name-base>
131
                    <build-prerequisite/>
132
                    <compile-dependency/>
133
                    <run-dependency>
134
                        <specification-version>8.1</specification-version>
135
                    </run-dependency>
136
                </dependency>
137
                <dependency>
138
                    <code-name-base>org.openide.util.lookup</code-name-base>
139
                    <build-prerequisite/>
140
                    <compile-dependency/>
141
                    <run-dependency>
142
                        <specification-version>8.1</specification-version>
143
                    </run-dependency>
144
                </dependency>
145
            </module-dependencies>
146
            <test-dependencies>
147
                <test-type>
148
                    <name>unit</name>
149
                    <test-dependency>
150
                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
151
                        <compile-dependency/>
152
                    </test-dependency>
153
                    <test-dependency>
154
                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
155
                        <recursive/>
156
                        <compile-dependency/>
157
                    </test-dependency>
158
                </test-type>
159
            </test-dependencies>
160
            <public-packages>
161
                <package>org.netbeans.modules.editor.indent.project.api</package>
162
            </public-packages>
163
        </data>
164
    </configuration>
165
</project>
(-)a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/Bundle.properties (+28 lines)
Line 0 Link Here
1
OpenIDE-Module-Name=Editor Indentation for Projects
2
3
#FormattingCustomizerPanel
4
LBL_CategoryFormatting=Formatting
5
LBL_FormattingCustomizer_Global=Use &global options
6
LBL_FormattingCustomizer_Project=Use &project specific options
7
LBL_FormattingCustomizer_EditGlobal=&Edit global options
8
LBL_ForamttingCustomizer_Load=Load from &other project
9
10
# Messages in FormattingCustomizerPanel
11
MSG_CodeStyle_Import_Forbidden_From_The_Same_Project=Loading formatting settings from the same project is not allowed.
12
MSG_No_CodeStyle_Info_To_Import=The project you chose contains no formatting settings.
13
MSG_CodeStyle_Import_Successful=The formatting settings were successfully imported.
14
MSG_CodeStyle_Import_Failed=Importing the formatting settings failed.
15
16
#FormattingCustomizerPanel
17
MSG_use_global_settings_confirmation=This will remove all formatting settings and their customizations from this project. Do you want to proceed?
18
MSG_use_global_settings_confirmation_title=Use global formatting settings
19
FormattingPanel.languageCombo.AccessibleContext.accessibleDescription=Language list.
20
FormattingPanel.languageCombo.AccessibleContext.accessibleName=Language
21
FormattingPanel.categoryCombo.AccessibleContext.accessibleDescription=Category list.
22
FormattingPanel.categoryCombo.AccessibleContext.accessibleName=Category
23
FormattingCustomizerPanel.editGlobalButton.AccessibleContext.accessibleDescription=Edit global options
24
FormattingCustomizerPanel.loadButton.AccessibleContext.accessibleDescription=Load from other project
25
FormattingCustomizerPanel.globalButton.AccessibleContext.accessibleDescription=Use global options
26
FormattingCustomizerPanel.projectButton.AccessibleContext.accessibleDescription=Use project specific options
27
AD_Language=Language
28
AD_Category=Category
(-)a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.form (-3 lines)
Lines 5-13 Link Here
5
    <Component class="javax.swing.ButtonGroup" name="group">
5
    <Component class="javax.swing.ButtonGroup" name="group">
6
    </Component>
6
    </Component>
7
  </NonVisualComponents>
7
  </NonVisualComponents>
8
  <SyntheticProperties>
9
    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,60,0,0,2,34"/>
10
  </SyntheticProperties>
11
  <AuxValues>
8
  <AuxValues>
12
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
9
    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
13
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
10
    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
(-)a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.java (-4 / +11 lines)
Lines 39-45 Link Here
39
 * made subject to such option by the copyright holder.
39
 * made subject to such option by the copyright holder.
40
 */
40
 */
41
41
42
package org.netbeans.modules.options.indentation;
42
package org.netbeans.modules.editor.indent.project;
43
43
44
import java.awt.BorderLayout;
44
import java.awt.BorderLayout;
45
import java.awt.Component;
45
import java.awt.Component;
Lines 65-74 Link Here
65
import org.netbeans.api.project.ProjectManager;
65
import org.netbeans.api.project.ProjectManager;
66
import org.netbeans.api.project.ProjectUtils;
66
import org.netbeans.api.project.ProjectUtils;
67
import org.netbeans.modules.editor.indent.api.IndentUtils;
67
import org.netbeans.modules.editor.indent.api.IndentUtils;
68
import org.netbeans.modules.editor.indent.project.api.Customizers;
68
import org.netbeans.modules.editor.settings.storage.api.EditorSettings;
69
import org.netbeans.modules.editor.settings.storage.api.EditorSettings;
69
import org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage;
70
import org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage;
70
import org.netbeans.modules.editor.settings.storage.spi.TypedValue;
71
import org.netbeans.modules.editor.settings.storage.spi.TypedValue;
71
import org.netbeans.modules.options.editor.spi.PreferencesCustomizer;
72
import org.netbeans.modules.options.editor.spi.PreferencesCustomizer;
73
import org.netbeans.modules.options.indentation.CustomizerSelector;
74
import org.netbeans.modules.options.indentation.FormattingPanel;
75
import org.netbeans.modules.options.indentation.FormattingPanelController;
76
import org.netbeans.modules.options.indentation.ProxyPreferences;
72
import org.netbeans.spi.project.ui.support.ProjectChooser;
77
import org.netbeans.spi.project.ui.support.ProjectChooser;
73
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
78
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
74
import org.openide.DialogDisplayer;
79
import org.openide.DialogDisplayer;
Lines 104-113 Link Here
104
     * @param attrs The map of <code>FileObject</code> attributes
109
     * @param attrs The map of <code>FileObject</code> attributes
105
     *
110
     *
106
     * @return A new 'Formatting' category provider.
111
     * @return A new 'Formatting' category provider.
107
     * @since 1.10
112
     * @since 1.0
113
     * @deprecated Use {@link Customizers#createFormattingCategoryProvider(java.util.Map) } instead.
108
     */
114
     */
115
    @Deprecated
109
    public static ProjectCustomizer.CompositeCategoryProvider createCategoryProvider(Map attrs) {
116
    public static ProjectCustomizer.CompositeCategoryProvider createCategoryProvider(Map attrs) {
110
        return new Factory((String)attrs.get("allowedMimeTypes")); //NOI18N
117
        return Customizers.createFormattingCategoryProvider(attrs);
111
    }
118
    }
112
119
113
    public static class Factory implements ProjectCustomizer.CompositeCategoryProvider {
120
    public static class Factory implements ProjectCustomizer.CompositeCategoryProvider {
Lines 241-247 Link Here
241
                    .add(loadButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
248
                    .add(loadButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
242
            .add(layout.createSequentialGroup()
249
            .add(layout.createSequentialGroup()
243
                .add(12, 12, 12)
250
                .add(12, 12, 12)
244
                .add(customizerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 490, Short.MAX_VALUE))
251
                .add(customizerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE))
245
        );
252
        );
246
        layout.setVerticalGroup(
253
        layout.setVerticalGroup(
247
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
254
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
(-)a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/ProjectAwareCodeStylePreferences.java (+252 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2010 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.editor.indent.project;
41
42
import java.lang.ref.Reference;
43
import java.lang.ref.WeakReference;
44
import java.util.HashMap;
45
import java.util.Map;
46
import java.util.WeakHashMap;
47
import java.util.logging.Logger;
48
import java.util.prefs.AbstractPreferences;
49
import java.util.prefs.PreferenceChangeEvent;
50
import java.util.prefs.PreferenceChangeListener;
51
import java.util.prefs.Preferences;
52
import javax.swing.text.Document;
53
import org.netbeans.api.editor.mimelookup.MimeLookup;
54
import org.netbeans.api.editor.mimelookup.MimePath;
55
import org.netbeans.api.project.FileOwnerQuery;
56
import org.netbeans.api.project.Project;
57
import org.netbeans.api.project.ProjectManager;
58
import org.netbeans.api.project.ProjectUtils;
59
import org.netbeans.modules.editor.indent.api.IndentUtils;
60
import org.netbeans.modules.editor.indent.spi.CodeStylePreferences;
61
import org.openide.filesystems.FileObject;
62
import org.openide.loaders.DataObject;
63
import org.openide.util.Utilities;
64
import org.openide.util.WeakListeners;
65
import org.openide.util.lookup.ServiceProvider;
66
67
/**
68
 *
69
 * @author vita
70
 */
71
@ServiceProvider(service=CodeStylePreferences.Provider.class)
72
public final class ProjectAwareCodeStylePreferences implements CodeStylePreferences.Provider {
73
74
    @Override
75
    public Preferences forFile(FileObject file, String mimeType) {
76
        return singleton.forFile(file, mimeType);
77
    }
78
79
    @Override
80
    public Preferences forDocument(Document doc, String mimeType) {
81
        return singleton.forDocument(doc, mimeType);
82
    }
83
84
    // ----------------------------------------------------------------------
85
    // private implementation
86
    // ----------------------------------------------------------------------
87
88
    private static final Logger LOG = Logger.getLogger(ProjectAwareCodeStylePreferences.class.getName());
89
    private static final CodeStylePreferences.Provider singleton = new CodeStylePreferences.Provider() {
90
91
        @Override
92
        public Preferences forFile(FileObject file, String mimeType) {
93
            return getCsp(file, mimeType).getPreferences();
94
        }
95
96
        @Override
97
        public Preferences forDocument(Document doc, String mimeType) {
98
            return getCsp(doc, mimeType).getPreferences();
99
        }
100
101
        // --------------------------------------------------------------------
102
        // private implementation
103
        // --------------------------------------------------------------------
104
105
        private final Map<Object, Map<String, Csp>> cache = new WeakHashMap<Object, Map<String, Csp>>();
106
107
        private Csp getCsp(final Object obj, final String mimeType) {
108
            synchronized (cache) {
109
                Map<String, Csp> csps = cache.get(obj);
110
                Csp csp = csps != null ? csps.get(mimeType) : null;
111
                if (csp == null) {
112
                    Document doc;
113
                    FileObject file;
114
115
                    if (obj instanceof FileObject) {
116
                        doc = null;
117
                        file = (FileObject) obj;
118
                    } else {
119
                        doc = (Document) obj;
120
                        file = findFileObject(doc);
121
                    }
122
123
                    csp = new Csp(
124
                            mimeType,
125
                            doc == null ? null : new CleaningWeakReference(doc),
126
                            file);
127
                    if (csps == null) {
128
                        csps = new HashMap<String, Csp>();
129
                        cache.put(obj, csps);
130
                    }
131
                    csps.put(mimeType, csp);
132
                }
133
134
                return csp;
135
            }
136
        }
137
138
        final class CleaningWeakReference extends WeakReference<Document> implements Runnable {
139
140
            public CleaningWeakReference(Document referent) {
141
                super(referent, Utilities.activeReferenceQueue());
142
            }
143
144
            public @Override void run() {
145
                synchronized (cache) {
146
                    //expunge stale entries from the cache:
147
                    cache.size();
148
                }
149
            }
150
151
        }
152
    };
153
154
    private static final class Csp {
155
156
        private static final String NODE_CODE_STYLE = "CodeStyle"; //NOI18N
157
        private static final String PROP_USED_PROFILE = "usedProfile"; // NOI18N
158
        private static final String DEFAULT_PROFILE = "default"; // NOI18N
159
        private static final String PROJECT_PROFILE = "project"; // NOI18N
160
161
        private final String mimeType;
162
        private final Reference<Document> refDoc;
163
        private final String filePath;
164
165
        private final Preferences globalPrefs;
166
        private Preferences projectPrefs;
167
        private boolean useProject;
168
169
        private final PreferenceChangeListener switchTrakcer = new PreferenceChangeListener() {
170
            public @Override void preferenceChange(PreferenceChangeEvent evt) {
171
                if (evt.getKey() == null || PROP_USED_PROFILE.equals(evt.getKey())) {
172
                    synchronized (Csp.this) {
173
                        useProject = PROJECT_PROFILE.equals(evt.getNewValue());
174
                        LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences"); //NOI18N
175
                    }
176
                }
177
            }
178
        };
179
180
        public Csp(String mimeType, Reference<Document> refDoc, final FileObject file) {
181
            this.mimeType = mimeType;
182
            this.refDoc = refDoc;
183
            this.filePath = file == null ? "no file" : file.getPath(); //NOI18N just for logging
184
185
            this.globalPrefs = MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class);
186
            this.projectPrefs = null;
187
            this.useProject = false;
188
189
            ProjectManager.mutex().postReadRequest(new Runnable() {
190
                public @Override void run() {
191
                    synchronized (Csp.this) {
192
                        Preferences projectRoot = findProjectPreferences(file);
193
                        if (projectRoot != null) {
194
                            Preferences allLangCodeStyle = projectRoot.node(NODE_CODE_STYLE);
195
                            Preferences p = allLangCodeStyle.node(PROJECT_PROFILE);
196
197
                            // determine if we are using code style preferences from the project
198
                            String usedProfile = allLangCodeStyle.get(PROP_USED_PROFILE, DEFAULT_PROFILE);
199
                            useProject = PROJECT_PROFILE.equals(usedProfile);
200
                            projectPrefs = Csp.this.mimeType == null ?
201
                                p :
202
                                new ProxyPreferences(projectRoot.node(Csp.this.mimeType).node(NODE_CODE_STYLE).node(PROJECT_PROFILE), p);
203
204
                            // listen on changes
205
                            allLangCodeStyle.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, switchTrakcer, allLangCodeStyle));
206
                        } else {
207
                            useProject = false;
208
                            projectPrefs = null;
209
                        }
210
                    }
211
                }
212
            });
213
214
            LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences; doc=" + s2s(refDoc == null ? null : refDoc.get())); //NOI18N
215
        }
216
        
217
        public Preferences getPreferences() {
218
            synchronized (this) {
219
                Preferences prefs = useProject ? projectPrefs : globalPrefs;
220
                // to support tests that don't use editor.mimelookup.impl
221
                return prefs == null ? AbstractPreferences.systemRoot() : prefs;
222
            }
223
        }
224
        
225
    } // End of Csp class
226
227
    private static Preferences findProjectPreferences(FileObject file) {
228
        if (file != null) {
229
            Project p = FileOwnerQuery.getOwner(file);
230
            if (p != null) {
231
                return ProjectUtils.getPreferences(p, IndentUtils.class, true);
232
            }
233
        }
234
        return null;
235
    }
236
237
    private static FileObject findFileObject(Document doc) {
238
        if (doc != null) {
239
            Object sdp = doc.getProperty(Document.StreamDescriptionProperty);
240
            if (sdp instanceof DataObject) {
241
                return ((DataObject) sdp).getPrimaryFile();
242
            } else if (sdp instanceof FileObject) {
243
                return (FileObject) sdp;
244
            }
245
        }
246
        return null;
247
    }
248
249
    private static String s2s(Object o) {
250
        return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o)); //NOI18N
251
    }
252
}
(-)a/editor.indent/src/org/netbeans/modules/editor/indent/ProxyPreferences.java (-1 / +1 lines)
Lines 37-43 Link Here
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
37
 * Portions Copyrighted 2008 Sun Microsystems, Inc.
38
 */
38
 */
39
39
40
package org.netbeans.modules.editor.indent;
40
package org.netbeans.modules.editor.indent.project;
41
41
42
import java.lang.reflect.Method;
42
import java.lang.reflect.Method;
43
import java.util.Arrays;
43
import java.util.Arrays;
(-)a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/api/Customizers.java (+75 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2010 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.editor.indent.project.api;
41
42
import java.util.Map;
43
import org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel.Factory;
44
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
45
46
/**
47
 *
48
 * @author Vita Stejskal
49
 */
50
public final class Customizers {
51
52
    private Customizers() {
53
        // no-op
54
    }
55
56
    /**
57
     * Creates an instance of the 'Formatting' category in the project properties dialog.
58
     * This method is meant to be used from XML layers by modules that wish to add
59
     * the 'Formatting' category to their project type's properties dialog.
60
     *
61
     * <p>The method recognizes 'allowedMimeTypes' XML layer attribute, which should
62
     * contain the comma separated list of mime types, which formatting settings
63
     * customizers should be made available for the project. If the attribute is
64
     * not specified all registered customizers are shown. If the attribute specifies
65
     * an empty list only the 'All Languages' customizer is shown.
66
     *
67
     * @param attrs The map of <code>FileObject</code> attributes
68
     *
69
     * @return A new 'Formatting' category provider.
70
     * @since 1.0
71
     */
72
    public static ProjectCustomizer.CompositeCategoryProvider createFormattingCategoryProvider(Map attrs) {
73
        return new Factory((String)attrs.get("allowedMimeTypes")); //NOI18N
74
    }
75
}
(-)a/editor.indent.project/test/unit/src/org/netbeans/modules/editor/indent/project/ProxyPreferencesTest.java (+60 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2010 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.editor.indent.project;
41
42
import org.netbeans.junit.NbTestCase;
43
import org.netbeans.junit.RandomlyFails;
44
45
/**
46
 *
47
 * @author vita
48
 */
49
public class ProxyPreferencesTest extends NbTestCase {
50
51
    public ProxyPreferencesTest(String name) {
52
        super(name);
53
    }
54
55
    @RandomlyFails
56
    public void testSomeMethod() {
57
        // dummy
58
    }
59
60
}
(-)a/editor.indent/apichanges.xml (+15 lines)
Lines 105-110 Link Here
105
105
106
    <changes>
106
    <changes>
107
107
108
        <change id="CodeStylePreferences.Provider">
109
            <summary>Adding CodeStylePreferences.Provider</summary>
110
            <version major="1" minor="18"/>
111
            <date day="17" month="2" year="2010"/>
112
            <author login="vstejskal"/>
113
            <compatibility addition="yes"/>
114
            <description>
115
                Adding <code>CodeStylePreferences.Provider</code> interface in order to allow
116
                isolating the project-dependent code style preferences storage from the rest
117
                of the editor infrastructure.
118
            </description>
119
            <class package="org.netbeans.modules.editor.indent.spi" name="CodeStylePreferences"/>
120
            <issue number="178311"/>
121
        </change>
122
108
        <change id="context.lookup">
123
        <change id="context.lookup">
109
            <summary>Enhance Context class with Lookup so that indenters
124
            <summary>Enhance Context class with Lookup so that indenters
110
                can communicate with each other.</summary>
125
                can communicate with each other.</summary>
(-)a/editor.indent/manifest.mf (+1 lines)
Lines 3-5 Link Here
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/indent/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/indent/Bundle.properties
4
OpenIDE-Module-Layer: org/netbeans/modules/editor/indent/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/editor/indent/resources/layer.xml
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
6
OpenIDE-Module-Recommends: org.netbeans.modules.editor.indent.spi.CodeStylePreferences.Provider
(-)a/editor.indent/nbproject/project.properties (-1 / +1 lines)
Lines 39-45 Link Here
39
39
40
javac.source=1.6
40
javac.source=1.6
41
javac.compilerargs=-Xlint:unchecked
41
javac.compilerargs=-Xlint:unchecked
42
spec.version.base=1.17.0
42
spec.version.base=1.18.0
43
43
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
(-)a/editor.indent/nbproject/project.xml (-9 lines)
Lines 92-106 Link Here
92
                    </run-dependency>
92
                    </run-dependency>
93
                </dependency>
93
                </dependency>
94
                <dependency>
94
                <dependency>
95
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
96
                    <build-prerequisite/>
97
                    <compile-dependency/>
98
                    <run-dependency>
99
                        <release-version>1</release-version>
100
                        <specification-version>1.17</specification-version>
101
                    </run-dependency>
102
                </dependency>
103
                <dependency>
104
                    <code-name-base>org.openide.filesystems</code-name-base>
95
                    <code-name-base>org.openide.filesystems</code-name-base>
105
                    <build-prerequisite/>
96
                    <build-prerequisite/>
106
                    <compile-dependency/>
97
                    <compile-dependency/>
(-)a/editor.indent/src/org/netbeans/modules/editor/indent/spi/CodeStylePreferences.java (-168 / +64 lines)
Lines 39-67 Link Here
39
39
40
package org.netbeans.modules.editor.indent.spi;
40
package org.netbeans.modules.editor.indent.spi;
41
41
42
import java.lang.ref.Reference;
43
import java.lang.ref.WeakReference;
44
import java.util.HashMap;
45
import java.util.Map;
46
import java.util.WeakHashMap;
47
import java.util.logging.Logger;
42
import java.util.logging.Logger;
48
import java.util.prefs.AbstractPreferences;
49
import java.util.prefs.PreferenceChangeEvent;
50
import java.util.prefs.PreferenceChangeListener;
51
import java.util.prefs.Preferences;
43
import java.util.prefs.Preferences;
52
import javax.swing.text.Document;
44
import javax.swing.text.Document;
53
import org.netbeans.api.editor.mimelookup.MimeLookup;
45
import org.netbeans.api.editor.mimelookup.MimeLookup;
54
import org.netbeans.api.editor.mimelookup.MimePath;
46
import org.netbeans.api.editor.mimelookup.MimePath;
55
import org.netbeans.api.project.FileOwnerQuery;
56
import org.netbeans.api.project.Project;
57
import org.netbeans.api.project.ProjectManager;
58
import org.netbeans.api.project.ProjectUtils;
59
import org.netbeans.modules.editor.indent.ProxyPreferences;
60
import org.netbeans.modules.editor.indent.api.IndentUtils;
61
import org.openide.filesystems.FileObject;
47
import org.openide.filesystems.FileObject;
62
import org.openide.loaders.DataObject;
48
import org.openide.util.Lookup;
63
import org.openide.util.Utilities;
64
import org.openide.util.WeakListeners;
65
49
66
/**
50
/**
67
 * Provides access to formatting settings for a document or file. The formatting
51
 * Provides access to formatting settings for a document or file. The formatting
Lines 118-126 Link Here
118
     */
102
     */
119
    public static CodeStylePreferences get(Document doc, String mimeType) {
103
    public static CodeStylePreferences get(Document doc, String mimeType) {
120
        if (doc != null) {
104
        if (doc != null) {
121
            return getPreferences(doc, mimeType);
105
            return new CodeStylePreferences(doc, mimeType);
122
        } else {
106
        } else {
123
            return getPreferences(null, null);
107
            return new CodeStylePreferences(null, null);
124
        }
108
        }
125
    }
109
    }
126
110
Lines 152-322 Link Here
152
     */
136
     */
153
    public static CodeStylePreferences get(FileObject file, String mimeType) {
137
    public static CodeStylePreferences get(FileObject file, String mimeType) {
154
        if (file != null) {
138
        if (file != null) {
155
            return getPreferences(file, mimeType); //NOI18N
139
            return new CodeStylePreferences(file, mimeType); //NOI18N
156
        } else {
140
        } else {
157
            return getPreferences(null, null);
141
            return new CodeStylePreferences(null, null);
158
        }
142
        }
159
    }
143
    }
160
144
161
    public Preferences getPreferences() {
145
    public Preferences getPreferences() {
162
        synchronized (this) {
146
        // This is here solely for the purpose of previewing changes in formatting settings
163
            // This is here solely for the purpose of previewing changes in formatting settings
147
        // in Tools-Options. This is NOT, repeat NOT, to be used by anybody else!
164
            // in Tools-Options. This is NOT, repeat NOT, to be used by anybody else!
148
        // The name of this property is also hardcoded in options.editor/.../IndentationPanel.java
165
            // The name of this property is also hardcoded in options.editor/.../IndentationPanel.java
149
        Document doc = docOrFile instanceof Document ? (Document) docOrFile : null;
166
            Document doc = refDoc == null ? null : refDoc.get();
150
        Object o = doc == null ? null : doc.getProperty("Tools-Options->Editor->Formatting->Preview - Preferences"); //NOI18N
167
            Object o = doc == null ? null : doc.getProperty("Tools-Options->Editor->Formatting->Preview - Preferences"); //NOI18N
151
        if (o instanceof Preferences) {
168
            if (o instanceof Preferences) {
152
            return (Preferences) o;
169
                return (Preferences) o;
153
        } else {
154
            Preferences prefs = null;
155
156
            Provider provider = Lookup.getDefault().lookup(Provider.class);
157
            if (provider == null) {
158
                provider = defaultProvider;
159
            }
160
161
            if (doc != null) {
162
                prefs = provider.forDocument(doc, mimeType);
170
            } else {
163
            } else {
171
                Preferences prefs = useProject ? projectPrefs : globalPrefs;
164
                prefs = provider.forFile((FileObject)docOrFile, mimeType);
172
                // to support tests that don't use editor.mimelookup.impl
173
                return prefs == null ? AbstractPreferences.systemRoot() : prefs;
174
            }
165
            }
166
167
            assert prefs != null : "provider=" + s2s(provider) + ", docOrFile=" + s2s(docOrFile) + ", mimeType='" + mimeType + "'"; //NOI18N
168
            return prefs;
175
        }
169
        }
176
    }
170
    }
177
    
171
178
    // ----------------------------------------------------------------------
172
    /**
179
    // private implementation
173
     * Code style preferences provider. This interface allows to implement your own
180
    // ----------------------------------------------------------------------
174
     * code style preferences storage. Implementations ought to be registered in the
181
    
175
     * default lookup (ie. through @ServiceProvider annotation).
176
     *
177
     * <p>Usual API clients do not have to be concerned about this. It was created
178
     * in order to seprate the project-dependent implementation of code style preferences
179
     * storage from the rest of the editor infrastructure.
180
     * 
181
     * @Since 1.18
182
     */
183
    public static interface Provider {
184
        Preferences forFile(FileObject file, String mimeType);
185
        Preferences forDocument(Document doc, String mimeType);
186
    }
187
188
    // ------------------------------------------------------------------------
189
    // Private implementation
190
    // ------------------------------------------------------------------------
191
182
    private static final Logger LOG = Logger.getLogger(CodeStylePreferences.class.getName());
192
    private static final Logger LOG = Logger.getLogger(CodeStylePreferences.class.getName());
183
    
184
    private static final String NODE_CODE_STYLE = "CodeStyle"; //NOI18N
185
    private static final String PROP_USED_PROFILE = "usedProfile"; // NOI18N
186
    private static final String DEFAULT_PROFILE = "default"; // NOI18N
187
    private static final String PROJECT_PROFILE = "project"; // NOI18N
188
193
189
    private static final Map<Object, Map<String, CodeStylePreferences>> cache = new WeakHashMap<Object, Map<String, CodeStylePreferences>>();
194
    private final Object docOrFile;
190
    
191
    private final String mimeType;
195
    private final String mimeType;
192
    private final Reference<Document> refDoc;
193
    private final String filePath;
194
    
195
    private final Preferences globalPrefs;
196
    private Preferences projectPrefs;
197
    private boolean useProject;
198
196
199
    private final PreferenceChangeListener switchTrakcer = new PreferenceChangeListener() {
197
    private CodeStylePreferences(Object docOrFile, String mimeType) {
200
        public void preferenceChange(PreferenceChangeEvent evt) {
198
        this.docOrFile = docOrFile;
201
            if (evt.getKey() == null || PROP_USED_PROFILE.equals(evt.getKey())) {
199
        this.mimeType = mimeType;
202
                synchronized (this) {
200
    }
203
                    useProject = PROJECT_PROFILE.equals(evt.getNewValue());
201
204
                    LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences"); //NOI18N
202
    private static final Provider defaultProvider = new Provider() {
205
                }
203
206
            }
204
        @Override
205
        public Preferences forFile(FileObject file, String mimeType) {
206
            return MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class);
207
        }
208
209
        @Override
210
        public Preferences forDocument(Document doc, String mimeType) {
211
            return MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class);
207
        }
212
        }
208
    };
213
    };
209
    
210
    private static CodeStylePreferences getPreferences(final Object obj, final String mimeType) {
211
//        return ProjectManager.mutex().readAccess(new Mutex.Action<CodeStylePreferences>() {
212
//            public CodeStylePreferences run() {
213
                synchronized (cache) {
214
                    Map<String, CodeStylePreferences> csps = cache.get(obj);
215
                    CodeStylePreferences csp = csps != null ? csps.get(mimeType) : null;
216
                    if (csp == null) {
217
                        Document doc;
218
                        FileObject file;
219
220
                        if (obj instanceof FileObject) {
221
                            doc = null;
222
                            file = (FileObject) obj;
223
                        } else {
224
                            doc = (Document) obj;
225
                            file = findFileObject(doc);
226
                        }
227
228
                        csp = new CodeStylePreferences(
229
                                mimeType,
230
                                doc == null ? null : new CleaningWeakReference(doc),
231
                                file);
232
                        if (csps == null) {
233
                            csps = new HashMap<String, CodeStylePreferences>();
234
                            cache.put(obj, csps);
235
                        }
236
                        csps.put(mimeType, csp);
237
                    }
238
239
                    return csp;
240
                }
241
//            }
242
//        });
243
    }
244
245
    private static final class CleaningWeakReference extends WeakReference<Document> implements Runnable {
246
247
        public CleaningWeakReference(Document referent) {
248
            super(referent, Utilities.activeReferenceQueue());
249
        }
250
251
        public void run() {
252
            synchronized (cache) {
253
                //expunge stale entries from the cache:
254
                cache.size();
255
            }
256
        }
257
        
258
    }
259
260
    private CodeStylePreferences(String mimeType, Reference<Document> refDoc, final FileObject file) {
261
        this.mimeType = mimeType;
262
        this.refDoc = refDoc;
263
        this.filePath = file == null ? "no file" : file.getPath(); //NOI18N just for logging
264
265
        this.globalPrefs = MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class);
266
        this.projectPrefs = null;
267
        this.useProject = false;
268
269
        ProjectManager.mutex().postReadRequest(new Runnable() {
270
            public void run() {
271
                synchronized (CodeStylePreferences.this) {
272
                    Preferences projectRoot = findProjectPreferences(file);
273
                    if (projectRoot != null) {
274
                        Preferences allLangCodeStyle = projectRoot.node(NODE_CODE_STYLE);
275
                        Preferences p = allLangCodeStyle.node(PROJECT_PROFILE);
276
277
                        // determine if we are using code style preferences from the project
278
                        String usedProfile = allLangCodeStyle.get(PROP_USED_PROFILE, DEFAULT_PROFILE);
279
                        useProject = PROJECT_PROFILE.equals(usedProfile);
280
                        projectPrefs = CodeStylePreferences.this.mimeType == null ?
281
                            p :
282
                            new ProxyPreferences(projectRoot.node(CodeStylePreferences.this.mimeType).node(NODE_CODE_STYLE).node(PROJECT_PROFILE), p);
283
284
                        // listen on changes
285
                        allLangCodeStyle.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, switchTrakcer, allLangCodeStyle));
286
                    } else {
287
                        useProject = false;
288
                        projectPrefs = null;
289
                    }
290
                }
291
            }
292
        });
293
294
        LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences; doc=" + s2s(refDoc == null ? null : refDoc.get())); //NOI18N
295
    }
296
    
297
    private static final Preferences findProjectPreferences(FileObject file) {
298
        if (file != null) {
299
            Project p = FileOwnerQuery.getOwner(file);
300
            if (p != null) {
301
                return ProjectUtils.getPreferences(p, IndentUtils.class, true);
302
            }
303
        }
304
        return null;
305
    }
306
307
    private static final FileObject findFileObject(Document doc) {
308
        if (doc != null) {
309
            Object sdp = doc.getProperty(Document.StreamDescriptionProperty);
310
            if (sdp instanceof DataObject) {
311
                return ((DataObject) sdp).getPrimaryFile();
312
            } else if (sdp instanceof FileObject) {
313
                return (FileObject) sdp;
314
            }
315
        }
316
        return null;
317
    }
318
214
319
    private static String s2s(Object o) {
215
    private static String s2s(Object o) {
320
        return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o));
216
        return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o)); //NOI18N
321
    }
217
    }
322
}
218
}
(-)a/nbbuild/cluster.properties (+1 lines)
Lines 303-308 Link Here
303
        editor.fold,\
303
        editor.fold,\
304
        editor.guards,\
304
        editor.guards,\
305
        editor.indent,\
305
        editor.indent,\
306
        editor.indent.project,\
306
        editor.kit,\
307
        editor.kit,\
307
        editor.lib,\
308
        editor.lib,\
308
        editor.lib2,\
309
        editor.lib2,\
(-)a/options.editor/apichanges.xml (+16 lines)
Lines 107-112 Link Here
107
<!-- ACTUAL CHANGES BEGIN HERE: -->
107
<!-- ACTUAL CHANGES BEGIN HERE: -->
108
108
109
  <changes>
109
  <changes>
110
  <change id="FormattingCustomizerPanel.moved">
111
      <api name="spi"/>
112
      <summary>Moving FormattingCustomizerPanel to editor.indent.project module</summary>
113
      <version major="1" minor="19"/>
114
      <date day="17" month="2" year="2010"/>
115
      <author login="vstejskal"/>
116
      <compatibility source="incompatible" binary="compatible" deletion="yes" addition="no" modification="no"/>
117
      <description>
118
        <p>
119
            Moving <code>FormattingCustomizerPanel</code> class to <code>editor.indent.project</code> module.
120
        </p>
121
      </description>
122
      <class package="org.netbeans.modules.options.indentation" name="FormattingCustomizerPanel"/>
123
      <issue number="178311"/>
124
  </change>
125
110
  <change id="project.formatting.category.provider">
126
  <change id="project.formatting.category.provider">
111
      <api name="spi"/>
127
      <api name="spi"/>
112
      <summary>Adding 'allowedMimeTypes' filter to the project formatting settings customizer</summary>
128
      <summary>Adding 'allowedMimeTypes' filter to the project formatting settings customizer</summary>
(-)a/options.editor/manifest.mf (-1 / +1 lines)
Lines 2-7 Link Here
2
OpenIDE-Module: org.netbeans.modules.options.editor/1
2
OpenIDE-Module: org.netbeans.modules.options.editor/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/editor/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/editor/Bundle.properties
4
OpenIDE-Module-Layer: org/netbeans/modules/options/editor/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/options/editor/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 1.18
5
OpenIDE-Module-Specification-Version: 1.19
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
7
7
(-)a/options.editor/module-auto-deps.xml (+60 lines)
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-2009 Sun Microsystems, Inc. All rights reserved.
6
7
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License.  When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
25
26
Contributor(s):
27
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
31
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
42
-->
43
44
<!DOCTYPE transformations PUBLIC "-//NetBeans//DTD Module Automatic Dependencies 1.0//EN" "http://www.netbeans.org/dtds/module-auto-deps-1_0.dtd">
45
46
<transformations version="1.0">
47
    <transformationgroup>
48
        <description>#178311: Separate project-related stuff from the rest of the editor infrastructure</description>
49
        <transformation>
50
            <trigger-dependency type="older">
51
                <module-dependency codenamebase="org.netbeans.modules.options.editor" major="1" spec="1.19"/>
52
            </trigger-dependency>
53
            <implies>
54
                <result>
55
                    <module-dependency codenamebase="org.netbeans.modules.editor.indent.project" major="0" spec="1.0"/>
56
                </result>
57
            </implies>
58
        </transformation>
59
    </transformationgroup>
60
</transformations>
(-)a/options.editor/nbproject/project.xml (-18 / +2 lines)
Lines 145-168 Link Here
145
                    </run-dependency>
145
                    </run-dependency>
146
                </dependency>
146
                </dependency>
147
                <dependency>
147
                <dependency>
148
                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
149
                    <build-prerequisite/>
150
                    <compile-dependency/>
151
                    <run-dependency>
152
                        <release-version>1</release-version>
153
                        <specification-version>1.19</specification-version>
154
                    </run-dependency>
155
                </dependency>
156
                <dependency>
157
                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
158
                    <build-prerequisite/>
159
                    <compile-dependency/>
160
                    <run-dependency>
161
                        <release-version>1</release-version>
162
                        <specification-version>1.31</specification-version>
163
                    </run-dependency>
164
                </dependency>
165
                <dependency>
166
                    <code-name-base>org.openide.actions</code-name-base>
148
                    <code-name-base>org.openide.actions</code-name-base>
167
                    <build-prerequisite/>
149
                    <build-prerequisite/>
168
                    <compile-dependency/>
150
                    <compile-dependency/>
Lines 373-378 Link Here
373
                <friend>org.netbeans.modules.cnd.completion</friend>
355
                <friend>org.netbeans.modules.cnd.completion</friend>
374
                <friend>org.netbeans.modules.cnd.editor</friend>
356
                <friend>org.netbeans.modules.cnd.editor</friend>
375
                <friend>org.netbeans.modules.diff</friend>
357
                <friend>org.netbeans.modules.diff</friend>
358
                <friend>org.netbeans.modules.editor.indent.project</friend>
376
                <friend>org.netbeans.modules.groovy.grailsproject</friend>
359
                <friend>org.netbeans.modules.groovy.grailsproject</friend>
377
                <friend>org.netbeans.modules.html.editor</friend>
360
                <friend>org.netbeans.modules.html.editor</friend>
378
                <friend>org.netbeans.modules.j2ee.clientproject</friend>
361
                <friend>org.netbeans.modules.j2ee.clientproject</friend>
Lines 395-400 Link Here
395
                <package>org.netbeans.modules.options.colors</package>
378
                <package>org.netbeans.modules.options.colors</package>
396
                <package>org.netbeans.modules.options.colors.spi</package>
379
                <package>org.netbeans.modules.options.colors.spi</package>
397
                <package>org.netbeans.modules.options.editor.spi</package>
380
                <package>org.netbeans.modules.options.editor.spi</package>
381
                <package>org.netbeans.modules.options.indentation</package>
398
            </friend-packages>
382
            </friend-packages>
399
        </data>
383
        </data>
400
    </configuration>
384
    </configuration>
(-)a/options.editor/src/META-INF/netbeans/translate.names (+1 lines)
Line 0 Link Here
1
org.netbeans.modules.options.indentation.FormattingCustomizerPanel=org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel
(-)a/options.editor/src/org/netbeans/modules/options/indentation/Bundle.properties (-20 lines)
Lines 73-91 Link Here
73
AD_Preview=Preview
73
AD_Preview=Preview
74
MSG_no_preview_available=Preview not available
74
MSG_no_preview_available=Preview not available
75
75
76
#FormattingCustomizerPanel
77
LBL_CategoryFormatting=Formatting
78
LBL_FormattingCustomizer_Global=Use &global options
79
LBL_FormattingCustomizer_Project=Use &project specific options
80
LBL_FormattingCustomizer_EditGlobal=&Edit global options
81
LBL_ForamttingCustomizer_Load=Load from &other project
82
83
# Messages in FormattingCustomizerPanel
84
MSG_CodeStyle_Import_Forbidden_From_The_Same_Project=Loading formatting settings from the same project is not allowed.
85
MSG_No_CodeStyle_Info_To_Import=The project you chose contains no formatting settings.
86
MSG_CodeStyle_Import_Successful=The formatting settings were successfully imported.
87
MSG_CodeStyle_Import_Failed=Importing the formatting settings failed.
88
89
#TabsAndIndentsPanel
76
#TabsAndIndentsPanel
90
#LBL_ExpandTabToSpaces=&Expand Tab to Spaces
77
#LBL_ExpandTabToSpaces=&Expand Tab to Spaces
91
#LBL_TabSize=&Tab Size:
78
#LBL_TabSize=&Tab Size:
Lines 94-110 Link Here
94
LBL_AllLanguages=All Languages
81
LBL_AllLanguages=All Languages
95
#LBL_TabsAndIndents=Tabs and Indents
82
#LBL_TabsAndIndents=Tabs and Indents
96
83
97
#FormattingCustomizerPanel
98
MSG_use_global_settings_confirmation=This will remove all formatting settings and their customizations from this project. Do you want to proceed?
99
MSG_use_global_settings_confirmation_title=Use global formatting settings
100
FormattingPanel.languageCombo.AccessibleContext.accessibleDescription=Language list.
84
FormattingPanel.languageCombo.AccessibleContext.accessibleDescription=Language list.
101
FormattingPanel.languageCombo.AccessibleContext.accessibleName=Language
85
FormattingPanel.languageCombo.AccessibleContext.accessibleName=Language
102
FormattingPanel.categoryCombo.AccessibleContext.accessibleDescription=Category list.
86
FormattingPanel.categoryCombo.AccessibleContext.accessibleDescription=Category list.
103
FormattingPanel.categoryCombo.AccessibleContext.accessibleName=Category
87
FormattingPanel.categoryCombo.AccessibleContext.accessibleName=Category
104
FormattingCustomizerPanel.editGlobalButton.AccessibleContext.accessibleDescription=Edit global options
105
FormattingCustomizerPanel.loadButton.AccessibleContext.accessibleDescription=Load from other project
106
FormattingCustomizerPanel.globalButton.AccessibleContext.accessibleDescription=Use global options
107
FormattingCustomizerPanel.projectButton.AccessibleContext.accessibleDescription=Use project specific options
108
AD_Language=Language
88
AD_Language=Language
109
AD_Category=Category
89
AD_Category=Category
110
90

Return to bug 178311