Re: [Pydev-code] Swtich in strategy for autocompletion
Brought to you by:
fabioz
From: Dana M. <dan...@ya...> - 2004-07-16 20:14:08
|
I know I could hunt this down _eventually_ but to speed up the process, here's my Q: so what I want to do is to execute a .py module by the usual Java means: private java.util.Vector autoComplete( java.lang.String theCode, java.lang.String theActivationToken) { Vector theList = new Vector(); ... String line; System.out.println("autoComplete: About to start"); Process p = Runtime.getRuntime().exec("python Pysrc/foo.py"); BufferedReader input = new BufferedReader (new InputStreamReader(p.getInputStream())); while ((line = input.readLine()) != null) { theList.add(line); } ... return theList; } SO HERE's the question. I want to be able to bundle the py src code as a resource to be used by the plugin. and from autocomplete I want to be able to find the file relative to the module containing the autocomplete method. A similar model is the case where you get images to cache for the plugin from a relative folder in the package, or where you ANT a build.xml in a folder relative to the code. DOES anyone have a model of referencing relative resources from a plugin that I can mimic? The ParsedLabelProvider.java in org.python.pydev/src/pydev/outline doesn't _quite_ get us to where we need to be. Is there anything else I can look at (in our code), (in other code)? Like I said, I know how to do the image thing, but I can't remember (or see what other wiring is needed s/t the plugin finds the file to be exec'd. Thanks -Dana ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail |