title: Which refactoring tools can rename a Java class along with all its similarly-named instances?
body: <p>Suppose I have a class called <code>Orange</code> in my NetBeans Java project, which I'd like to rename to <code>Apple</code>. The NetBeans rename refactoring can handle this without difficulty. However, my project contains many instances of the <code>Orange</code> class with the name <code>orange</code>, resulting in a lot of confusing refactored code along the lines of:</p>
  
  <pre><code>final Apple orange = new Apple();
  </code></pre>
  
  <p>I'd like all these instances -- and preferably also prefixed ones like <code>juicyOrange</code> and <code>defaultOrange</code> -- to be renamed to <code>apple</code>, <code>juicyApple</code>, etc. as part of the same refactoring. The refactoring should of course not affect variables of different classes (e.g. <code>Colour orange</code> should remain as-is), or <code>orange</code> occurrences where there's already an <code>apple</code> variable in context. It seems that <a href="https://www.jetbrains.com/help/idea/rename-refactorings.html" rel="nofollow noreferrer">IntelliJ IDEA</a> offers this functionality, but I can't find it in NetBeans 8.2.</p>
  
  <p>Is this functionality available or planned either in NetBeans itself or in any NetBeans plug-in? Failing that, is there any stand-alone Java refactoring tool which offers it?</p>