Bug 236628 [Viewers] [JFace] Excessive Memory Usage by Project Explorer because of styles
Build ID: I20080516-1333 Steps To Reproduce: Project Explorer creates duplicate identical strings for every entry in it and wastes few Megabytes of memory depending on the scenario. In the update method of NavigatorDecoratingLabelProvider extending DelegatingStyledCellLabelProvider the call to cell.setStyleRanges(newStyleRanges) results in duplicate strings for the same column. The duplicate strings are created in ViewerRow.setStyleRanges public void setStyleRanges(int columnIndex, StyleRange[] styleRanges) { getItem().setData(KEY_TEXT_LAYOUT + columnIndex, styleRanges); } More information:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.java
* @param point
	 * @return int or -1 if it cannot be found.
	 */
	public int getColumnIndex(Point point) {
		int count = getColumnCount();
		
		if (count == 0) {
			return 0;
		}
		for (int i = 0; i < count; i++) {
			if (getBounds(i).contains(point)) {
				return i;
			}
		}
		return -1;
	}
	/**
	 * Get a ViewerCell for the column at index.
	 * 
	 * @param column
	 * @return {@link ViewerCell} or <code>null</code> if the index is negative.
	 */
	public ViewerCell getCell(int column) {
		if (column >= 0)
			return new ViewerCell((ViewerRow) clone(), column, getElement());
		return null;
	}
	/**
	 * Get the Control for the receiver.
	 *