title: Eclipse shortcut to automatically declare the class and variable from method return type
body: <p>Does anybody know of a short cut in Eclipse that will put in the class and variable based on a method return type?</p>
  
  <p>For e.g.</p>
  
  <pre><code>SomeClass{
    public AnotherClass getAnotherClass(){
    }
  }
  
  MainClass{
    someClassObj.getAnotherClass();// Short cut here to insert "AnotherClass anotherClass ="
  }
  </code></pre>