Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 178311 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 178311
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo