fireChangedUpdate(new DefaultDocumentEvent(0,0, DocumentEvent.EventType.CHANGE));
fireFoldStructureChanged();
	public boolean expandFoldAt(int line)	{		int initialFoldLevel = getFoldLevel(line);		int start = 0;		int end = lineCount - 1;		if(line != lineCount - 1			&& getFoldLevel(line + 1) > initialFoldLevel)		{			// this line is the start of a fold			start = line + 1;			for(int i = line + 1; i < lineCount; i++)			{				if(getFoldLevel(i) <= initialFoldLevel)				{					end = i - 1;					break;				}			}		}		else		{			boolean ok = false;			// scan backwards looking for the start			for(int i = line - 1; i >= 0; i--)			{				if(getFoldLevel(i) < initialFoldLevel)				{					start = i + 1;					ok = true;					break;				}			}			if(!ok)			{				// no folds in buffer				return false;			}			for(int i = line + 1; i < lineCount; i++)			{				if(getFoldLevel(i) < initialFoldLevel)				{					end = i - 1;					break;				}			}		}		for(int i = start; i <= end; i++)			lineInfo[i].visible = true;		int delta = (end - start + 1);		System.err.println("expand from " + start + " to " + end);		// I forgot to do this at first and it took me ages to		// figure out		int virtualLine = physicalToVirtual(start);		System.err.println("virtual start is " + virtualLine			+ ", physical start is " + start);		// update virtual -> physical map		virtualLineCount += delta;		System.err.println("virtual line count is " + virtualLineCount);		if(virtualLines.length <= virtualLineCount)		{			int[] virtualLinesN = new int[				(virtualLineCount + 1) * 2];			System.arraycopy(virtualLines,0,				virtualLinesN,0,virtualLines.length);			virtualLines = virtualLinesN;		}		System.err.println("copy from " + (virtualLine)			+ " to " + (virtualLine + delta));		System.arraycopy(virtualLines,virtualLine,virtualLines,			virtualLine + delta,virtualLineCount);		for(int j = 0; j <= delta; j++)		{			System.err.println((virtualLine + j) + " maps to " + (start + j));			virtualLines[virtualLine + j] = start + j;		}		// this sucks how we use document changed events		// to notify that the fold structure changed...		// but then, it does make sense		fireChangedUpdate(new DefaultDocumentEvent(0,0,			DocumentEvent.EventType.CHANGE));		return true;	}