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++) {