Thread: [Pydev-code] Ported to 3.0 - it was bloody...
Brought to you by:
fabioz
From: Aleks T. <a...@to...> - 2004-07-02 02:59:27
|
Hi, I've just finished porting pydev to Eclipse 3.0. The changes have been checked in. Unfortunately, I had to cut some of your stuff out to make it happen, hope you can put the code back in soon: 1) Parhaum's test: - the tests Java files were in the same directory tree as the plugin. I do not like having the test files in the same tree, as I do not want to ship them when plugin is built. I've moved them all into docs/tests. I am not a big fan of indiscriminate testing. Writing a proper testing harness is hard, and requires maintenance. And for me, it is no fun. So I do not write them. There is a smoke test suite I run through before the release, and that's it. So, Parhaum, if you'd like to include the tests in the project, please keep them separate from the main code line. I have an org.python.pydev.test project where I keep my smoke tests, it might be a good place for your test cases too. 2) Code completion by Dana: - Here I ran into a library loading problem. pydev uses and compiles jython's parser internally for syntax highlights & outline. org.pydev.jython/jython.jar included some of the same classes, but they were different versions. In 2.0, the class loader did what we wanted. In 3.0, the class loader has changed, and pydev editor was getting NoSuchMethod exceptions because it was getting PythonGrammar out of jython.jar. So I removed jython.jar from the classpath to get things going again. This also meant that completion processor was turned off. How do we solve this one? There is no simple solution. I've submitted my changes to Jython, and they've been accepted. Maybe you can check out the pydev compatible jython tree, and check that in instead, and remove our jython parser port from the editor? I've also fixed "Open External File" command. Files outside of workspace can be opened, but not edited. Getting editing to work was just too much coding, nice hobby project for someone for the weekend. Porting was a little annoying as Eclipse's programming usually is. Main changes involved moving the Plugin classes to the new Bundle standard. I'd like to ship this early next week. Dana, do you have an ETA on your changes? Aleks |
From: Dana M. <dan...@ya...> - 2004-07-02 16:56:24
|
Aleks, I have some time this weekend and it looks like Monday is a holiday here, so let me see what I can do. If 3.0 is our target, I guess I ought to DL the darn thing and start from there :-) Bill is pretty good at soving this kind of library-itis, so I might be able to get some of his cycles as well. I am in a nice TMobile hotspot, so I should be able to get a Eclipse 3.0 before my flight. Thanks for the very good update. --- Aleks Totic <a...@to...> wrote: > Hi, > I've just finished porting pydev to Eclipse 3.0. The changes have > been checked in. Unfortunately, I had to cut some of your stuff > out to make it happen, hope you can put the code back in soon: > > 1) Parhaum's test: > - the tests Java files were in the same directory tree as the > plugin. I do not like having the test files in the same tree, as > I do not want to ship them when plugin is built. I've moved them > all into docs/tests. > > I am not a big fan of indiscriminate testing. Writing a proper > testing harness is hard, and requires maintenance. And for me, it > is no fun. So I do not write them. There is a smoke test suite I > run through before the release, and that's it. > > So, Parhaum, if you'd like to include the tests in the project, > please keep them separate from the main code line. I have an > org.python.pydev.test project where I keep my smoke tests, it > might be a good place for your test cases too. > > 2) Code completion by Dana: > - Here I ran into a library loading problem. pydev uses and > compiles jython's parser internally for syntax highlights & > outline. org.pydev.jython/jython.jar included some of the same > classes, but they were different versions. In 2.0, the class > loader did what we wanted. In 3.0, the class loader has changed, > and pydev editor was getting NoSuchMethod exceptions because it > was getting PythonGrammar out of jython.jar. So I removed > jython.jar from the classpath to get things going again. This > also meant that completion processor was turned off. > > How do we solve this one? There is no simple solution. I've > submitted my changes to Jython, and they've been accepted. Maybe > you can check out the pydev compatible jython tree, and check > that in instead, and remove our jython parser port from the editor? > > I've also fixed "Open External File" command. Files outside of > workspace can be opened, but not edited. Getting editing to work > was just too much coding, nice hobby project for someone for the > weekend. > > Porting was a little annoying as Eclipse's programming usually > is. Main changes involved moving the Plugin classes to the new > Bundle standard. > > I'd like to ship this early next week. Dana, do you have an ETA > on your changes? > > Aleks > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail |
From: Dana M. <dan...@ya...> - 2004-07-07 13:31:50
|
Aleks, if I do a new check out the various packages from CVS, may I assume that they will work w/ Eclipse 3.0? Thx --- Aleks Totic <a...@to...> wrote: > Hi, > I've just finished porting pydev to Eclipse 3.0. The changes have > been checked in. Unfortunately, I had to cut some of your stuff > out to make it happen, hope you can put the code back in soon: > > 1) Parhaum's test: > - the tests Java files were in the same directory tree as the > plugin. I do not like having the test files in the same tree, as > I do not want to ship them when plugin is built. I've moved them > all into docs/tests. > > I am not a big fan of indiscriminate testing. Writing a proper > testing harness is hard, and requires maintenance. And for me, it > is no fun. So I do not write them. There is a smoke test suite I > run through before the release, and that's it. > > So, Parhaum, if you'd like to include the tests in the project, > please keep them separate from the main code line. I have an > org.python.pydev.test project where I keep my smoke tests, it > might be a good place for your test cases too. > > 2) Code completion by Dana: > - Here I ran into a library loading problem. pydev uses and > compiles jython's parser internally for syntax highlights & > outline. org.pydev.jython/jython.jar included some of the same > classes, but they were different versions. In 2.0, the class > loader did what we wanted. In 3.0, the class loader has changed, > and pydev editor was getting NoSuchMethod exceptions because it > was getting PythonGrammar out of jython.jar. So I removed > jython.jar from the classpath to get things going again. This > also meant that completion processor was turned off. > > How do we solve this one? There is no simple solution. I've > submitted my changes to Jython, and they've been accepted. Maybe > you can check out the pydev compatible jython tree, and check > that in instead, and remove our jython parser port from the editor? > > I've also fixed "Open External File" command. Files outside of > workspace can be opened, but not edited. Getting editing to work > was just too much coding, nice hobby project for someone for the > weekend. > > Porting was a little annoying as Eclipse's programming usually > is. Main changes involved moving the Plugin classes to the new > Bundle standard. > > I'd like to ship this early next week. Dana, do you have an ETA > on your changes? > > Aleks > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail |
From: Aleks T. <a...@to...> - 2004-07-07 17:22:32
|
Dana Moore wrote: > Aleks, if I do a new check out the various packages from CVS, may I > assume that they will work w/ Eclipse 3.0? Yes. Aleks |
From: Aleks T. <a...@to...> - 2004-07-08 20:15:33
|
Hi, I was planning on releasing 0.5 this week, or Tuesday at the latest. How is that code-completion code drop looking? Aleks |
From: Fabio Z. <fa...@in...> - 2004-07-15 15:31:16
|
Aleks, I was checking the code and found that in comments, we are able to get tabs instead of spaces, that's in PyEditConfiguration - we return the default indent strategy instead of PyAutoIndentStrategy - is there any reason to do that and not return PyAutoIndentStrategy? (I had a bug because of that... made some commented code and after uncommenting it python complained...) []s Fabio |
From: Aleks T. <a...@to...> - 2004-07-15 18:46:55
|
Hi Fabio, I am a tab fan, and thought that tab substitution was unnecessary in comments. That's because in comments I wanted to draw pretty ASCII diagrams. Silly reasoning. Your logic has changed my mind. Fix it, check it in. Someone else filed a bug report about this too. Aleks Fabio Zadrozny wrote: > Aleks, > > I was checking the code and found that in comments, we are able to get tabs > instead of spaces, that's in PyEditConfiguration - we return the default > indent strategy instead of PyAutoIndentStrategy - is there any reason to do > that and not return PyAutoIndentStrategy? (I had a bug because of that... > made some commented code and after uncommenting it python complained...) |
From: Fabio Z. <fa...@in...> - 2004-07-16 15:51:18
|
Hi All, I've just changed the indentation to get always the python indentation (being on comments or not). I've also added an action for backspace. It has not been enough tested or even consider all approaches, but it should be better than the default approach (that is, if you use spaces and not tabs) - I haven't even tested it with tabs. Fabio |
From: Dana M. <dan...@ya...> - 2004-07-16 16:22:20
|
very cool so, I finally got a few moments to load E3.0, look at the completion business having to be dropped, and I am rethinking the entire use of Jython thing. Here's what I am thinking... suppose we (instead of inplace Jython interpreting the instrospection code,) we launch an actual CPython interpreter from the plugin, and get its results back into the plugin this way: 1. We get the jython stuff out of the way 2. When we do a "run this python application" capcbility we are going to do an external invocation of a real CPython interpreter anyway. What do you guys think? (Assuming that this is easily done in a short time) -Dana --- Fabio Zadrozny <fa...@in...> wrote: > Hi All, > > I've just changed the indentation to get always the python > indentation > (being on comments or not). > > I've also added an action for backspace. It has not been enough > tested or > even consider all approaches, but it should be better than the > default > approach (that is, if you use spaces and not tabs) - I haven't even > tested > it with tabs. > > Fabio > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail |
From: Dana M. <dan...@ya...> - 2004-07-16 17:49:30
|
re my previous note. Did a quickie test of launching an external CPython preocess for doing the autocompletion. Looks viable and seems to be fairly fast. I will go for it Aleks and get it checked in as soon as I can. -Dana ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail |
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 |
From: Fabio Z. <fa...@in...> - 2004-07-19 18:12:50
|
Hi All, I'm adding some code-folding capabilities to our plugin... It's still not complete... but it should be until tomorrow... (I've already commited most of it, so, it's already usable) There's only one bug I think I'll be unable to correct... If some class / method ends with a comment, I'm unable to get the correct code folding for it (since our model doesn't get comments parsed) I've added 'pass' and Str Tokens to our model, so that I could make it work correctly with them... If someone has some problem in code-folding or some idea on how to implement it to work correctly with comments... I'm accepting suggestions... []s Fabio |
From: Fabio Z. <fa...@in...> - 2004-07-16 17:57:00
|
I think it is a good choice... The only thing that maybe should be in your mind is not to spawn a different thread on each request... launch one and reload the module each time... I think that's it... (otherwise, it may end up being too slow) :-) Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Dana Moore Sent: sexta-feira, 16 de julho de 2004 13:22 To: pyd...@li... Subject: Re: [Pydev-code] Tabs / indentation very cool so, I finally got a few moments to load E3.0, look at the completion business having to be dropped, and I am rethinking the entire use of Jython thing. Here's what I am thinking... suppose we (instead of inplace Jython interpreting the instrospection code,) we launch an actual CPython interpreter from the plugin, and get its results back into the plugin this way: 1. We get the jython stuff out of the way 2. When we do a "run this python application" capcbility we are going to do an external invocation of a real CPython interpreter anyway. What do you guys think? (Assuming that this is easily done in a short time) -Dana --- Fabio Zadrozny <fa...@in...> wrote: > Hi All, > > I've just changed the indentation to get always the python > indentation > (being on comments or not). > > I've also added an action for backspace. It has not been enough > tested or > even consider all approaches, but it should be better than the > default > approach (that is, if you use spaces and not tabs) - I haven't even > tested > it with tabs. > > Fabio > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Pydev-code mailing list > Pyd...@li... > https://lists.sourceforge.net/lists/listinfo/pydev-code > ===== _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ Dana Moore _/ _/ BBN Technologies LLC _/ _/ M: 240.350.4196 _/ _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |