Skip to content

Commit eeb21fe

Browse files
authored
Merge pull request #110 from kgibm/issue109
[Fix #109] Add INFO message to display setting of keep unreachables objects preference
2 parents caad7ab + 1006a24 commit eeb21fe

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/internal/GarbageCleaner.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ public static int[] clean(final PreliminaryIndexImpl idx, final SnapshotImplBuil
153153
if (newNoOfObjects < oldNoOfObjects)
154154
{
155155
Object un = idx.getSnapshotInfo().getProperty("keep_unreachable_objects"); //$NON-NLS-1$
156+
157+
listener.sendUserMessage(Severity.INFO, MessageUtil.format(Messages.GarbageCleaner_UnreachablesSetting,
158+
(un instanceof Integer)), null);
159+
156160
if (un instanceof Integer)
157161
{
158162
int newRoot;

plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/internal/Messages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class Messages extends NLS
3838
public static String GarbageCleaner_RemovedUnreachableObjects;
3939
public static String GarbageCleaner_RemovingUnreachableObjects;
4040
public static String GarbageCleaner_SearchingForUnreachableObjects;
41+
public static String GarbageCleaner_UnreachablesSetting;
4142
public static String GarbageCleaner_Writing;
4243
public static String HistogramBuilder_Error_FailedToStoreInHistogram;
4344
public static String IndexReader_Error_IndexIsEmbedded;

plugins/org.eclipse.mat.parser/src/org/eclipse/mat/parser/internal/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ GarbageCleaner_ReIndexingOutboundIndex=Re-indexing outbound index
3030
GarbageCleaner_RemovedUnreachableObjects=Removed {0} unreachable objects using {1} bytes
3131
GarbageCleaner_RemovingUnreachableObjects=Removing unreachable objects
3232
GarbageCleaner_SearchingForUnreachableObjects=Searching for unreachable objects
33+
GarbageCleaner_UnreachablesSetting=Keep unreachable objects preference is set to {0}
3334
GarbageCleaner_Writing=Writing {0}
3435
HistogramBuilder_Error_FailedToStoreInHistogram=Failed to store class data in histogram\! Class data for this class id already stored in histogram\!
3536
IndexReader_Error_IndexIsEmbedded=Index is embedded; stream must be set externally

0 commit comments

Comments
 (0)