Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 372002
Collapse All | Expand All

(-)src/org/eclipse/mat/impl/chart/ChartBuilder.java (-1 / +7 lines)
Lines 41-46 Link Here
41
import org.eclipse.core.runtime.Platform;
41
import org.eclipse.core.runtime.Platform;
42
import org.eclipse.emf.common.util.EList;
42
import org.eclipse.emf.common.util.EList;
43
import org.eclipse.mat.query.IResultPie;
43
import org.eclipse.mat.query.IResultPie;
44
import org.eclipse.mat.query.IResultPie.ColoredSlice;
44
import org.eclipse.mat.query.IResultPie.Slice;
45
import org.eclipse.mat.query.IResultPie.Slice;
45
import org.eclipse.mat.util.MessageUtil;
46
import org.eclipse.mat.util.MessageUtil;
46
import org.eclipse.mat.util.Units;
47
import org.eclipse.mat.util.Units;
Lines 141-147 Link Here
141
        {
142
        {
142
            int[] color = COLORS[index % COLORS.length];
143
            int[] color = COLORS[index % COLORS.length];
143
            ColorDefinition defn;
144
            ColorDefinition defn;
144
            Color explicitColor = slices.get(index).getColor();
145
            Color explicitColor = null;
146
            Slice slice = slices.get(index); 
147
            if (slice instanceof ColoredSlice)
148
            {
149
                explicitColor = ((ColoredSlice) slice).getColor();
150
            }
145
            if (explicitColor == null)
151
            if (explicitColor == null)
146
            {
152
            {
147
                defn = ColorDefinitionImpl.create(color[0], color[1], color[2]);
153
                defn = ColorDefinitionImpl.create(color[0], color[1], color[2]);
(-)src/org/eclipse/mat/snapshot/query/PieFactory.java (-1 / +4 lines)
Lines 129-134 Link Here
129
     * @param color
129
     * @param color
130
     *            Explicit color of the slice
130
     *            Explicit color of the slice
131
     * @return a new slice
131
     * @return a new slice
132
     * @since 1.2
132
     */
133
     */
133
    public Slice addSlice(int objectId, Color color) throws SnapshotException
134
    public Slice addSlice(int objectId, Color color) throws SnapshotException
134
    {
135
    {
Lines 159-164 Link Here
159
     * @param color
160
     * @param color
160
     *        Explicit color of the slice
161
     *        Explicit color of the slice
161
     * @return a new slice
162
     * @return a new slice
163
     * @since 1.2
162
     */
164
     */
163
    public Slice addSlice(IObject object, Color color)
165
    public Slice addSlice(IObject object, Color color)
164
    {
166
    {
Lines 198-203 Link Here
198
     * @param color
200
     * @param color
199
     *            the color to use for the slice
201
     *            the color to use for the slice
200
     * @return a new slice
202
     * @return a new slice
203
     * @since 1.2
201
     */
204
     */
202
    public Slice addSlice(int objectId, String label, long usedHeapSize, long retainedHeapSize, Color color)
205
    public Slice addSlice(int objectId, String label, long usedHeapSize, long retainedHeapSize, Color color)
203
    {
206
    {
Lines 252-258 Link Here
252
        }
255
        }
253
    }
256
    }
254
257
255
    private final static class SliceImpl implements IResultPie.Slice, Serializable
258
    private final static class SliceImpl implements IResultPie.ColoredSlice, Serializable
256
    {
259
    {
257
        private static final long serialVersionUID = 1L;
260
        private static final long serialVersionUID = 1L;
258
261
(-)src/org/eclipse/mat/query/IResultPie.java (+9 lines)
Lines 36-41 Link Here
36
36
37
        IContextObject getContext();
37
        IContextObject getContext();
38
        
38
        
39
    }
40
    
41
    /**
42
     * A slice of the pie with color information
43
     * 
44
     * @since 1.2
45
     */
46
    public interface ColoredSlice extends Slice
47
    {
39
        Color getColor();
48
        Color getColor();
40
    }
49
    }
41
50

Return to bug 372002