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.
Some refactoring implementations use the refactoring context to store information about the "environment" of the refactoring. A new method is needed to remove information from this context to be able to correctly refresh/reconfigure these refactorings. The method is already in trunk, but should have been reviewed. Please review attached patch and related class. Thanks
Created attachment 117793 [details] Changes
Created attachment 117794 [details] Related class
Context Javadoc should explain that it acts as a Map<Class,Object> keyed off the concrete implementation class of the "values", since is neither obvious nor consistent with either Set<Object> or AbstractLookup semantics. add(...) could be simplified to: Parameters.notNull("value", value); remove(value.getClass()); instanceContent.add(value);
Created attachment 118126 [details] Updated patch Updated the patch with Jesse's comments. Will integrate tomorrow.
BTW in Javadoc pay attention to the location of the summary sentence, boldfaced in the editor; currently it is I think Context contains "environment" in which the refactoring was invoked e.g. which makes no sense. Also "Context acts as a..." looks like it is supposed to be a new paragraph but is not using <p> to indicate this. So you probably want something like /** * A context is the environment in which the refactoring was invoked. * For example, Java refactoring might add an instance of {@code ClasspathInfo}. * <p>The context acts as a {@code Map<Class,Object>} keyed off the concrete * implementation classes of the values.
I updated the javadoc, thanks! jet-main #8466634b6098