Tabnine Logo
HighlighterIterator.getDocument
Code IndexAdd Tabnine to your IDE (free)

How to use
getDocument
method
in
com.intellij.openapi.editor.highlighter.HighlighterIterator

Best Java code snippets using com.intellij.openapi.editor.highlighter.HighlighterIterator.getDocument (Showing top 2 results out of 315)

origin: KronicDeth/intellij-elixir

@Nullable
@Override
public CharSequence getClosingQuote(HighlighterIterator highlighterIterator, int offset) {
  CharSequence closingQuote = null;
  if (highlighterIterator.getStart() > 0) {
    highlighterIterator.retreat();
    try {
      IElementType tokenType = highlighterIterator.getTokenType();
      if (CLOSING_QUOTE_BY_OPENING_QUOTE.get(tokenType) != null) {
        Document document = highlighterIterator.getDocument();
        if (document != null) {
          String promoter = document.getText(
              new TextRange(highlighterIterator.getStart(), highlighterIterator.getEnd())
          );
          String terminator = StackFrame.TERMINATOR_BY_PROMOTER.get(promoter);
          if (terminator != null) {
            if (terminator.length() >= 3) {
              closingQuote = "\n" + terminator;
            } else {
              closingQuote = terminator;
            }
          }
        }
      }
    } finally {
      highlighterIterator.advance();
    }
  }
  return closingQuote;
}
origin: qeesung/HighlightBracketPair

public Brace(IElementType elementType, HighlighterIterator iterator) {
  this.elementType = elementType;
  this.offset = iterator.getStart();
  Document document = iterator.getDocument();
  this.text = document.getText(new TextRange(iterator.getStart(),
      iterator.getEnd()));
}
com.intellij.openapi.editor.highlighterHighlighterIteratorgetDocument

Popular methods of HighlighterIterator

  • atEnd
  • getTokenType
  • advance
  • retreat
  • getEnd
  • getStart
  • getTextAttributes

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • Kernel (java.awt.image)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now