[hg] main-silver: #223730: Handle component breakpoints separate...

  • From:
  • To:
  • Subject: [hg] main-silver: #223730: Handle component breakpoints separate...
  • Date: Mon, 17 Dec 2012 10:17:52 -0800

changeset bb4680752802 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/bb4680752802
description:
        #223730: Handle component breakpoints separately for each engine.

diffstat:

 
debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
 |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (41 lines):

diff --git 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
--- 
a/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
+++ 
b/debugger.jpda.visual/src/org/netbeans/modules/debugger/jpda/visual/VisualDebuggerListener.java
@@ -122,7 +122,7 @@
     private static final String PROPERTIES_TCC = "TrackComponentChanges";  
// NOI18N
     private static final String PROPERTIES_UPLOAD_AGENT = "UploadAgent";  // 
NOI18N
     
-    private Collection<Breakpoint> helperComponentBreakpoints = new 
ArrayList<Breakpoint>();
+    private final Map<DebuggerEngine, Collection<Breakpoint>> 
helperComponentBreakpointsMap = new HashMap<DebuggerEngine, 
Collection<Breakpoint>>();
     private final Properties properties;
     private volatile Boolean isTrackComponentChanges = null;
     
@@ -159,6 +159,7 @@
         final JPDADebugger debugger = engine.lookupFirst(null, 
JPDADebugger.class);
         boolean uploadAgent = properties.getBoolean(PROPERTIES_UPLOAD_AGENT, 
true);
         logger.log(Level.FINE, "engineAdded({0}), debugger = {1}, 
uploadAgent = {2}", new Object[]{engine, debugger, uploadAgent});
+        Collection<Breakpoint> helperComponentBreakpoints = new 
ArrayList<Breakpoint>();
         if (debugger != null && uploadAgent) {
             final AtomicBoolean inited = new AtomicBoolean(false);
             final MethodBreakpoint[] mb = new MethodBreakpoint[2];
@@ -233,6 +234,9 @@
             }
             
         }
+        synchronized (helperComponentBreakpointsMap) {
+            helperComponentBreakpointsMap.put(engine, 
helperComponentBreakpoints);
+        }
     }
 
     private void initDebuggerRemoteService(JPDAThread thread, 
RemoteServices.ServiceType sType) {
@@ -348,6 +352,10 @@
         if (debugger != null) {
             stopDebuggerRemoteService(debugger);
         }
+        Collection<Breakpoint> helperComponentBreakpoints;
+        synchronized (helperComponentBreakpointsMap) {
+            helperComponentBreakpoints = 
helperComponentBreakpointsMap.remove(engine);
+        }
         if (!helperComponentBreakpoints.isEmpty()) {
             Iterator<Breakpoint> it = helperComponentBreakpoints.iterator();
             while (it.hasNext()) {

[hg] main-silver: #223730: Handle component breakpoints separate...

mentlicher 12/17/2012

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close