Package io.emmet

Examples of io.emmet.TabStopStructure


      String line = getLineFromRange(getLineRangeFromPosition(start));
      String padding = getStringPadding(line);
      newValue = padString(value, padding);
    }
   
    TabStopStructure tabStops = new TabStopStructure(newValue);
    newValue = tabStops.getText();
   
    try {
      doc.replace(start, end - start, newValue);
     
      int totalLinks = tabStops.getTabStopsCount();
     
      if (totalLinks < 1) {
        tabStops.addTabStopToGroup("carets", newValue.length(), newValue.length());
      }
     
      String[] tabGroups = tabStops.getSortedGroupKeys();
      TabStop firstTabStop = tabStops.getFirstTabStop();
     
      if (totalLinks > 1 || firstTabStop != null && firstTabStop.getStart() != firstTabStop.getEnd()) {
        ITextViewer viewer = EclipseEmmetHelper.getTextViewer(editor);
        LinkedModeModel model = new LinkedModeModel();
        int exitPos = -1;
       
        for (int i = 0; i < tabGroups.length; i++) {
          TabStopGroup tabGroup = tabStops.getTabStopGroup(tabGroups[i]);
          LinkedPositionGroup group = null;
         
          if (tabGroups[i].equals("carets") || tabGroups[i].equals("0")) {
            int caretCount = tabGroup.getTabStopList().size();
            for (int j = 0; j < caretCount; j++) {
View Full Code Here


   * Removes caret placeholders and tabstops from text
   * @param text
   * @return
   */
  public String cleanText(String text) {
    TabStopStructure tss = new TabStopStructure(text);
    return tss.getText();
  }
View Full Code Here

      String line = getLineFromRange(getLineRangeFromPosition(start));
      String padding = getStringPadding(line);
      newValue = padString(value, padding);
    }
   
    TabStopStructure tabStops = new TabStopStructure(newValue);
    newValue = tabStops.getText();
   
    try {
      doc.replace(start, end - start, newValue);
     
      int totalLinks = tabStops.getTabStopsCount();
     
      if (totalLinks < 1) {
        tabStops.addTabStopToGroup("carets", newValue.length(), newValue.length());
      }
     
      String[] tabGroups = tabStops.getSortedGroupKeys();
      TabStop firstTabStop = tabStops.getFirstTabStop();
     
      if (totalLinks > 1 || firstTabStop != null && firstTabStop.getStart() != firstTabStop.getEnd()) {
        ITextViewer viewer = EclipseEmmetHelper.getTextViewer(editor);
        LinkedModeModel model = new LinkedModeModel();
        int exitPos = -1;
       
        for (int i = 0; i < tabGroups.length; i++) {
          TabStopGroup tabGroup = tabStops.getTabStopGroup(tabGroups[i]);
          LinkedPositionGroup group = null;
         
          if (tabGroups[i].equals("carets") || tabGroups[i].equals("0")) {
            int caretCount = tabGroup.getTabStopList().size();
            for (int j = 0; j < caretCount; j++) {
View Full Code Here

   * Removes caret placeholders and tabstops from text
   * @param text
   * @return
   */
  public String cleanText(String text) {
    TabStopStructure tss = new TabStopStructure(text);
    return tss.getText();
  }
View Full Code Here

TOP

Related Classes of io.emmet.TabStopStructure

Copyright © 2018 www.massapicom. 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.