title: PhpStorm: Replace string literal with class constant
body: <p>I've been trying to find out how to replace a string of an FQCN with an import statement (and vice-versa). I can't work out if this feature doesn't exist or if I just can't find it.</p>
  
  <p>For example, the <code>ALT + ENTER</code> context menu in PHPUnit when creating a mock:</p>
  
  <p><a href="https://i.stack.imgur.com/0WGhU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0WGhU.png" alt="context menu on a string literal"></a></p>
  
  <p>PhpStorm knows which class this is - or is this a plugin doing this?</p>
  
  <p><a href="https://i.stack.imgur.com/6Cz25.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Cz25.png" alt="class type hint on string literal"></a></p>
  
  <p>The opposite:</p>
  
  <p><a href="https://i.stack.imgur.com/kLwat.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kLwat.png" alt="context menu on a class constant"></a></p>
  
  <p>The <a href="https://plugins.jetbrains.com/plugin/7320-php-annotations" rel="nofollow noreferrer">PHP Annotations</a> plugin adds a nice option in the context menu - but only for Doctrine:</p>
  
  <p><a href="https://i.stack.imgur.com/mdFcV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mdFcV.png" alt="doctrine use class constant context menu"></a></p>
  
  <p>Is there a keyboard shortcut to achieve the same result as above but with any class string literal?</p>