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 - SPI to intercept CallStackFrame.getSourcePath()
Summary: SPI to intercept CallStackFrame.getSourcePath()
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: PC All
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 65969 66409
  Show dependency tree
 
Reported: 2011-03-22 12:30 UTC by Petr Hejl
Modified: 2011-03-22 13:23 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 +        }