String newline = document.getLineDelimiter();
for (int i = 0; i < textRegions.size(); i++) {
ITextRegion textRegion = textRegions.get(i);
if (textRegion instanceof PhpScriptRegion) {
int startOffset = sdRegion.getStartOffset(textRegion);
PhpScriptRegion scriptRegion = (PhpScriptRegion) textRegion;
ITextRegion[] phpTokens;
try {
phpTokens = scriptRegion.getPhpTokens(0,
textRegion.getLength());
for (int j = phpTokens.length - 1; j >= 0; j--) {
ITextRegion phpToken = phpTokens[j];
int start = startOffset + phpToken.getStart();
int end = start + phpToken.getLength();