You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/08/02 05:46:17 UTC

[GitHub] [netbeans] lkishalmi commented on a diff in pull request #4442: Make sure, that Java, Groovy and Truffle breakpoints are not clashing

lkishalmi commented on code in PR #4442:
URL: https://github.com/apache/netbeans/pull/4442#discussion_r935134505


##########
java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/actions/ToggleBreakpointsInLanguagesActionProvider.java:
##########
@@ -47,7 +47,7 @@ public class ToggleBreakpointsInLanguagesActionProvider extends ActionsProviderS
     
     private static final Set<String> IGNORED_MIME_TYPES = new HashSet<>(
             // We have JSLineBreakpoint in JavaScript

Review Comment:
   This is telling Truffle not to handle Groovy, otherwise both Truffle and Groovy will be registered on the toggle breakpoint action. Due to a "bug" in the Debugger API Truffle wins which then do not place a breakpoint into Groovy.



##########
groovy/groovy.debug/src/org/netbeans/modules/groovy/debug/GroovyBreakpointStratifier.java:
##########
@@ -78,7 +79,7 @@ public void stratify(JPDABreakpoint breakpoint) {
                 String printText = pt.replace("{groovyName}", (groovyName != null) ? groovyName : "?"); // NOI18N
                 String groovyPath = getGroovyPath(url, fo);
 

Review Comment:
   Once Truffle out of the way, this stratifier gets called and adds Groovy stratum to the breakpoint.



##########
groovy/groovy.debug/src/org/netbeans/modules/groovy/debug/GroovyBreakpointAnnotationListener.java:
##########
@@ -71,16 +71,22 @@ public void propertyChange (PropertyChangeEvent e) {
     @Override
     public void breakpointAdded (Breakpoint b) {
         if (b instanceof LineBreakpoint) {
-            ((LineBreakpoint) b).addPropertyChangeListener (this);
-            annotate ((LineBreakpoint) b);
+            LineBreakpoint lb = (LineBreakpoint) b;

Review Comment:
   Only act on breakpoint which has Groovy stratum. Java files will be handled by the Java JPDA breakpoint handler.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists