String fileName = keyCombos.getKeyCombo(trigger);
SnipReader snipReader = new SnipReader();
IFile activeFile = null;
if (this.editor.getEditorInput() instanceof IFileEditorInput) {
activeFile = ((IFileEditorInput) this.editor.getEditorInput()).getFile();
}
snipReader.read(fileName);
String indentString = "";
try {
int lineNumber = doc.getLineOfOffset(lastSpaceOffset);
int lineOffset = doc.getLineOffset(lineNumber);
indentString = doc.get().substring(lineOffset,lastSpaceOffset);
}
catch (Exception e) {
System.err.println(e);
// do nothing
//System.err.println("Insert snippet failed to get insert string.");
}
if (indentString.length() > 0) {
snipReader.performIndent(indentString);
}
String snippet = "";
int finalCursorOffset = -1;
for (int i=0; i < loopcount; i++) {
start = SnipVarParser.parse(snipReader.getSnipStartBlock(),activeFile,this.editor.getSite().getShell());
end = SnipVarParser.parse(snipReader.getSnipEndBlock(),activeFile,this.editor.getSite().getShell());
if (start == null || end == null) {
snippet = null;
break;
}
else {