Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12688/src/org/python/pydev/editor/actions
Modified Files:
PyAction.java
Log Message:
Method navigation added and commands in the scope, so that
the user can change the keybindings.
Also added keybindigs for next / previous method / class.
Index: PyAction.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions/PyAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PyAction.java 28 Feb 2004 05:13:16 -0000 1.1
--- PyAction.java 5 Mar 2004 14:43:05 -0000 1.2
***************
*** 17,20 ****
--- 17,21 ----
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.texteditor.ITextEditor;
+ import org.python.pydev.editor.PyEdit;
/**
***************
*** 81,84 ****
--- 82,98 ----
/**
+ * This function returns the python editor.
+ * @return
+ */
+ protected PyEdit getPyEdit() {
+ if (targetEditor instanceof PyEdit) {
+ return (PyEdit) targetEditor;
+ } else {
+ throw new RuntimeException("Expecting PyEdit editor. Found:"+targetEditor.getClass().getName());
+ }
+ }
+
+
+ /**
* Helper for setting caret
* @param pos
***************
*** 128,133 ****
int offset = region.getOffset();
String src = doc.get(offset, region.getLength());
! if ("".equals(src))
! return 0;
int i = 0;
while (i < src.length()) {
--- 142,146 ----
int offset = region.getOffset();
String src = doc.get(offset, region.getLength());
!
int i = 0;
while (i < src.length()) {
|