OccurrenceLocation location, HashMap lineToGroup) {
int lineNumber = astRoot.getLineNumber(location.getOffset());
if (lineNumber <= 0) {
return null;
}
DLTKElementLine lineElement = null;
Integer key = Integer.valueOf(lineNumber);
lineElement = (DLTKElementLine) lineToGroup.get(key);
if (lineElement == null) {
int lineStartOffset = astRoot.getPosition(lineNumber, 0);
if (lineStartOffset >= 0) {
// lineNumber - 1, FIXME - set the correct line content
lineElement = new DLTKElementLine(astRoot.getSourceModule(),
lineStartOffset, ""); //$NON-NLS-1$
lineToGroup.put(key, lineElement);
}
}
return lineElement;