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
* which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
 *                                               - fix in bug: 166346,167325,174355,195908,198035,215069,227421
 *******************************************************************************/
package org.eclipse.jface.viewers;
import org.eclipse.jface.util.Policy;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Widget;
/**
 * ViewerRow is the abstract superclass of the part that represents items in a
 * Table or Tree. Implementors of {@link ColumnViewer} have to provide a
 * concrete implementation for the underlying widget
 * 
 * @since 3.3
 * 
 */
public abstract class ViewerRow implements Cloneable {
	/**
	 * Constant denoting the row above the current one (value is 1).
	 *