title: How do I pass the current Eclipse text editor cursor location to an external tool?
body: <p>The company I work at is adopting Eclipse for work on our proprietary languages.  I'm writing an external tool to replace functionality that we had in our proprietary editor, allowing programmers to select an item from our software to be inserted at the cursor's current location.  </p>
  
  <p>I've reviewed the external tool documentation and there are no variables that appear to return the current cursor location:</p>
  
  <p><a href="http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-exttools.htm" rel="nofollow noreferrer">http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fconcepts-exttools.htm</a></p>
  
  <p>I found slightly similar questions that showed Java methods:
  <a href="https://stackoverflow.com/questions/1619623/eclipse-plugin-how-to-get-current-text-editor-corsor-position">Eclipse-plugin how to get current text editor corsor position</a></p>
  
  <p>Unfortunately, I do not know Java, and even if I knew Java, I don't know if Java methods can be accessed from the external tools argument.  Are there undocumented, or non-standard, external tool variables I could use?</p>
  
  <p>In TextPad I would have used $Line and $Col to determine the current cursor location in a tool argument.  What do I do in Eclipse?</p>