private String getPrecedingLine(String text, int commentStart)
	{
		int endingIndex = commentStart - 1;
		
		// move just before end of previous line
		while (endingIndex >= 0)
		{
			char c = text.charAt(endingIndex);
			
			if (c == '\n')
			{
				if (endingIndex >= 0 && text.charAt(endingIndex) == '\r')
				{
					endingIndex--;
				}
				
				break;
			}
			else if (c == '\r')
			{
				break;
			}
			else
			{
				endingIndex--;
			}
		}
		
		int startingIndex = endingIndex - 1;
		
		// move to beginning of this line
		while (startingIndex >= 0)
		{
			char c = text.charAt(startingIndex);
			
			if (c == '\n' || c == '\r')
			{
				startingIndex++;
				break;
			}
			else
			{
				startingIndex--;
			}
		}
		
		return text.substring(startingIndex, endingIndex);
	}