1 19 20 package org.netbeans.modules.web.debug; 21 22 import java.beans.PropertyChangeListener ; 23 import java.util.Arrays ; 24 import java.util.HashSet ; 25 import java.util.Set ; 26 import org.netbeans.spi.debugger.jpda.SourcePathProvider; 27 28 29 33 public class EngineContextProviderImpl extends SourcePathProvider { 34 35 private static boolean verbose = 36 System.getProperty ("netbeans.debugger.enginecontextproviderimpl") != null; 37 38 private static final Set virtualFolders = new HashSet (Arrays.asList ( 39 new String [] { 40 "org", 41 "org/apache", 42 "org/apache/jsp" 43 } 44 )); 45 46 47 56 public String getURL (String relativePath, boolean global) { 57 if (verbose) System.out.println ("ECPI(JSP): getURL " + relativePath + " global " + global); 58 if ((relativePath == null) || (relativePath.endsWith(".java"))) { 59 return null; 60 } 61 if (virtualFolders.contains (relativePath) || relativePath.startsWith("org/apache/jsp")) { 62 if (verbose) System.out.println ("ECPI(JSP): fo virtual folder"); 63 return "virtual folder"; 64 } 65 return null; 66 } 67 68 69 79 public String getRelativePath ( 80 String url, 81 char directorySeparator, 82 boolean includeExtension 83 ) { 84 return null; 85 } 86 87 92 public String [] getOriginalSourceRoots () { 93 return new String [0]; 94 } 95 96 101 public String [] getSourceRoots () { 102 return new String [0]; 103 } 104 105 110 public void setSourceRoots (String [] sourceRoots) { 111 } 112 113 118 public void addPropertyChangeListener (PropertyChangeListener l) { 119 } 120 121 126 public void removePropertyChangeListener ( 127 PropertyChangeListener l 128 ) { 129 } 130 } 131 | Popular Tags |