Examples of KLineType


Examples of winterwell.markdown.pagemodel.MarkdownPage.KLineType

  throws BadLocationException {
    // Get doc info
    List<String> lines = page.getText();
    List<KLineType> lineInfo = page.getLineTypes();
    // Check we are in a paragraph or list
    KLineType pType = lineInfo.get(lineNum);
    switch(pType) {
    case NORMAL: break;
    default: // Not in a paragraph, so we cannot format. 
      return null;
    }
View Full Code Here

Examples of winterwell.markdown.pagemodel.MarkdownPage.KLineType

    int caretOffset = fTextEditor.getViewer().getTextWidget().getCaretOffset();
    IDocument doc = fTextEditor.getDocument();
    int line = doc.getLineOfOffset(caretOffset);
    List<KLineType> lineTypes = page.getLineTypes();
    for(; line>-1; line--) {
      KLineType lt = lineTypes.get(line);
      if (lt.toString().startsWith("H")) break;
    }
    if (line<0) return;
    Header header = (Header) page.getPageObject(line);
    // Set
    IStructuredSelection selection = new StructuredSelection(header);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.