Update of /cvsroot/pydev/org.python.pydev
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7322
Modified Files:
plugin.xml
Log Message:
adds a couple new (possibly useful??) templates: {debbuger, dbg. stderr, stdout}, and corrects one other (main)
Index: plugin.xml
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/plugin.xml,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** plugin.xml 11 Aug 2004 17:57:16 -0000 1.32
--- plugin.xml 16 Aug 2004 18:55:22 -0000 1.33
***************
*** 335,338 ****
--- 335,339 ----
configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
</keyBinding>
+
<!-- command: next method / class-->
<command
***************
*** 561,568 ****
name="main"
icon="icons/template.gif"
! description="main"
contextTypeId="org.python.pydev.editor.templates.python"
! id="org.python.pydev.editor.templates.python.pdb">
! <pattern>if __name__ == 'main':</pattern>
</template>
<template
--- 562,572 ----
name="main"
icon="icons/template.gif"
! description="main function pattern. Season to taste"
contextTypeId="org.python.pydev.editor.templates.python"
! id="org.python.pydev.editor.templates.python.main">
! <pattern>
! if __name__ == '__main__':
! ${cursor}${Run)()
! </pattern>
</template>
<template
***************
*** 575,578 ****
--- 579,598 ----
</template>
<template
+ name="stdout"
+ icon="icons/template.gif"
+ description="Prints to sys.stdout"
+ contextTypeId="org.python.pydev.editor.templates.python"
+ id="org.python.pydev.editor.templates.python.stdout">
+ <pattern>print >> sys.stdout, ${cursor}${data}</pattern>
+ </template>
+ <template
+ name="stderr"
+ icon="icons/template.gif"
+ description="Prints to sys.stdout"
+ contextTypeId="org.python.pydev.editor.templates.python"
+ id="org.python.pydev.editor.templates.python.stderr">
+ <pattern>print >> sys.stderr, ${cursor}${data}</pattern>
+ </template>
+ <template
name="eq"
icon="icons/template.gif"
***************
*** 614,618 ****
</pattern>
</template>
!
</extension>
--- 634,662 ----
</pattern>
</template>
! <template
! name="debugger"
! icon="icons/template.gif"
! description="Creates an in-module debugger"
! contextTypeId="org.python.pydev.editor.templates.python"
! id="org.python.pydev.editor.templates.python.debug">
! <pattern>
! import sys
! debugToggle = 1
! def debug(*values):
! if debugToggle == 0: return
! print >> sys.stderr, "DBG>",
! for v in values: print >> sys.stderr, v,
! print >> sys.stderr, '.'
! ${cursor}
! </pattern>
! </template>
! <template
! name="dbg"
! icon="icons/template.gif"
! description="print a debug line.(use the debugger macro to define an in-module global debug method first!)"
! contextTypeId="org.python.pydev.editor.templates.python"
! id="org.python.pydev.editor.templates.python.dbg">
! <pattern>debug('==>', ${cursor}${data})</pattern>
! </template>
</extension>
|