<h2>org.autoplot.jythonsupport.ui.EditorAnnotationsSupport</h2><p>annotations support for the editor, marking program counter position 
 and errors.
 
 One way to get the support for an editor is 
 getApplication().getScriptPanel().getAnnotationsSupport()</p>
<hr>
<a name="ANNO_ERROR"></a>
<h2>ANNO_ERROR</h2>
<p>error marked in the code</p>

<hr>
<a name="ANNO_MAYBE_ERROR"></a>
<h2>ANNO_MAYBE_ERROR</h2>
<p>error marked in the code with some uncertainty.  We had a problem where
 this was mismarked, and we killed an hour very confused.</p>

<hr>
<a name="ANNO_PROGRAM_COUNTER"></a>
<h2>ANNO_PROGRAM_COUNTER</h2>
<p>current interpreter position</p>

<hr>
<a name="ANNO_WARNING"></a>
<h2>ANNO_WARNING</h2>
<p>warning in the code</p>

<hr>
<a name="ANNO_CODE_HINT"></a>
<h2>ANNO_CODE_HINT</h2>
<p>warning in the code</p>

<hr>
<a name="ANNO_USAGE"></a>
<h2>ANNO_USAGE</h2>
<p>usage of a symbol in the code</p>

<hr>
<a name="ANNO_INSERT"></a>
<h2>ANNO_INSERT</h2>
<p>when rendering differences, insertion of text</p>

<hr>
<a name="ANNO_DELETE"></a>
<h2>ANNO_DELETE</h2>
<p>when rendering differences, deletion of text</p>

<hr>
<a name="ANNO_CHANGE"></a>
<h2>ANNO_CHANGE</h2>
<p>when rendering differences, modification of text</p>

<hr>
<a name="annotateChars-int-int-int-java.lang.String-java.lang.String-PythonInterpreter"></a>
<h2>annotateChars</h2>
annotateChars( int line, int i0, int i1, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> text, PythonInterpreter interp ) &rarr; void

<p>annotate the characters on the line.  This was introduced to highlite the location of symbol names.</p>

<h3>Parameters</h3>
line - the line number, where 1 is the first line.
<br>
i0 - the column number, where 1 is the first column.
<br>
i1 - the last column number, exclusive.
<br>
name - annotation type, such as "usage" or "error" see constants.
<br>
text - the tooltip text.
<br>
interp - null or the interpreter.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=annotateChars&unscoped_q=annotateChars">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#annotateChars-int-int-int-java.lang.String-java.lang.String-PythonInterpreter">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l353">[view source]</a>
<br>
<br>
annotateChars( int i0, int i1, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> text, PythonInterpreter interp ) &rarr; void  <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l385">[view source]</a><br>
<hr>
<a name="annotateError-PyException-int"></a>
<h2>annotateError</h2>
annotateError( PyException ex, int offset ) &rarr; void

<p>mark the error in the editor by looking at the python exception to get the line number.</p>

<h3>Parameters</h3>
ex - the python exception
<br>
offset - line offset from beginning of file where execution began.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=annotateError&unscoped_q=annotateError">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#annotateError-PyException-int">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l241">[view source]</a>
<br>
<br>
<hr>
<a name="annotateLine-int-java.lang.String-java.lang.String"></a>
<h2>annotateLine</h2>
annotateLine( int line, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> text ) &rarr; void

<p>highlite the line by setting the background to color.  null clears the highlite.</p>

<h3>Parameters</h3>
line - the line number to highlite.  1 is the first line.
<br>
name - the name of the style, including "error" and "programCounter"
<br>
text - annotation to display when hovering. Currently ignored.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=annotateLine&unscoped_q=annotateLine">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#annotateLine-int-java.lang.String-java.lang.String">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l260">[view source]</a>
<br>
<br>
<hr>
<a name="annotateLine-int-java.lang.String-java.lang.String-PythonInterpreter"></a>
<h2>annotateLine</h2>
annotateLine( int lline, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> ltext, PythonInterpreter interp ) &rarr; void

<p>highlite the line by setting the background to color.  null clears the highlite.</p>

<h3>Parameters</h3>
lline - the line number to highlite.  1 is the first line.
<br>
name - the name of the style, including "error" and "programCounter"
<br>
ltext - annotation to display when hovering.
<br>
interp - the interpreter (or null) to focus on.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=annotateLine&unscoped_q=annotateLine">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#annotateLine-int-java.lang.String-java.lang.String-PythonInterpreter">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l271">[view source]</a>
<br>
<br>
<hr>
<a name="clearAnnotations"></a>
<h2>clearAnnotations</h2>
clearAnnotations(  ) &rarr; void

<p>remove all annotations</p>

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=clearAnnotations&unscoped_q=clearAnnotations">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#clearAnnotations">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l156">[view source]</a>
<br>
<br>
<hr>
<a name="clearAnnotations-int"></a>
<h2>clearAnnotations</h2>
clearAnnotations( int pos ) &rarr; void

<p>remove all annotations at the position</p>

<h3>Parameters</h3>
pos - the position in character position within the document.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=clearAnnotations&unscoped_q=clearAnnotations">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#clearAnnotations-int">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l174">[view source]</a>
<br>
<br>
<hr>
<a name="getExpressionLookup"></a>
<h2>getExpressionLookup</h2>
getExpressionLookup(  ) &rarr; <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport/ExpressionLookup.html'>org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup</a>

<p></p>

<h3>Returns:</h3>
org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup

<br><br>
<a href="https://github.com/autoplot/dev/search?q=getExpressionLookup&unscoped_q=getExpressionLookup">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getExpressionLookup">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l498">[view source]</a>
<br>
<br>
<hr>
<a name="getForInterp-PythonInterpreter"></a>
<h2>getForInterp</h2>
getForInterp( PythonInterpreter interp ) &rarr; <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport/ExpressionLookup.html'>org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup</a>

<p></p>

<h3>Parameters</h3>
interp - a PythonInterpreter

<h3>Returns:</h3>
org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup

<br><br>
<a href="https://github.com/autoplot/dev/search?q=getForInterp&unscoped_q=getForInterp">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getForInterp-PythonInterpreter">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l502">[view source]</a>
<br>
<br>
<hr>
<a name="getLinePosition-int"></a>
<h2>getLinePosition</h2>
getLinePosition( int line ) &rarr; int[]

<p>return the position of the line in chars.  The second is exclusive.</p>

<h3>Parameters</h3>
line - the line number 1 is the first line.

<h3>Returns:</h3>
[st,en]
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getLinePosition&unscoped_q=getLinePosition">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getLinePosition-int">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l318">[view source]</a>
<br>
<br>
<hr>
<a name="getPreferredSize"></a>
<h2>getPreferredSize</h2>
getPreferredSize(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/awt/Dimension.html'>java.awt.Dimension</a>

<p>The editor component should delegate to these.</p>

<h3>Returns:</h3>
the preferred size
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getPreferredSize&unscoped_q=getPreferredSize">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getPreferredSize">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l573">[view source]</a>
<br>
<br>
<hr>
<a name="getSymbolAt-org.autoplot.jythonsupport.ui.EditorTextPane-int"></a>
<h2>getSymbolAt</h2>
getSymbolAt( <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/autoplot/jythonsupport/ui/EditorTextPane.html'>org.autoplot.jythonsupport.ui.EditorTextPane</a> editor, int position ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>return the symbol (e.g. variable name) at the caret position, or "".</p>

<h3>Parameters</h3>
editor - the code editor
<br>
position - typically editor.getCarotPosition

<h3>Returns:</h3>
the symbol (e.g. variable name) at the current caret location
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getSymbolAt&unscoped_q=getSymbolAt">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getSymbolAt-org.autoplot.jythonsupport.ui.EditorTextPane-int">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l98">[view source]</a>
<br>
<br>
<hr>
<a name="getToolTipText-java.awt.event.MouseEvent"></a>
<h2>getToolTipText</h2>
getToolTipText( <a href='https://docs.oracle.com/javase/8/docs/api/java/awt/event/MouseEvent.html'>java.awt.event.MouseEvent</a> me ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>The editor component should delegate to these.</p>

<h3>Parameters</h3>
me - a MouseEvent

<h3>Returns:</h3>
the text
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getToolTipText&unscoped_q=getToolTipText">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#getToolTipText-java.awt.event.MouseEvent">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l529">[view source]</a>
<br>
<br>
<hr>
<a name="scrollToOffset-int"></a>
<h2>scrollToOffset</h2>
scrollToOffset( int offset ) &rarr; void

<p>scroll to make sure offset is visible.</p>

<h3>Parameters</h3>
offset - an int

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=scrollToOffset&unscoped_q=scrollToOffset">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#scrollToOffset-int">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l192">[view source]</a>
<br>
<br>
<hr>
<a name="setExpressionLookup-org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup"></a>
<h2>setExpressionLookup</h2>
setExpressionLookup( <a href='https://cottagesystems.com/~jbf/autoplot/doc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport/ExpressionLookup.html'>org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup</a> l ) &rarr; void

<p></p>

<h3>Parameters</h3>
l - an EditorAnnotationsSupport.ExpressionLookup

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=setExpressionLookup&unscoped_q=setExpressionLookup">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.md">[view on GitHub]</a>
 <a href="https://cottagesystems.com/~jbf/autoplot/doc2018/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.html#setExpressionLookup-org.autoplot.jythonsupport.ui.EditorAnnotationsSupport.ExpressionLookup">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/ui/EditorAnnotationsSupport.java#l494">[view source]</a>
<br>
<br>