[Pydev-cvs] org.python.pydev.jython/jysrc pyedit_example2.py,1.1,1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-03-28 23:58:05
|
Update of /cvsroot/pydev/org.python.pydev.jython/jysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9171/jysrc Modified Files: pyedit_example2.py Log Message: Index: pyedit_example2.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.jython/jysrc/pyedit_example2.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyedit_example2.py 28 Mar 2006 20:01:16 -0000 1.1 --- pyedit_example2.py 28 Mar 2006 23:58:00 -0000 1.2 *************** *** 1,2 **** --- 1,13 ---- + ''' + In this example we bind a simple action, that when run will open a dialog to the user. + + The action is binded to the 'OfflineActions' in the PyEdit... The 'offline actions' are those that are + started with Ctrl+2 (yeah, I know the name is nonsense) and after that the user will type what he wants. + + In this case, the user will have to press 'Ctrl+2' then 'ex2' then <ENTER> to activate it. It should be clear + in the example below on how to bind any other action (subclass of the IAction interface) to any other text + entered after Ctrl+2. + ''' + if False: from org.python.pydev.editor import PyEdit #@UnresolvedImport *************** *** 15,19 **** if cmd == 'onCreateActions': from org.eclipse.jface.action import Action #@UnresolvedImport ! from org.eclipse.jface.dialogs import MessageDialog#@UnresolvedImport class ExampleCommand2(Action): --- 26,30 ---- if cmd == 'onCreateActions': from org.eclipse.jface.action import Action #@UnresolvedImport ! from org.eclipse.jface.dialogs import MessageDialog #@UnresolvedImport class ExampleCommand2(Action): |