This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
method to be added: org.netbeans.spi.debugger.jpda.EditorContext.getClassName (URL, lineNumber) bug to be fixed: 49031 - Breakpoints in 'secondary' classes are never reached In order to fix breakpoints in secondary classes I need to distinguish class for given url&line number.
I am missing diff, test, api changes entry. Take that as request.
Diff: cvs diff -r 1.4 -r 1.5 EditorContext.java (in directory C:\Hanz\Dev\trunk\debuggerjpda\api\src\org\netbeans\spi\debugger\jpda\) Index: EditorContext.java =================================================================== RCS file: /cvs/debuggerjpda/api/src/org/netbeans/spi/debugger/jpda/EditorContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -r1.4 -r1.5 178a179,191 > * Returns class name for given url and line number or null. > * > * @param url a url > * @param lineNumber a line number > * > * @return class name for given url and line number or null > */ > public abstract String getClassName ( > String url, > int lineNumber > ); > > /** cvs diff -r 1.14 -r 1.15 LineBreakpointImpl.java (in directory C:\Hanz\Dev\trunk\debuggerjpda\src\org\netbeans\modules\debugger\jpda\breakpoints\) Index: LineBreakpointImpl.java =================================================================== RCS file: /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/breakpoints/LineBreakpointImpl.java,v retrieving revision 1.14 retrieving revision 1.15 diff -r1.14 -r1.15 33a34 > import org.netbeans.modules.debugger.jpda.EditorContextBridge; 52c53 < private SourcePath engineContext; --- > private SourcePath sourcePath; 59c60 < SourcePath engineContext --- > SourcePath sourcePath 63c64 < this.engineContext = engineContext; --- > this.sourcePath = sourcePath; 76c77 < String className = engineContext.getRelativePath ( --- > String className = EditorContextBridge.getClassName ( 78c79 < '.', false --- > lineNumber 92a94,103 > > //HACK > // annonymous innerclasses are generated to outerclass > // class.inner.annonym -> class$1 > // thats why we should not add class filter for class.inner, > // but for class! > int i = className.indexOf ('$'); > if (i > 0) > className = className.substring (0, i); > I will update api changes today. Test is not redy yet.
I have not found a way how to write regular Unit test for this stuff. EditorContext & SourcePathProvider implements bridge to Java module, src hierarchy, and projects modules. I have not find a way how to setup environment for all these modules, how to open project there and setup source hierarchy. Thats why I have created separate issue to track this problem, and I will work with this teams to fix it - 50969.
Closing this issue then.