@@ -0,0 +1,1022 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage flow.netbeans.markdown.utils;%0A%0Aimport flow.netbeans.markdown.highlighter.MarkdownTokenId;%0Aimport javax.swing.text.AbstractDocument;%0Aimport javax.swing.text.Document;%0Aimport org.netbeans.api.lexer.TokenHierarchy;%0Aimport org.netbeans.api.lexer.TokenSequence;%0A%0A/**%0A *%0A * @author junichi11%0A */%0Apublic class MarkdownDocUtil %7B%0A%0A    private MarkdownDocUtil() %7B%0A    %7D%0A%0A    public static TokenSequence%3CMarkdownTokenId%3E getTokenSequence(Document document) %7B%0A        TokenHierarchy%3CDocument%3E tokenHierarchy = TokenHierarchy.get(document);%0A        AbstractDocument ad = (AbstractDocument) document;%0A        ad.readLock();%0A        TokenSequence%3CMarkdownTokenId%3E ts;%0A        try %7B%0A            ts = tokenHierarchy.tokenSequence(MarkdownTokenId.language());%0A        %7D finally %7B%0A            ad.readUnlock();%0A        %7D%0A        return ts;%0A    %7D%0A%0A%7D%0A

Add MarkdownDocUtil