# HG changeset patch # Parent 3265bd751779fff29ec2e093fea60373e5390d1f # User Ralph Benjamin Ruijs #230538 - Introduce a way to update filters selected state after creation diff --git a/refactoring.api/apichanges.xml b/refactoring.api/apichanges.xml --- a/refactoring.api/apichanges.xml +++ b/refactoring.api/apichanges.xml @@ -49,6 +49,21 @@ Refactoring API + + + Introduce a way to update a filter's selected state after creation. + + + + + +

+ Added the method setSelected, to introduce a way to update a filter's selected state after creation. +

+
+ + +
RefactoringCommit implements the interface ProgressProvider. diff --git a/refactoring.api/nbproject/project.properties b/refactoring.api/nbproject/project.properties --- a/refactoring.api/nbproject/project.properties +++ b/refactoring.api/nbproject/project.properties @@ -4,5 +4,5 @@ javadoc.apichanges=${basedir}/apichanges.xml javadoc.title=Refactoring API -spec.version.base=1.35.0 +spec.version.base=1.36.0 test.config.stableBTD.includes=**/*Test.class diff --git a/refactoring.api/src/org/netbeans/modules/refactoring/spi/ui/FiltersDescription.java b/refactoring.api/src/org/netbeans/modules/refactoring/spi/ui/FiltersDescription.java --- a/refactoring.api/src/org/netbeans/modules/refactoring/spi/ui/FiltersDescription.java +++ b/refactoring.api/src/org/netbeans/modules/refactoring/spi/ui/FiltersDescription.java @@ -141,6 +141,19 @@ public boolean isSelected(int index) { return filters.get(index).selected; } + + /** + * Change the selected value of the filter at the supplied index. + * + * @param index the index of the filter + * @param selected true if the filter should be selected + * @throws IndexOutOfBoundsException if the index is out of range + * ({@code index < 0 || index >= size()}) + * @since 1.36 + */ + public void setSelected(int index, boolean selected) { + filters.get(index).selected = selected; + } /** * Enable the filter at the supplied index.