Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 156851 Details for
Bug 283586
Traditional Rendering are not disposed after Memory Browser is closed or Debug Session is terminated.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
adds logging to platform debug plugin to show problem
patch_283586_logging (text/plain), 8.87 KB, created by
John Cortell
on 2010-01-21 14:44:59 EST
(
hide
)
Description:
adds logging to platform debug plugin to show problem
Filename:
MIME Type:
Creator:
John Cortell
Created:
2010-01-21 14:44:59 EST
Size:
8.87 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java,v >retrieving revision 1.22 >diff -u -r1.22 AbstractMemoryViewPane.java >--- ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java 25 Oct 2009 21:30:19 -0000 1.22 >+++ ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java 21 Jan 2010 19:40:51 -0000 >@@ -205,7 +205,15 @@ > fViewPaneCanvas.layout(); > } > } else { //otherwise, add a new one >- fTabFolderForDebugView.put(key, new CTabFolder(fViewPaneCanvas, SWT.NULL)); >+ CTabFolder tabFolder = new CTabFolder(fViewPaneCanvas, SWT.NULL); >+ if (!fTabFolderForDebugView.containsKey(key)) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(tabFolder, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } >+ >+ fTabFolderForDebugView.put(key, tabFolder); > setTabFolder((CTabFolder)fTabFolderForDebugView.get(key)); > fViewPaneCanvas.layout(); > } >@@ -290,8 +298,15 @@ > public void run() { > //remove the tab folder , and all contained tab items > disposeOfFolder((CTabFolder) folder); >- if (fTabFolderForDebugView != null) >+ if (fTabFolderForDebugView != null) { >+ System.out.println("Removing tabFolder " + >+ LoggingUtils.toString(folder, true) + >+ " from table in " + >+ LoggingUtils.toString(this, true)); >+ > fTabFolderForDebugView.remove(key); >+ } >+ > } > }); > } >@@ -323,6 +338,9 @@ > } > > // set to null so that clean up is only done once >+ System.out.println("Clearing table in " + >+ LoggingUtils.toString(this, true)); >+ > fTabFolderForDebugView.clear(); > fTabFolderForDebugView = null; > } >Index: ui/org/eclipse/debug/internal/ui/views/memory/LoggingUtils.java >=================================================================== >RCS file: ui/org/eclipse/debug/internal/ui/views/memory/LoggingUtils.java >diff -N ui/org/eclipse/debug/internal/ui/views/memory/LoggingUtils.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/debug/internal/ui/views/memory/LoggingUtils.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,57 @@ >+/******************************************************************************* >+ * Copyright (c) 2009 Freescale Semiconductor, Inc. and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Freescale Semiconductor - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.debug.internal.ui.views.memory; >+ >+/** >+ * Some general purpose functions that can be useful for logging/tracing activities. >+ */ >+public class LoggingUtils { >+ /** >+ * Return a string that uniquely identifies a Java object reference, in the >+ * form "classname@id", where 'classname' is the simple or package qualified >+ * name of the object's class, and 'id' is the hash code. >+ * >+ * Why not just use obj.toString()? That method is often overriden, and so >+ * cannot be relied on for a representation that uniquely identifies the >+ * object in the VM space. >+ * >+ * @param obj >+ * the object reference to stringify >+ * @param simpleClassName >+ * if true, use the class's simple name, otherwise the package >+ * qualified one >+ * >+ * @return the stringified representation of the object reference >+ */ >+ public static String toString(Object obj, boolean simpleClassName) { >+ if (obj == null) { >+ return "null"; //$NON-NLS-1$ >+ } >+ String className = obj.getClass().getName(); >+ if (simpleClassName) { >+ int lastDot = className.lastIndexOf('.'); >+ if ((lastDot >= 0) && ((lastDot + 1) < className.length())) { >+ className = className.substring(lastDot + 1); >+ } >+ } >+ >+ String id = Integer.toHexString(System.identityHashCode(obj)); >+ >+ return className + "@" + id; //$NON-NLS-1$ >+ } >+ >+ /** >+ * Equivalent to toString(obj, false) >+ */ >+ public static String toString(Object obj) { >+ return toString(obj, true); >+ } >+} >Index: ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java,v >retrieving revision 1.54 >diff -u -r1.54 RenderingViewPane.java >--- ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java 5 Mar 2009 21:40:06 -0000 1.54 >+++ ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java 21 Jan 2010 19:40:52 -0000 >@@ -177,8 +177,12 @@ > if (retrieve != null) > { > if (fTabFolderForDebugView.contains(tabFolder)) >- { >+ { > fTabFolderForDebugView.remove(MemoryViewUtil.getHashCode(retrieve)); >+ System.out.println("Removing tabFolder " + >+ LoggingUtils.toString(tabFolder, true) + >+ " from table in " + >+ LoggingUtils.toString(this, true)); > } > } > >@@ -606,6 +610,12 @@ > // backup current retrieve and tab folder > if (currentRetrieve != null && tabFolder != null) > { >+ if (!fTabFolderForDebugView.containsKey(MemoryViewUtil.getHashCode(currentRetrieve))) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(tabFolder, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } > fTabFolderForDebugView.put(MemoryViewUtil.getHashCode(currentRetrieve), tabFolder); > } > } >@@ -623,6 +633,13 @@ > if (folder != null) > { > setTabFolder(folder); >+ if (!fTabFolderForDebugView.containsKey(key)) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(tabFolder, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } >+ > fTabFolderForDebugView.put(key, folder); > fViewPaneCanvas.layout(); > } >@@ -639,6 +656,12 @@ > else > { > emptyFolder(); >+ if (!fTabFolderForDebugView.containsKey(key)) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(fEmptyTabFolder, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } > fTabFolderForDebugView.put(key, fEmptyTabFolder); > fViewPaneCanvas.layout(); > } >@@ -849,8 +872,15 @@ > fMemoryBlockFromTabFolder.put(folder, memoryBlock); > setTabFolder((CTabFolder)fTabFolderForMemoryBlock.get(memoryBlock)); > IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(memoryBlock); >- if (retrieval != null) >+ if (retrieval != null) { >+ if (!fTabFolderForDebugView.containsKey(MemoryViewUtil.getHashCode(retrieval))) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(fTabFolderForMemoryBlock.get(memoryBlock), true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } > fTabFolderForDebugView.put(MemoryViewUtil.getHashCode(retrieval), fTabFolderForMemoryBlock.get(memoryBlock)); >+ } > else > DebugUIPlugin.logErrorMessage("Memory block retrieval for memory block is null."); //$NON-NLS-1$ > >@@ -870,8 +900,16 @@ > setTabFolder(toDisplay); > IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(memoryBlock); > >- if (retrieval != null) >+ if (retrieval != null) { >+ if (!fTabFolderForDebugView.containsKey(MemoryViewUtil.getHashCode(retrieval))) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(toDisplay, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } > fTabFolderForDebugView.put(MemoryViewUtil.getHashCode(retrieval), toDisplay); >+ >+ } > else > DebugUIPlugin.logErrorMessage("Memory block retrieval is null for memory block."); //$NON-NLS-1$ > >@@ -1209,7 +1247,13 @@ > > IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(memory); > if (retrieval != null) >- { >+ { >+ if (!fTabFolderForDebugView.containsKey(MemoryViewUtil.getHashCode(retrieval))) { >+ System.out.println("Adding tabFolder " + >+ LoggingUtils.toString(folder, true) + >+ " to table in " + >+ LoggingUtils.toString(this, true)); >+ } > fTabFolderForDebugView.put(MemoryViewUtil.getHashCode(retrieval), folder); > } > else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 283586
:
149346
|
156501
|
156503
|
156707
| 156851