eppleton commented on code in PR #9433:
URL: https://github.com/apache/netbeans/pull/9433#discussion_r4119300360
##########
java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/SourcePath.java:
##########
@@ -488,24 +505,22 @@ public void showSource (Field v, final boolean
reportUnknownSource) {
final int ln = lineNumber;
final String u = url;
- SwingUtilities.invokeLater (new Runnable () {
- public void run () {
- boolean success = EditorContextBridge.getContext().showSource (
- u,
- ln,
- debugger
- );
- if (reportUnknownSource && !success) {
- String message = NbBundle.getMessage(SourcePath.class,
"No_URL_Warning", sourcePath);
- NotifyDescriptor d = new NotifyDescriptor.Message(message,
NotifyDescriptor.WARNING_MESSAGE);
- DialogDisplayer.getDefault().notifyLater(d);
- }
+ handleShowSource(u, ln, () -> {
+ if (reportUnknownSource) {
+ String message = NbBundle.getMessage(SourcePath.class,
"No_URL_Warning", sourcePath);
+ NotifyDescriptor d = new NotifyDescriptor.Message(message,
NotifyDescriptor.WARNING_MESSAGE);
+ DialogDisplayer.getDefault().notifyLater(d);
}
});
}
- static String convertSlash (String original) {
- return original.replace (File.separatorChar, '/');
+ static String toPath (String original) {
+ String slashes = original.replace (File.separatorChar, '/');
+ if (slashes.contains("/")) {
+ return slashes;
+ } else {
+ return slashes.replace('.', '/');
Review Comment:
regression: toPath now also converts '.' to a slash. A class "Foo.java" in
default package becomes "Foo/java" and sourceAvailable(csf, …) /
sourceAvailable(thread, …) return false (it was true before). SmartSteppingImpl
relies on sourceAvailable(thread, null, false), so step-into may skip such
class.
--
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