Hi Paul, 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.
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 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. 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. Cheers, Fabio On Thu, Oct 11, 2012 at 8:32 AM, Paul <paulste...@afrihost.co.za> wrote: > Hi List, > > I see from this > (http://sourceforge.net/tracker/index.php?func=detail&aid=1841410&group_id=85796&atid=577332), > that PyDev still doesn't support code folding on custom tags. Not sure > if this is the latest word on it or if I'm missing something, but from > my searching on the net and the mailing list archives, I can find > nothing more on it, and it seems at least a few people would like to > see this feature. > > I've had a stab at it myself, trying both hacking the PyDev plug-in, > and scripting it with the jython scripting support, but so far no luck. > I'm afraid I'm new to Eclipse plug-in dev, and am having some troubles. > > I was wondering if there was any further info on this, anybody already > involved in PyDev work that would add this (as it seems like it would > be fairly quick to add for someone who knew the internals of PyDev), or > if not, anybody who could help me get pointed in the right direction? > > For hacking the plug-in, I grabbed the code off github, unzipped the > zip (I didn't want to clone the repo yet, as I just wanted to poke > around quickly for now, and don't already have git installed), loaded it > into Eclipse, but can't seem to run it. Something about the build path > being incomplete and not being able to find java.lang.Object. I'm sure > this is really simple, but I'm not very experienced with Java or Eclipse > dev, so I'm just not quite sure how to set it up correctly. > > For the scripting approach, I've gotten further. I have hooked up an > IDocumentLister in the 'onSetDocument' event to listen for changes to > the document, but from looking at the plug-in code, it looks like I may > actually want an IModelListener hooked up instead. I can't seem to get > that part working, tho. Once I have the correct listener, I'm thinking > I can check the document to get access to the comments, look for a > custom comment, and add the mark to the listener (simple, right?). > > Either approach should do, and both seem to have their advantages, > although the scripting approach may be easier for me to get working. Any > comments as to which is preferable? > > Anybody able and willing to help me out? > > Thanks all > > Paul > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > pydev-code mailing list > pydev-code@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pydev-code ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ pydev-code mailing list pydev-code@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-code