You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2011/10/17 15:10:37 UTC
svn commit: r1185150 -
/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
Author: joern
Date: Mon Oct 17 13:10:37 2011
New Revision: 1185150
URL: http://svn.apache.org/viewvc?rev=1185150&view=rev
Log:
UIMA-2263 Added a method which returns the offset of the caret.
Modified:
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java?rev=1185150&r1=1185149&r2=1185150&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java (original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/AnnotationEditor.java Mon Oct 17 13:10:37 2011
@@ -1276,6 +1276,15 @@ public final class AnnotationEditor exte
return selection;
}
+ /**
+ * Returns the caret position relative to the start of the text.
+ *
+ * @return
+ */
+ public int getCaretOffset() {
+ return getSourceViewer().getTextWidget().getCaretOffset();
+ }
+
public void showView(String viewName) {
// TODO: Check if set view is compatible .. if not display some message!