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

(-)editor.codetemplates/apichanges.xml (+18 lines)
 Lines 108-113    Link Here 
108
    <!-- ACTUAL CHANGES BEGIN HERE: -->
108
    <!-- ACTUAL CHANGES BEGIN HERE: -->
109
109
110
    <changes>
110
    <changes>
111
        <change id="ContextBasedFactory">
112
             <api name="codetemplates"/>
113
             <summary>Added <code>CodeTemplateFilter.ContextBasedFactory</code>.</summary>
114
             <version major="1" minor="34"/>
115
             <date day="3" month="5" year="2013"/>
116
             <author login="dbalek"/>
117
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
118
             <description>
119
                 Added interface <code>CodeTemplateFilter.ContextBasedFactory</code>
120
                 with the <code>getSupportedContexts()</code> method as an extension
121
                 to the exisitng <code>CodeTemplateFilter.Factory</code>
122
                 that allows for specifying all the possible context values
123
                 valid for the given language (supported by the particular
124
                 CodeTemplateFilters that the factory creates).
125
             </description>
126
             <class package="org.netbeans.lib.editor.codetemplates.spi" name="CodeTemplateFilter.ContextBasedFactory"/>
127
             <issue number="160771"/>
128
        </change>
111
129
112
        <change>
130
        <change>
113
            <api name="codetemplates"/>
131
            <api name="codetemplates"/>
(-)editor.codetemplates/nbproject/project.properties (-1 / +1 lines)
 Lines 45-50    Link Here 
45
#javadoc.name=EditorCodeTemplates
45
#javadoc.name=EditorCodeTemplates
46
javadoc.apichanges=${basedir}/apichanges.xml
46
javadoc.apichanges=${basedir}/apichanges.xml
47
javadoc.arch=${basedir}/arch.xml
47
javadoc.arch=${basedir}/arch.xml
48
spec.version.base=1.33.0
48
spec.version.base=1.34.0
49
49
50
test.config.stableBTD.includes=**/*Test.class
50
test.config.stableBTD.includes=**/*Test.class
(-)editor.codetemplates/src/org/netbeans/lib/editor/codetemplates/spi/CodeTemplateFilter.java (+19 lines)
 Lines 44-49    Link Here 
44
44
45
package org.netbeans.lib.editor.codetemplates.spi;
45
package org.netbeans.lib.editor.codetemplates.spi;
46
46
47
import java.util.List;
47
import javax.swing.text.JTextComponent;
48
import javax.swing.text.JTextComponent;
48
import org.netbeans.lib.editor.codetemplates.api.CodeTemplate;
49
import org.netbeans.lib.editor.codetemplates.api.CodeTemplate;
49
import org.netbeans.spi.editor.mimelookup.MimeLocation;
50
import org.netbeans.spi.editor.mimelookup.MimeLocation;
 Lines 80-85    Link Here 
80
         * @return non-null code template filter instance.
81
         * @return non-null code template filter instance.
81
         */
82
         */
82
        CodeTemplateFilter createFilter(JTextComponent component, int offset);
83
        CodeTemplateFilter createFilter(JTextComponent component, int offset);
84
    }
85
    
86
    /**
87
     * Factory for producing of the code template filters that filter templates
88
     * based on their contexts.
89
     * <br/>
90
     * It should be registered in the MimeLookup for a given mime-type.
91
     * 
92
     * @since 1.34
93
     */
94
    @MimeLocation(subfolderName="CodeTemplateFilterFactories")
95
    public interface ContextBasedFactory extends Factory {
83
        
96
        
97
        /**
98
         * Get the list of all code template contexts supported by filters
99
         * created by the factory.
100
         * @return non-null list of supported contexts.
101
         */
102
        List<String> getSupportedContexts();
84
    }
103
    }
85
}
104
}

Return to bug 160771
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