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 58979 Details for
Bug 173898
[logical structures] Stepping with logical structure expanded results in blank labels
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]
Patch to cache logical structures in the java debugger.
cache-logical-structure.patch (text/plain), 3.81 KB, created by
Darin Wright
on 2007-02-14 12:07:31 EST
(
hide
)
Description:
Patch to cache logical structures in the java debugger.
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2007-02-14 12:07:31 EST
Size:
3.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.debug >Index: model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructure.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructure.java,v >retrieving revision 1.22 >diff -u -r1.22 JavaLogicalStructure.java >--- model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructure.java 24 Jan 2007 21:26:47 -0000 1.22 >+++ model/org/eclipse/jdt/internal/debug/core/logicalstructures/JavaLogicalStructure.java 14 Feb 2007 17:02:24 -0000 >@@ -10,7 +10,8 @@ > *******************************************************************************/ > package org.eclipse.jdt.internal.debug.core.logicalstructures; > >-import com.ibm.icu.text.MessageFormat; >+import java.util.HashMap; >+import java.util.Map; > > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.CoreException; >@@ -21,6 +22,7 @@ > import org.eclipse.debug.core.DebugEvent; > import org.eclipse.debug.core.DebugException; > import org.eclipse.debug.core.DebugPlugin; >+import org.eclipse.debug.core.IDebugEventSetListener; > import org.eclipse.debug.core.ILogicalStructureType; > import org.eclipse.debug.core.IStatusHandler; > import org.eclipse.debug.core.model.IDebugTarget; >@@ -47,7 +49,9 @@ > import org.eclipse.jdt.debug.eval.IEvaluationResult; > import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin; > >-public class JavaLogicalStructure implements ILogicalStructureType { >+import com.ibm.icu.text.MessageFormat; >+ >+public class JavaLogicalStructure implements ILogicalStructureType, IDebugEventSetListener { > > private static IStatusHandler fgStackFrameProvider; > >@@ -77,6 +81,8 @@ > * or <code>null</code> if this structure was defined by the user. > */ > private String fContributingPluginId= null; >+ >+ private Map fCache = new HashMap(); > > /** > * Performs the evaluations. >@@ -176,6 +182,11 @@ > fValue= value; > fDescription= description; > fVariables= variables; >+ init(); >+ } >+ >+ public void init() { >+ DebugPlugin.getDefault().addDebugEventListener(this); > } > > /** >@@ -210,6 +221,7 @@ > fVariables[j][1]= variableValue; > } > fContributingPluginId= configurationElement.getContributor().getName(); >+ init(); > } > > /** >@@ -222,10 +234,23 @@ > return getType((IJavaObject) value) != null; > } > >- /** >- * @see org.eclipse.debug.core.model.ILogicalStructureTypeDelegate#getLogicalStructure(IValue) >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.model.ILogicalStructureTypeDelegate#getLogicalStructure(org.eclipse.debug.core.model.IValue) > */ >- public IValue getLogicalStructure(IValue value) { >+ public synchronized IValue getLogicalStructure(IValue value) throws CoreException { >+ IValue logical = (IValue) fCache.get(value); >+ if (logical != null) { >+ return logical; >+ } >+ logical = internalGetLogicalStructure(value); >+ if (logical != null) { >+ fCache.put(value, logical); >+ } >+ return logical; >+ } >+ >+ private IValue internalGetLogicalStructure(IValue value) { > if (!(value instanceof IJavaObject)) { > return value; > } >@@ -477,4 +502,19 @@ > public String getId() { > return JDIDebugPlugin.getUniqueIdentifier() + fType + fDescription; > } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[]) >+ */ >+ public synchronized void handleDebugEvents(DebugEvent[] events) { >+ for (int i = 0; i < events.length; i++) { >+ DebugEvent event = events[i]; >+ if (event.getKind() == DebugEvent.RESUME) { >+ if (event.getDetail() != DebugEvent.EVALUATION_IMPLICIT) { >+ fCache.clear(); >+ } >+ } >+ } >+ >+ } > }
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 173898
:
58789
| 58979 |
62724
|
62792
|
62822