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 217730
Collapse All | Expand All

(-)a/editor.bracesmatching/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
        
111
        <change id="brace.context">
112
            <summary>Semantic context can be provided for a brace</summary>
113
            <version major="1" minor="30"/>
114
            <date day="6" month="5" year="2013"/>
115
            <author login="sdedic"/>
116
            <compatibility addition="yes" binary="compatible" source="compatible" semantic="compatible"/>
117
            <description>
118
                The brace tooltip may need to display additional text, if for example if-condition spans multiple lines,
119
                or for an else-branch, where the important information (if-condition text) is located elsewhere. BraceMatcher
120
                can implement the optional mixin BraceMatcher.ContextLocator and provide boundaries for this additional text.
121
            </description>
122
            <class package="org.netbeans.spi.editor.bracesmatching" name="BracesMatcher"/>
123
            <class package="org.netbeans.spi.editor.bracesmatching" name="BraceContext"/>
124
            <issue number="217730"/>
125
        </change>
110
126
111
        <change id="document.locking.changed">
127
        <change id="document.locking.changed">
112
            <summary>Document locking changed</summary>
128
            <summary>Document locking changed</summary>
(-)a/editor.bracesmatching/nbproject/project.properties (-1 / +1 lines)
Lines 3-9 Link Here
3
javadoc.arch=${basedir}/arch.xml
3
javadoc.arch=${basedir}/arch.xml
4
javadoc.apichanges=${basedir}/apichanges.xml
4
javadoc.apichanges=${basedir}/apichanges.xml
5
5
6
spec.version.base=1.29.0
6
spec.version.base=1.30.0
7
test.config.stableBTD.includes=**/*Test.class
7
test.config.stableBTD.includes=**/*Test.class
8
test.config.stableBTD.excludes=\
8
test.config.stableBTD.excludes=\
9
    **/MasterMatcherTest.class
9
    **/MasterMatcherTest.class
(-)a/editor.bracesmatching/src/org/netbeans/spi/editor/bracesmatching/BracesMatcher.java (+21 lines)
Lines 44-49 Link Here
44
package org.netbeans.spi.editor.bracesmatching;
44
package org.netbeans.spi.editor.bracesmatching;
45
45
46
import javax.swing.text.BadLocationException;
46
import javax.swing.text.BadLocationException;
47
import javax.swing.text.Position;
47
48
48
/**
49
/**
49
 * The common interface for all matchers. Implementations of this interface
50
 * The common interface for all matchers. Implementations of this interface
Lines 168-171 Link Here
168
     * @throws javax.swing.text.BadLocationException If a document operation fails.
169
     * @throws javax.swing.text.BadLocationException If a document operation fails.
169
     */
170
     */
170
    public int [] findMatches() throws InterruptedException, BadLocationException;
171
    public int [] findMatches() throws InterruptedException, BadLocationException;
172
    
173
    /**
174
     * Mixin interface, which provides context ranges for brace matches.
175
     * The interface is expected to be implemented on the {@link BracesMatcher} instances
176
     * produced by {@link BracesMatcherFactory}. If implemented, the infrastructure may
177
     * call the method to obtain additional context for display along with brace highlight. 
178
     * See the {@link BraceContext} for more information.
179
     */
180
    public interface ContextLocator {
181
        /**
182
         * Obtains context for the given text position. At this moment, only start offset
183
         * of the origin will be passed in, but the implementation should be prepared to
184
         * handle (or ignore) each of the starting offsets reported by {@link #findOrigin()} or 
185
         * {@link #findMatches()}.
186
         * 
187
         * @param originOrMatchPosition position of 'origin' or 'match' brace
188
         * @return context information or {@code null} if the context cannot be provided.
189
         */
190
        public BraceContext findContext(int originOrMatchPosition);
191
    }
171
}
192
}

Return to bug 217730