}
}
} catch (BadLocationException e) {
PHPUiPlugin.log(e);
}
JobSafeStructuredDocument newdocument = new JobSafeStructuredDocument(
new PhpSourceParser());
String start = "<?php"; //$NON-NLS-1$
newdocument.set(start + newline + tempsb.toString());
PhpFormatter formatter = new PhpFormatter(0, newdocument.getLength(),
true, indentationObject);
formatter.format(newdocument.getFirstStructuredDocumentRegion());
List<String> list = new ArrayList<String>();
try {
int lineNumber = newdocument.getNumberOfLines();
for (int i = 0; i < lineNumber; i++) {
if (i == 0) {
continue;
}
IRegion region = newdocument.getLineInformation(i);
String line = newdocument.get(region.getOffset(),
region.getLength());
list.add(line);
}
} catch (BadLocationException e) {
}