[Pydev-cvs] org.python.pydev.help/pydev.sf.net _contentassist.contents.html,NONE,1.1 _template.html,
Brought to you by:
fabioz
|
From: Fabio Z. <fa...@us...> - 2004-10-08 16:47:24
|
Update of /cvsroot/pydev/org.python.pydev.help/pydev.sf.net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13297/pydev.sf.net Added Files: _contentassist.contents.html _template.html build.py _codecompletion.contents.html _Faq.contents.html _Features.contents.html _index.contents.html _Roadmap.contents.html _Download.contents.html _refactoring.contents.html Log Message: Execute build.py to get the formatted page. --- NEW FILE: _template.html --- <html> <head> <title>%(title)s</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <link rel="stylesheet" href="stylesheet.css" type="text/css"/> </head> <body bgcolor="#FFFFFF" text="#000000"> <div class="header"> <h1>PyDev</h1> </div> <div class="sidebar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="Features.html">Features</a></li> <li><a href="Roadmap.html">Roadmap</a></li> <li><a href="Download.html">Download</a></li> </ul> </div> <div class="contents"> %(contents)s </div> </body> </html> --- NEW FILE: _Features.contents.html --- <h2>Features (release 0.6.1):</h2> <p>The pydev is composed of three plug-ins:</p> <h3>Editor (org.python.pydev):</h3> <UL> <li> Syntax highlighting <li> Parser errors marked in the task list <li> Outline view with imports/functions/classes <li> Tabs or spaces preference <LI> Smart indentation <li> Navigation: keyboard shortcuts to previous or next function. <EM>Default: (Ctrl+Shift+Up and Ctrl+Shift+Down) </EM> <li> Comment and uncomment commands (on the popup menu) and keybindings. <EM>Default: (Ctrl+3 and Ctrl+Shift+3) </EM> <li> hyperlinks over functions//import statements <li> Code folding <LI> <a href="refactoring.html">Refactoring</a> with <A href="http://bicyclerepair.sourceforge.net/"> bicycle repair man</A>. <LI> <a href="codecompletion.html">Code Completion</a> <EM>(Ctrl+Space) </EM> <LI> Templates Completion <EM>(Ctrl+Space Too) </EM> <LI> Go to definition with <EM>F3</EM> (powered by <A href="http://bicyclerepair.sourceforge.net/"> bicycle repair man</A>) <LI> <a href="contentassist.html">Content Assistant</a> <EM>(Ctrl+F1)</EM></LI></UL> <h3>Debugger (org.python.pydev.debug)</h3> <UL> <li> breakpoints <li> step in/out/over <li> multiple threads <li> variable display <li> file hyperlinks in the console output (you can click on stack traces) </li> </UL> <H3>Help (org.python.pydev.help)</H3> <UL> <LI> Brief documentation in Eclipse format. </LI> </UL> <H3>Note on code completion</H3> <P>Code completion works on top of a python shell and really <STRONG>executes the code you write on the top level on the module</STRONG> , so, beware of what is written in this case (as a rule, you should never initialize a variable to something other that None. You should init it to None and then call a function to make the real initialization after an <EM>if __name__ == '__main__'</EM> statement or inside some other scope, but never in the global scope of the module (not only because of code completion, as a simple import of that code would do it).</P> <H3>Note on text completion</H3> <P> We do not provide text completion ourselves in the plugin, as other plugins already provide this. A good suggestion is using the <A href="http://sourceforge.net/projects/lunar-eclipse/"> lunar eclipse</A> editor-enhancements plugin. It does not only provide text completion, but other very useful enhancements.</P> <P> </P> <P> </P> --- NEW FILE: _codecompletion.contents.html --- <H3>Code Completion</H3> <P>This feature is already usable, but still has to be used with care, as it <STRONG>executes the current editor code to get it's completions</STRONG>. That means that one should be very careful on what is put in the global context when using code completion.</P> <P>So, that means that if you put sys.exec("rm -r *") in the top level of any module, it would probably would really delete all you have... Not good hummm... But if you did it, you would never be able to import that module from python from anywhere, because it would do the same thing...(so, that makes me feel not so guilty :-) ). </P> <P>Aside from that, code completion works on imports, on the current class and on the global context - it uses the current pythonpath in order to do that, so, if you go in python and</P> <P><FONT face="Courier New" size="2">import sys<BR> print sys.path - those are the locations searched to get the imports tips.<BR> </FONT>Directories if they contain an __init__.py<BR> Files: .py, .py, .pyo, .pyd, .dll<BR> <BR> <STRONG>So, if you go: (| Marks Ctrl+Space)<BR> </STRONG><FONT face="Courier New" size="2">import | a list of the imports that can be gotten should appear.<BR> import comp| completes imports that start with comp<BR> import compiler.| completes with compiler sub-modules and classes<BR> import compiler.ast.| completes with compiler.ast sub-modules and classes<BR> from compiler import | completes with compiler sub-modules and classes<BR> from compiler import ast.| completes with compiler.ast sub-modules and classes</FONT> <BR> <BR> Now for other completions:<BR> <BR> <STRONG>If you have a file<BR> </STRONG> <BR> <FONT face="Courier New" size="2">from compiler import *</FONT> <BR> <BR> And just Ctrl+Space, it should appear all the globals, in this case all compiler submodules and classes.<BR> <BR> <STRONG>If you had just <BR> </STRONG> <BR> <FONT face="Courier New" size="2">Import compiler <BR> </FONT> <BR> Ctrl+Space would bring you '__builtins__' and 'compiler' suggestions<BR> <BR> <BR> <STRONG>For class code completion:<BR> </STRONG> <BR> <FONT face="Courier New" size="2">import compiler<BR> </FONT><FONT face="Courier New" size="2">class C(compiler.visitor.ASTVisitor):<BR> ....def __init__(self):<BR> ........self.| would bring you all the code available from this class.<BR> <BR> <BR> compiler.| would bring all that is contained within the compiler module<BR> </FONT> </P> <P><FONT><STRONG>Note on code completion:</STRONG></FONT></P> <P><FONT face="Courier New" size="2"><FONT face="Times New Roman" size="3">Currently code completion does not work on methods after '(' and on any variable that is passed in as a parameter == actually it works only on 'self', on the imports and on global variables ==</FONT></P> </FONT> --- NEW FILE: _index.contents.html --- <p>Pydev is a complete <a target="_blank" href="http://www.python.org">python</a> development environment for <a target="_blank" href="http://www.eclipse.org">eclipse</a>.</p> <P>Pydev has been created by <B>Aleks Totic</B> as a "getting to know Eclipse project" and is currently maintained by <B>Fabio Zadrozny</B> . <P>Other developers that helped (or still are helping) in the development of pydev are: <UL> <LI> <!--StartFragment --> Dana Moore <LI> William Wright <LI> Grig Gheorghiu <LI> Parhaum Toofanian</LI></UL> <P><STRONG>More information on the pydev plugin can be found at: </STRONG></P> <UL> <LI> <A href="http://sourceforge.net/mailarchive/forum.php?forum_id=39082">pydev-code</A>: Developers issues mailing list. <LI> <A href="http://sourceforge.net/forum/forum.php?forum_id=293649">users</A>: Users bulleting board. <LI> <A href="http://blogs.osafoundation.org/atotic/cat_work_log.html">Aleks Totic weblog</A>: Author personal web-log where sometimes tidbits about the development progress are posted. <LI> <A href="http://pydev.blogspot.com/">Pydev Adventures weblog</A>: Weblog maintained by Fabio Zadrozny with notes about his experiences with the pydev development.<!--StartFragment --></LI></UL> <P><STRONG>Mentions in the press:</STRONG></P> <LI> <A href="http://www-106.ibm.com/developerworks/library/os-ecant/?ca=drs-tp2604">Python development with Eclipse and Ant</A> <LI> <A href="http://conferences.oreillynet.com/presentations/os2004/moore_python.pdf">Pydev at OsCon</A> </LI> --- NEW FILE: _Roadmap.contents.html --- <H3>This are the features I would like to have... (One can wish right?)</H3> <P>The roadmap is still not traced... but if you want to come along and do any of those (or others), feel free... (features already implemented are not here again).</P> <UL> <LI> Make a nicer code completion - not executing code and with a better cache system.</LI> <LI> Make the content assistant better</LI> <LI> Code coverage</LI> <LI> Quick outline (like java does)</LI> <LI> Package explorer</LI> <LI> Todo-list</LI> <LI> Unit-test</LI> <LI> Interactive shell</LI> <LI> Wizards (create class / module)</LI></UL> <P> </P> <H3>You'd like to give it a try?</H3> <P><STRONG></STRONG><FONT face="Times New Roman">You can download the latest source from sourceforge. </FONT> </P> <P><FONT face="Times New Roman">To compile, you need to setthe following preferences:</FONT></P> <P><FONT face="Times New Roman">'Plug-In Development:Java Build Path Control:Use classpath containers' to true</FONT></P> <P><FONT face="Times New Roman">'Plug-In Development:Target Platform' select "this application" and enable all plugins.</FONT></P> <P><FONT face="Times New Roman">Most of the code is well-documented in javadoc. I try to cc every answer to a codingquestion to pydev-code, so you can look there for hints too. That's it. If you have not developed Eclipse plugins before, I recommend reading the online documentation and trying out a sample plugin. Doing some prep work before jumping in will really pay off.</FONT></P> <P><FONT face="Times New Roman"><STRONG>Then, it is all up to you.</STRONG></FONT><STRONG> </STRONG> </P> --- NEW FILE: _contentassist.contents.html --- <H3>Content Assistant</H3> <P>This is still on development, but it can already be useful. Current status is:</P> <P> If you have a call in the main module, let's say:<BR> <BR> C()| Ctrl+1 - bring a list of suggestions for assistants (it's still not very complete, but it has already proved very usable for me)<BR> <BR> Or if you have:<BR> <BR> <FONT face="Courier New" size="2">Class C:<BR> <BR> ....def a(self):<BR> ........self.newMethod()| Ctrl+1 also brings some interesting assistants. </FONT> </P> <P><FONT face="Courier New" size="2">Whishes:</FONT></P> <P><FONT face="Courier New" size="2"></FONT> </P> <FONT face="Courier New" size="2">class A: pass<br> <br> class C:<br> <br> ....def __init__(self, param): <br> ........self.newMethod()<- create new method on class C (with params if needed)<br> ........................<- assign result to new local variable <br> ........................<- assign result to new field <br> <br> ........a = A()<br> ........a.newMethod() <- create new method on class A <br> ........................<- assign result to new local variable <br> ........................<- assign result to new field<br> <br> ........param.b() <- don't show anything.<br> <br> ........self.a1 = A() <br> ........self.a1.newMethod() <- create new method on class A (difficult part is discovering class)<br> ............................<- assign result to new local variable <br> ............................<- assign result to new field<br> <br> ........def m(self): <br> ............self.a1.newMethod() <- create new method on class A <br> ................................<- assign result to new local variable <br> ................................<- assign result to new field<br> <br> ............importcompiler<- move import to global context<br> ............NewClass() <- Create class NewClass (Depends on new class wizard)<br> </FONT> --- NEW FILE: _Download.contents.html --- <h2>Download:</h2> <p>The current release is <b>0.6.1</b> and can be obtained from the sites: <ul> <li> Download from <a target="_blank" href='http://www.sourceforge.net/projects/pydev/'>SourceForge</a>. <li> Download from <a target="_blank" href="http://pydev.sf.net/updates/">Eclipse updates</a></li> </ul> <h4>Requirements:</h4> <ul> <li> <a href="">Eclipse 3.0</a></li> </ul> <h4>Installation Instructions:</h4> <p class="TODO">Fast install: just go to the eclipse update manager and add update site: <A href="http://pydev.sf.net/updates/">http://pydev.sf.net/updates/</A> (eclipse should do the rest)</p> <P class="TODO">An alternative is just downloading the zip file and extracting it yourself in eclipse. If you choose to do it, just make sure the plugins folder is extracted on top of the eclipse plugins folder.</P> <P class="TODO"> </P> <P class="TODO"> </P> --- NEW FILE: _refactoring.contents.html --- <H3>Refactoring - powered by: <A href="http://bicyclerepair.sourceforge.net/">bicycle repair man</A> </H3> <P>Refactor Examples (activates on right mouse click - there is usually a keyboard key that emulates that):<BR> <BR> On:<BR> <BR> class C:<BR> ....def a(self):<BR> ........a = 2<BR> ........b = 3<BR> ........c = a+b #this should be refactored.<BR> ........return c<BR> c = C()<BR> <BR> Marking 'a+b' and making an extract method refactor for a method called 'plusMet' should give you:<BR> <BR> class C:<BR> ....def a(self):<BR> ........a = 2<BR> ........b = 3<BR> ........c = self.plusMet(a, b) #this should be refactored.<BR> ........return c<BR> <BR> ....def plusMet(self, a, b):<BR> ........return a+b<BR> c = C()<BR> <BR> <BR> <BR> And with the same class, marking C (it must be the class definition) should give you:<BR> class G:<BR> ....def a(self):<BR> ........a = 2<BR> ........b = 3<BR> ........c = a+b #this should be refactored.<BR> ........return c<BR> c = G()<BR> <BR> Until now, extract method has given me no problems, but rename does not always work... It has to scan all the PYTHONPATH and does not always find all the references (and sometimes may have problems parsing some files too...)<BR> <BR> Methods or variables can be renamed too.<BR> <BR> And as a helper, a Refactor Results View has been contributed. After any refactoring it should show which files were changed. <BR> </P> --- NEW FILE: _Faq.contents.html --- --- NEW FILE: build.py --- def Template( p_template, p_name ): contents_file = '_%s.contents.html' % p_name target_file = '%s.html' % p_name d = { 'title' : p_name, 'contents' : file( contents_file, 'r' ).read(), } contents = file( p_template, 'r' ).read() contents = contents % d file( target_file, 'w' ).write( contents ) def Main(): Template( '_template.html', 'index' ) Template( '_template.html', 'Features' ) Template( '_template.html', 'Download' ) Template( '_template.html', 'Roadmap' ) Template( '_template.html', 'codecompletion' ) Template( '_template.html', 'contentassist' ) Template( '_template.html', 'refactoring' ) Template( '_template.html', 'Faq' ) Main() |