Max and Michael,
thanks for your feedback and advice so far. I'll be happy to submit Bugzilla issues and share my code, though not before next Tuesday, as I'll be away for a while. Sharing the code might take a bit longer, I'm mainly kicking tyres at the moment, so I'd like to clean things up first.
I'm working with Luna SR1 at the moment, using the latest JSDT sources from Git in my workspace. (I.e. JDT is from Luna SR1.)
I have some standalone tests (i.e. not using Eclipse) launching a Java VM with a simple Java/Nashorn/_javascript_ class via JDI and settings breakpoints and inspecting Nashorn classes directly via the JDI API. The script classes only have the default Java stratum - it would be interesting to know why Nashorn developers did not add a JS stratum, they probably had a reason for that. So I don't think upgrading to a Mars snapshot would make a big difference in this respect.
Anyway, via DebuggerSupport, you can obtain SourceInfo for each script class, and this is enough to map the line numbers from the Java stratum to the _javascript_ source files.
The point with the wildcard ClassPrepareBreakpoint is: Nashorn generates one or more Java classes from each JS source file, it seems there is at least one additional class per JS function. The class names satisfy the naming pattern jdk.nashorn.internal.scripts.Script$*, but there is no way to determine the suffixes beforehand, so the easiest way of implementing something like a ScriptLoad breakpoint is to use a ClassPrepareBreakpoint for this pattern and to expect this to be triggered multiple times per script file, each class contributing a couple of Locations from the given file.
This works fine in my stand-alone test. With JDT, I can set the breakpoint, but my breakpoint listener does not get called, since the JDI event handler compares class names by equals() and does not fire a breakpoint event for the pattern match.