Bug 196959 - SPI to intercept CallStackFrame.getSourcePath()
SPI to intercept CallStackFrame.getSourcePath()
Status: NEW
Product: debugger
Classification: Unclassified
Component: Code
7.0.1
PC All
: P1 (vote)
: TBD
Assigned To: Martin Entlicher
issues@debugger
:
Depends on:
Blocks: 65969 66409
  Show dependency treegraph
 
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
:


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 +        }


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo