stata+jedit

As it stands, invoking Stata from jEdit depends on a bit of visual basic code, and so works only on Windows. Presumably other platform specific bits could be substituted to make this work on other platforms. I'd be happy to include these other bits, if anyone could provide them.

Here are the existing, Windows-specific bits:

In the file .../.jedit/startup/stataclasses.bsh, a vb script is invoked with this line:

exec("cscript.exe \""+stataloc+"callStata.vbs\"");

The referenced vb file, .../.jedit/stata/callStata.vbs, is the following three lines:

set shell = WScript.createObject("WScript.Shell")
shell.AppActivate(".")
shell.sendkeys "%uu"

That final line selects an item from Stata's User menu (which has been defined to run the code from jEdit).