Ejemplo n.º 1
0
  /**
   * Remove a String from a document
   *
   * @param offset The initial offset
   * @param length Length of the String to be removed
   * @throws BadLocationException If the remove action fails
   */
  @Override
  public void remove(int offset, int length) throws BadLocationException {

    super.remove(offset, length);
    processChangedLines(offset, length);
  }
Ejemplo n.º 2
0
  /**
   * Insert a string with syntax highlighting
   *
   * @param offset The offset to insert the string
   * @param str The String to be inserted in the document
   * @param a The AttributeSet for the String
   * @throws BadLocationException If the insert action fails
   */
  @Override
  public void insertString(int offset, String str, AttributeSet a) throws BadLocationException {

    super.insertString(offset, str, getStyle(InformSyntax.Normal.getName()));
    processChangedLines(offset, str.length());
  }