# HG changeset patch # Parent fb51a0c6e832bd000dbe26bda6daf14f7dec1636 # User Ralph Benjamin Ruijs [no commit message] 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 + + + Added method to remove value from Context. + + + + + +

+ Added the method remove to the refactoring Context. +

+
+ + +
Added RefactoringCommit and ModificationResult SPI classes. 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.23.0 +spec.version.base=1.24.0 test.config.stableBTD.includes=**/*Test.class diff --git a/refactoring.api/src/org/netbeans/modules/refactoring/api/Context.java b/refactoring.api/src/org/netbeans/modules/refactoring/api/Context.java --- a/refactoring.api/src/org/netbeans/modules/refactoring/api/Context.java +++ b/refactoring.api/src/org/netbeans/modules/refactoring/api/Context.java @@ -55,6 +55,10 @@ /** * Context contains "environment" in which the refactoring was invoked * e.g. Java refactoring might put instance of ClasspathInfo here + * + * Context acts as a {@code Map} keyed off the concrete + * implementation class of the "values". + * * @see AbstractRefactoring * @author Jan Becicka */ @@ -74,18 +78,21 @@ * for instance Java impl. puts instance of ClasspathInfo here. * If there is an instance already set for this context, old * value is replaced by new one. + * + * @param value the instance the add */ public void add(@NonNull Object value) { Parameters.notNull("value", value); // NOI18N - Object old = lookup(value.getClass()); - if (old!=null) { - instanceContent.remove(old); - } + remove(value.getClass()); instanceContent.add(value); } /** - * Removes value instance from this context. + * Removes instance from this context. + * + * @param clazz the class to remove the instance of + * + * @since 1.24 */ public void remove(@NonNull Class clazz) { Parameters.notNull("clazz", clazz); // NOI18N diff --git a/refactoring.java/nbproject/project.xml b/refactoring.java/nbproject/project.xml --- a/refactoring.java/nbproject/project.xml +++ b/refactoring.java/nbproject/project.xml @@ -185,7 +185,7 @@ - 1.22 + 1.24