1 22 23 package org.aspectj.debugger.ide; 24 25 import org.aspectj.debugger.base.*; 26 import org.aspectj.debugger.gui.*; 27 import org.aspectj.debugger.request.*; 28 29 import java.io.File ; 30 31 39 40 public abstract class FullPathSourceShower implements SourceShower { 41 42 48 public abstract void showSourceForFullPath(String fullPath); 49 50 58 public abstract void showLineForCurrentModel(int line, boolean isAtBreakpoint); 59 60 65 public abstract String getSourceName(); 66 67 76 public boolean showSource(String relativePath) { 77 String fullPath = ComponentRepository.getAJDebugger().getFullSourcePath(relativePath); 78 File file = new File (fullPath); 79 if (file == null || file.isDirectory() || !file.exists()) { 80 return false; 81 } 82 showSourceForFullPath(fullPath); 83 return true; 84 } 85 86 89 public void requestSet(String filename, int line, 90 BreakpointRequestAction ba) {} 91 92 95 public void requestClear(String filename, int line, 96 BreakpointRequestAction ba) {} 97 98 101 public void requestDeferred(String filename, int line, 102 BreakpointRequestAction ba) {} 103 104 105 108 public final static SourceShower proto = new FullPathSourceShower() { 109 public void showSourceForFullPath(String fullPath) { 110 System.out.println("fullPath:" + fullPath); 111 } 112 public void showLineForCurrentModel(int line, boolean isAtBreakpoint) { 113 System.out.println("line:" + line + " isAtBreakpoint:" + isAtBreakpoint); 114 } 115 public String getSourceName() { 116 return "who knows?"; 117 } 118 public void requestSet(String filename, 119 int line, 120 BreakpointRequestAction ba) {} 121 public void requestClear(String filename, 122 int line, 123 BreakpointRequestAction ba) {} 124 public void requestDeferred(String filename, 125 int line, 126 BreakpointRequestAction ba) {} 127 }; 128 } 129 | Popular Tags |