private int getNumberOfNewLinesTillSelectionIndex(String allLogText, int selectionIndex) {
 			int numberOfNewlines = 0;
 			int pos = 0;
 			while((pos = allLogText.indexOf("\n", pos))!=-1 && pos <= selectionIndex) {
 				numberOfNewlines++;
 				pos++;
 			}
 			return numberOfNewlines;
 		}