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
/**
	 * Scrolls the cell at this index into view
	 * <p>
	 * <b>Because of backwards API compatibility the default implementation is a
	 * no-op. Implementators of {@link ColumnViewer} should overwrite this
	 * method if their widget supports reordered columns</b>
	 * </p>
	 * 
	 * @param columnIndex
	 *            the column index
	 * @return return <code>true</code> when the cell is scrolled into view
	 * @since 3.5
	 */
	protected boolean scrollCellIntoView(int columnIndex) {
		return false;
	}
	/**
	 * Returns <code>true</code> if the column with the given index is visible
	 * 
	 * @param columnIndex
	 *            the column index
	 * 
	 * @return <code>true</code> if the column is visible
	 * @since 3.5
	 */
	protected boolean isColumnVisible(int columnIndex) {
		return getWidth(columnIndex) > 0;
	}
}