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.
<!-- ACTUAL CHANGES BEGIN HERE: -->
<changes>
<change id="ContextBasedFactory">
<api name="codetemplates"/>
<summary>Added <code>CodeTemplateFilter.ContextBasedFactory</code>.</summary>
<version major="1" minor="34"/>
<date day="3" month="5" year="2013"/>
<author login="dbalek"/>
<compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
<description>
Added interface <code>CodeTemplateFilter.ContextBasedFactory</code>
with the <code>getSupportedContexts()</code> method as an extension
to the exisitng <code>CodeTemplateFilter.Factory</code>
that allows for specifying all the possible context values
valid for the given language (supported by the particular
CodeTemplateFilters that the factory creates).
</description>
<class package="org.netbeans.lib.editor.codetemplates.spi" name="CodeTemplateFilter.ContextBasedFactory"/>
<issue number="160771"/>
</change>
<change>
#javadoc.name=EditorCodeTemplates
javadoc.apichanges=${basedir}/apichanges.xml
javadoc.arch=${basedir}/arch.xml
spec.version.base=1.33.0
spec.version.base=1.34.0
test.config.stableBTD.includes=**/*Test.class
package org.netbeans.lib.editor.codetemplates.spi;
import java.util.List;
import javax.swing.text.JTextComponent;
import org.netbeans.lib.editor.codetemplates.api.CodeTemplate;
import org.netbeans.spi.editor.mimelookup.MimeLocation;
* @return non-null code template filter instance.
*/
CodeTemplateFilter createFilter(JTextComponent component, int offset);
}
/**
* Factory for producing of the code template filters that filter templates
* based on their contexts.
* <br/>
* It should be registered in the MimeLookup for a given mime-type.
*
* @since 1.34
@MimeLocation(subfolderName="CodeTemplateFilterFactories")
public interface ContextBasedFactory extends Factory {
* Get the list of all code template contexts supported by filters
* created by the factory.
* @return non-null list of supported contexts.
List<String> getSupportedContexts();