JaroslavTulach commented on a change in pull request #3417:
URL: https://github.com/apache/netbeans/pull/3417#discussion_r780234682
##########
File path:
ide/nativeimage.api/src/org/netbeans/modules/nativeimage/api/debug/NIDebugger.java
##########
@@ -257,6 +257,16 @@ public String getVersion() {
return provider.listVariables(name, includeNondebug, maxResults);
}
+ /**
+ * Get a list of source paths in the debuggee.
+ *
+ * @param nameRegexp regular expression that filters the list of source
paths
+ * @since 0.7
+ */
+ @CheckForNull
+ public List<SourceInfo> listSources(String nameRegexp) {
Review comment:
A note in `apichanges.xml` would be good. This method shall never return
`null`, rather empty list - unless you want to use `null` for some use-case. In
such case mention that in Javadoc.
##########
File path:
ide/nativeimage.api/src/org/netbeans/modules/nativeimage/spi/debug/NIDebuggerProvider.java
##########
@@ -194,4 +194,13 @@
default Map<SourceInfo, List<Symbol>> listVariables(String name, boolean
includeNondebug, int maxResults) {
return null;
}
+
+ /**
+ * Provide a list of source paths in the debuggee.
+ *
+ * @since 0.7
+ */
+ default List<SourceInfo> listSources(String nameRegexp) {
Review comment:
A note in API changes would be good. Specify that the method can return
`null`. State the `List` is immutable.
##########
File path:
java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/breakpoints/JPDABreakpointsHandler.java
##########
@@ -154,6 +159,25 @@ private Breakpoint added(JPDABreakpoint b) {
return null;
}
+ private String verifyFilePath(String filePath, String relativePath) {
+ if (relativePath != null) {
+ List<SourceInfo> sources = debugger.listSources(SOURCES_FOLDER +
File.separator + relativePath);
Review comment:
`listSources` is supposed to take RegExp - what will it do on Windows?
`\` is an escape character...
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists