Re: [Pydev-code] code folding
Brought to you by:
fabioz
From: Paul <pau...@af...> - 2012-10-12 15:40:58
|
Hi Fabio, Thanks for the reply. I've got started already, but there are some things that I'm not clear on. See comments inline. > For this situation I think doing it in the code directly (and not in > scripting) would be a better choice, as you'll be able to edit the > preferences and the current code isn't really meant to be extended for > what you want in scripting. Ah, so? Pity, scripting would have been easier, I think, but I will experiment with the plug-in code. Probably a better solution in the long run. > The first thing would be the code there compiling properly. Make sure > you have downloaded the java SDK (preferably Java 5, but could be a > later version too) and the latest Eclipse 3.8 SDK and try following > the instructions from: http://www.pydev.org/developers.html Ok, I have java version 1.6.0_21, which is java 6 AFAIU. I also have Eclipse Juno, version 4.2.0. The instructions at the given link have a few things I don't understand. Firstly, they talk about changing the compliance level from 1.4 to 5.0. I don't have a 5.0 in Eclipse, only 1.3 through 1.7, and it's currently on 1.6, so I can only assume this is correct. The numbering must have changed, and I assume 1.6 is java 6 and the 5.0 was java 5, so this should be fine. Secondly, they talk about forking the code at github, then creating your own branch. I'm not really familiar with git, or github, so I'm not sure if I should be doing the fork on github or what, but for now I've "git-clone"d the github code to my machine and made a feature branch (with git checkout -b), so if I work on that local copy I should be able to submit a patch later, right? There's stuff in the guide about creating a pull request on github, but I don't have a public IP, so I think I'll need to mail patches. Then the developers guide talks of having a dependancy on Aptana, but only if building the code, not if just running the changes in Eclipse. As I understand it, I will just be making changes, and then running it in a new Eclipse from inside Eclipse, so I won't need Aptana? It also talks of making changes to org.python.pydev.core/tests/org.python.pydev.core/TestDependent.OS.properties, which I assume would be org.python.pydev.core/tests/org.python.pydev.core/TestDependent.windows.properties for me. I see a lot of stuff in there, including things like IronPython. Do I need all of that installed? There are things there I don't even know, like PIL. And the google app engine? Surely I don't need all of that to make the simple changes I am contemplating? Is that stuff only needed for running the tests? Lastly, the guide talks about reading the instructions at /plugins/org.python.pydev.build/build_cmd.txt, but that seems to do a lot of git stuff and I'm not sure quite what that relates to. I'm hoping I don't need that stuff just to test and submit a patch. > After that, the related classes would be: > > org.python.pydev.editor.codefolding.CodeFoldingSetter: It'd be mainly > configuring > org.python.pydev.editor.codefolding.CodeFoldingSetter.getMarks(IDocument, > SimpleNode) to return more folding entries. > > org.python.pydev.editor.codefolding.CodeFoldingSetterTest: Please do a > test-case for your situation so that it keeps working after the > initial implementation is done :) > > org.python.pydev.editor.codefolding.PyDevCodeFoldingPrefPage: add the > related preferences for the option you want to add. Thanks, I've started poking around, and I think I can make a stab at it, although I may be mailing with a few more issues as I progress, I'm sure :) > > Note that you may run an Eclipse with your own code changes doing a > run configuration: > > menu: run > run configurations > eclipse application (right-click for > new eclipse application) > run. What am I trying to run? I tried to right-click on the org.python.pydev project (in the package explorer), and under the "Run As" submenu of the context menu was "Eclipse Application", but this complains about errors in com.aptana.interactive_console, org.python.pydev.django_templates and org.python.pydev.mylyn. I have tried clicking "Proceed", and sure enough a new Eclipse opens with my changes, so I'm assuming that despite the errors I'm on the right track and can safely ignore the errors to proceed. Sorry if I sound terribly noobish, but I've not had much exposure to either java or Eclipse before (and only fairly recently to python). I think I've got things chugging along enough to make the changes I need, and hopefully submit a patch at the end. Again, many thanks for the help. Paul |