RE: [Pydev-code] Getting a handle to the .py files in org.python.pydev.PySrc
Brought to you by:
fabioz
From: Dana M. <dan...@ya...> - 2004-07-30 15:57:54
|
Cool. thatnks I am "good to go" at the moment. autocompletion is almost "autocomplete". It is fully CPython driven from a Runtime.exec(). One thing I DONT like is that I am generating a temp file to pass to the introspector, which I then read. I am not sure there's much of a cure for that (perhaps something like using an XML-RPC call to a separate thread running the introspector might work better and I will try that on the plane ride home tonight. Best, --- Fabio Zadrozny <fa...@in...> wrote: > Well, you should unzip the .zip in the plugins directory.... (if you > look in > it, it has all the plugin resources - including jars - within it). > Just be > careful so that you extract the files to the correct location within > the > eclipse enviroment. > > []s > > Fabio Zadrozny > ------------------------------------------------------ > Software Developer > ESSS - Engineering Simulation and Scientific Software > www.esss.com.br > > > -----Original Message----- > From: pyd...@li... > [mailto:pyd...@li...] On Behalf Of Dana > Moore > Sent: quinta-feira, 29 de julho de 2004 18:46 > To: pyd...@li... > Subject: RE: [Pydev-code] Getting a handle to the .py files in > org.python.pydev.PySrc > > Understood and done. > Now how does the .zip file relate to the run time system? > What that allowed me to do was to create a file on _my_ filesystem > arbitrarily named. How does our installed plugin get access to that > jar on > behalf of the user? > I think that it used to be that our jars were installed by the build > system > in the <eclipse_home>/plugins/<package> folder (and they were .JAR > files, > not .ZIP files. > > Thanks > > --- Fabio Zadrozny <fa...@in...> wrote: > > > Dana, > > > > to create a .jar with our plugin (if that's what you want), you > have > > to go on File->Export->Deployable Plug-ins and fragments, choose > the > > plug-ins you want to deploy, and specify the .zip that will be the > > output. > > > > After that, you're done... > > > > []s > > > > Fabio Zadrozny > > ------------------------------------------------------ > > Software Developer > > ESSS - Engineering Simulation and Scientific Software > www.esss.com.br > > > > > > -----Original Message----- > > From: pyd...@li... > > [mailto:pyd...@li...] On Behalf Of Dana > > Moore > > Sent: quinta-feira, 29 de julho de 2004 13:24 > > To: pyd...@li... > > Subject: Re: [Pydev-code] Getting a handle to the .py files in > > org.python.pydev.PySrc > > > > Fabio and Aleks.. > > Do you how jars get built in Eclipse 3... I am working in the pde > > perspective and there doesn't seem to be a way of producing an > actual > > jar. > > So I am a bit perplexed :-( > > > > I can of course launch a runtime workbench but of course it's > looking > > at the .class files. > > Is it just that we don't specify a jar as a build target in our > > build.xml? > > > > Thanks > > --- Fabio Zadrozny <fa...@in...> wrote: > > > > > Hi Dana, > > > > > > If I understood correctly, your problem is getting the contents > of > > the > > > .py files in our jar. > > > > > > To get the contents of any file within a .jar, you have to get > the > > > classloader to get it. > > > > > > You can take any class and > > > getClass().getClassLoader().getResourceAsStream(name). The > > InputStream > > > that returns is what you want... > > > > > > Well, I think that's it... You should probably see the javadoc > for > > the > > > classloader, as it should have more details. > > > > > > I hope I could help you... > > > > > > Fabio Zadrozny > > > ------------------------------------------------------ > > > Software Developer > > > ESSS - Engineering Simulation and Scientific Software > > www.esss.com.br > > > > > > > > > -----Original Message----- > > > From: pyd...@li... > > > [mailto:pyd...@li...] On Behalf Of Dana > > > > Moore > > > Sent: quarta-feira, 28 de julho de 2004 12:09 > > > To: pyd...@li... > > > Subject: Re: [Pydev-code] Released 0.5.3 > > > > > > I can take a look at that in a few minutes. > > > My primary problem is not externally launching CPy however, its > > > getting a handle to the .py files in org.python.pydev.PySrc. > > > I don't want to force a user to install thes in their O/S; rather > I > > > > > want them to be nicely bundled with the rest of the code. > > > Any suggs would be nice :-) > > > > > > Thanks > > > --- "Aleks Totic (Boston)" <a...@to...> wrote: > > > > > > > I invoke CPython as a part of the debugging process in > > > > org.python.pydev.debug.launching. You probably want to do > > something > > > > > > > similar, but with using Runtime.exec and capturing your own > > stdio. > > > > > > > > Doing autocompletion by launching CPython can be heavyweight > for > > > some > > > > > > > > users. I've just fixed a bug where someone was complaining > about > > a > > > 5 > > > > second timeout when launching CPython through debugger as too > > low. > > > > His > > > > machine took at least 10 secs to launch python. > > > > > > > > Aleks > > > > > > > > Dana Moore wrote: > > > > > > > > >Ecellent, > > > > >I saw tha the project got good press as well: > > > > > > > > > > >http://www-106.ibm.com/developerworks/library/os-ecant/?ca=drs-tp2604 > > > > > > > > > >In addition, I got a slot to talk about it at OsCon 2004 > > > > > > > > > >I never got a response back from my query on how to invoke > > CPython > > > > on a > > > > >file which is in the plugin path. If I get a reposnse to that, > > > then > > > > >finishing the autocompletion is a 30-60 minute job as I have > all > > > the > > > > >rest of the stuff coded (and doesn't require Jython any longer > > :-) > > > > > > > >FYI (or if you can figure out an answer), my question to the > > > > >eclipse-dev NG was: > > > > ># ---------------------------------------------- > > > > >HI all, > > > > >I haven't seen a good example of this in discussions or > > tutorials > > > > >(perhaps because it's an uncommon useage), but here's what I > > would > > > > like > > > > >to do: > > > > >1. I am working on completion proposals for a pythonic Eclipse > > > > editor. > > > > >2. I have a python code introspector writen in python > > > (inspector.py) > > > > >that emits potential completions to standard out; 3. On > > > encountering > > > > >the autoactivation characters ( dot or left paren > > > > ) > > > > >I > === message truncated === ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail |