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

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

(-)8c3a3587e223 (+169 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?><!-- -*- sgml-indent-step: 2 -*- -->
2
<!--
3
   - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
   -
5
   - Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
6
   -
7
   - The contents of this file are subject to the terms of either the GNU
8
   - General Public License Version 2 only ("GPL") or the Common
9
   - Development and Distribution License("CDDL") (collectively, the
10
   - "License"). You may not use this file except in compliance with the
11
   - License. You can obtain a copy of the License at
12
   - http://www.netbeans.org/cddl-gplv2.html
13
   - or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
14
   - specific language governing permissions and limitations under the
15
   - License.  When distributing the software, include this License Header
16
   - Notice in each file and include the License file at
17
   - nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
18
   - particular file as subject to the "Classpath" exception as provided
19
   - by Sun in the GPL Version 2 section of the License file that
20
   - accompanied this code. If applicable, add the following below the
21
   - License Header, with the fields enclosed by brackets [] replaced by
22
   - your own identifying information:
23
   - "Portions Copyrighted [year] [name of copyright owner]"
24
   -
25
   - Contributor(s):
26
   -
27
   - The Original Software is NetBeans. The Initial Developer of the Original
28
   - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
29
   - Microsystems, Inc. All Rights Reserved.
30
   -
31
   - If you wish your version of this file to be governed by only the CDDL
32
   - or only the GPL Version 2, indicate your decision by adding
33
   - "[Contributor] elects to include this software in this distribution
34
   - under the [CDDL or GPL Version 2] license." If you do not indicate a
35
   - single choice of license, a recipient has the option to distribute
36
   - your version of this file under either the CDDL, the GPL Version 2 or
37
   - to extend the choice of license to its licensees as provided above.
38
   - However, if you add GPL Version 2 code and therefore, elected the GPL
39
   - Version 2 license, then the option applies only if the new code is
40
   - made subject to such option by the copyright holder.
41
  -->
42
<?xml-stylesheet type="text/xml" href="../nbbuild/javadoctools/apichanges.xsl"?>
43
<!DOCTYPE apichanges PUBLIC
44
	"-//NetBeans//DTD API changes list 1.0//EN"
45
        "../nbbuild/javadoctools/apichanges.dtd"
46
>
47
48
<!--
49
50
INFO FOR PEOPLE ADDING CHANGES:
51
52
Check the DTD (apichanges.dtd) for details on the syntax. You do not
53
need to regenerate the HTML, this will be done periodically; just
54
change the XML. If you can, validate the XML against the DTD, if not
55
do not worry about it. Rough syntax of a change (several parts optional):
56
57
<change>
58
    <api name="compiler"/>
59
    <summary>Some brief description here, can use <b>XHTML</b></summary>
60
    <version major="1" minor="99"/>
61
    <date day="13" month="6" year="2001"/>
62
    <author login="jrhacker"/>
63
    <compatibility addition="yes"/>
64
    <description>
65
        The main description of the change here.
66
        Again can use full <b>XHTML</b> as needed.
67
    </description>
68
    <class package="org.openide.compiler" name="DoWhatIWantCompiler"/>
69
    <issue number="14309"/>
70
</change>
71
72
Also permitted elements: <package>, <branch>. <version> is API spec
73
version, recommended for all new changes. <compatibility> should say
74
if things were added/modified/deprecated/etc. and give all information
75
related to upgrading old code. List affected top-level classes and
76
link to issue numbers if applicable. See the DTD for more details.
77
78
Changes need not be in any particular order, they are sorted in various
79
ways by the stylesheet anyway.
80
81
Dates are assumed to mean "on the trunk". If you *also* make the same
82
change on a stabilization branch, use the <branch> tag to indicate this
83
and explain why the change was made on a branch in the <description>.
84
85
Please only change this file on the trunk! Rather: you can change it
86
on branches if you want, but these changes will be ignored; only the
87
trunk version of this file is important.
88
89
Deprecations do not count as incompatible, assuming that code using the
90
deprecated calls continues to see their documented behavior. But do
91
specify deprecation="yes" in <compatibility>.
92
93
This file is not a replacement for Javadoc: it is intended to list changes,
94
not describe the complete current behavior, for which ordinary documentation
95
is the proper place.
96
97
-->
98
99
<apichanges>
100
101
  <!-- First, a list of API names you may use: -->
102
  <apidefs>
103
    <!-- org.netbeans.api.editor.fold -->
104
    <apidef name="api">Fold API</apidef>
105
    <!-- org.netbeans.spi.editor.fold -->
106
    <apidef name="spi">Fold SPI</apidef>
107
  </apidefs>
108
109
<!-- ACTUAL CHANGES BEGIN HERE: -->
110
111
  <changes>
112
  <change id="FoldOperation-owns-added">
113
      <api name="api"/>
114
      <summary>FoldOperation.owns(Fold) added</summary>
115
      <version major="1" minor="8"/>
116
      <date day="3" month="3" year="2008"/>
117
      <author login="mmetelka"/>
118
      <compatibility source="compatible" binary="compatible" semantic="compatible" deletion="no" addition="yes" modification="no"/>
119
      <description>
120
        <p>
121
            Added FoldOperation.owns(Fold) to check whether fold was produced
122
            by a particular FoldOperation.
123
        </p>
124
      </description>
125
      <issue number="108030"/>
126
  </change>
127
  </changes>
128
129
  <htmlcontents>
130
<!--
131
132
                            NO NO NO NO NO!
133
134
         ==============>    DO NOT EDIT ME!  <======================
135
136
          AUTOMATICALLY GENERATED FROM APICHANGES.XML, DO NOT EDIT
137
138
                SEE editor/fold/apichanges.xml
139
140
-->
141
    <head>
142
      <title>Fold API Changes by Date</title>
143
      <link rel="stylesheet" href="http://www.netbeans.org/netbeans.css" type="text/css"/>
144
      <meta name="CATEGORY" content="OtherDevelopmentDoc"/>
145
      <meta name="DESCRIPTION" content="A cross-indexed list of all changes made to the Fold API."/>
146
    </head>
147
    <body>
148
149
<h1>Introduction</h1>
150
151
<h2>What do the Dates Mean?</h2>
152
153
<p>The supplied dates indicate when the API change was made, on the CVS
154
trunk. From this you can generally tell whether the change should be
155
present in a given build or not; for trunk builds, simply whether it
156
was made before or after the change; for builds on a stabilization
157
branch, whether the branch was made before or after the given date. In
158
some cases corresponding API changes have been made both in the trunk
159
and in an in-progress stabilization branch, if they were needed for a
160
bug fix; this ought to be marked in this list.</p>
161
162
<!-- The actual lists of changes, as summaries and details: -->
163
164
      <hr/><standard-changelists module-code-name="org.netbeans.modules.editor.fold/1"/>
165
166
    </body>
167
  </htmlcontents>
168
169
</apichanges>
(-)a/editor.fold/manifest.mf (-1 / +1 lines)
Lines 1-5 Manifest-Version: 1.0 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.editor.fold/1
2
OpenIDE-Module: org.netbeans.modules.editor.fold/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/fold/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/fold/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.7
4
OpenIDE-Module-Specification-Version: 1.8
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
(-)a/editor.fold/nbproject/project.properties (+1 lines)
Lines 38-42 Link Here
38
# made subject to such option by the copyright holder.
38
# made subject to such option by the copyright holder.
39
39
40
javadoc.arch=${basedir}/arch.xml
40
javadoc.arch=${basedir}/arch.xml
41
javadoc.apichanges=${basedir}/apichanges.xml
41
#javadoc.base=../../../editor/fold
42
#javadoc.base=../../../editor/fold
42
#cp.extra=
43
#cp.extra=
(-)a/editor.fold/src/org/netbeans/spi/editor/fold/FoldOperation.java (+12 lines)
Lines 45-50 import org.netbeans.api.editor.fold.Fold Link Here
45
import org.netbeans.api.editor.fold.Fold;
45
import org.netbeans.api.editor.fold.Fold;
46
import org.netbeans.api.editor.fold.FoldHierarchy;
46
import org.netbeans.api.editor.fold.FoldHierarchy;
47
import org.netbeans.api.editor.fold.FoldType;
47
import org.netbeans.api.editor.fold.FoldType;
48
import org.netbeans.modules.editor.fold.ApiPackageAccessor;
48
import org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl;
49
import org.netbeans.modules.editor.fold.FoldHierarchyTransactionImpl;
49
import org.netbeans.modules.editor.fold.FoldOperationImpl;
50
import org.netbeans.modules.editor.fold.FoldOperationImpl;
50
import org.netbeans.modules.editor.fold.SpiPackageAccessor;
51
import org.netbeans.modules.editor.fold.SpiPackageAccessor;
Lines 179-184 public final class FoldOperation { Link Here
179
    }
180
    }
180
    
181
    
181
    /**
182
    /**
183
     * Check whether this fold operation has produced the given fold.
184
     * 
185
     * @param fold non-null fold.
186
     * @return true if this fold operation produced the given fold (by its <code>addToHierarchy()</code> method)
187
     *   or false otherwise.
188
     */
189
    public boolean owns(Fold fold) {
190
        return (ApiPackageAccessor.get().foldGetOperation(fold) == impl);
191
    }
192
    
193
    /**
182
     * Return extra info object passed to fold at time of its creation.
194
     * Return extra info object passed to fold at time of its creation.
183
     *
195
     *
184
     * @return extra information object specific for the fold
196
     * @return extra information object specific for the fold
(-)a/editor.fold/test/unit/src/org/netbeans/modules/editor/fold/SimpleFoldManagerTest.java (-1 / +4 lines)
Lines 117-123 public class SimpleFoldManagerTest exten Link Here
117
        
117
        
118
        public void initFolds(FoldHierarchyTransaction transaction) {
118
        public void initFolds(FoldHierarchyTransaction transaction) {
119
            try {
119
            try {
120
                getOperation().addToHierarchy(
120
                Fold fold = getOperation().addToHierarchy(
121
                    REGULAR_FOLD_TYPE,
121
                    REGULAR_FOLD_TYPE,
122
                    "...", // non-null to properly count fold's size (non-null desc gets set) // NOI18N
122
                    "...", // non-null to properly count fold's size (non-null desc gets set) // NOI18N
123
                    false,
123
                    false,
Lines 125-130 public class SimpleFoldManagerTest exten Link Here
125
                    null,
125
                    null,
126
                    transaction
126
                    transaction
127
                );
127
                );
128
129
                assertTrue(getOperation().owns(fold));
130
128
            } catch (BadLocationException e) {
131
            } catch (BadLocationException e) {
129
                e.printStackTrace();
132
                e.printStackTrace();
130
                fail();
133
                fail();

Return to bug 108030