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.

Bug 196959

Summary: SPI to intercept CallStackFrame.getSourcePath()
Product: debugger Reporter: Petr Hejl <phejl>
Component: CodeAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal    
Priority: P1    
Version: 7.0.1   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 65969, 66409    

Description Petr Hejl 2011-03-22 12:30:21 UTC
When debugging JSP pages on WebLogic the CSF.getSourcePath() returns for example jsp_servlet/_mypath/index.jsp (this is the way how WL compiles it) so the SourcePath.showSource() will never find correct mypath/index.jsp.

It might be doable by SourcePathProvider, but it looks like it would be duplicate of SourcePathProviderImpl of projects integration. In fact this is just simple name translation so some small SPI could help I guess.

The important part of my HACKED solution looks like this:

   11.40 +        // XXX terrible hack - in addition WL specific code
   11.41 +        if (relativePath.startsWith("jsp_servlet")) { // NOI18N
   11.42 +            SourcePathProvider provider = getDefaultContext();
   11.43 +            if (provider != null) {
   11.44 +                String path = relativePath.substring(11);
   11.45 +                path = path.replaceAll("/_", "/"); // NOI8N
   11.46 +                if (path.startsWith("/")) {
   11.47 +                    path = path.substring(1);
   11.48 +                }
   11.49 +                return provider.getURL(path, global);
   11.50 +            }
   11.51 +        }