1 24 package org.aspectj.debugger.ide; 25 26 import java.io.File ; 27 import java.util.List ; 28 import java.util.Vector ; 29 import javax.swing.JFileChooser ; 30 import javax.swing.filechooser.FileFilter ; 31 32 38 public class IDEInterfaceImpl extends IDEInterfaceHelper { 39 40 public final static IDEInterface proto = new IDEInterfaceImpl(); 41 42 45 public void toggle(String sourceName, int lineNumber) { } 46 47 public String getClasspath() { 48 return ""; } 50 51 public String getVMParameters() { 52 return "" ; } 54 55 public String getClassNameToRun() { 56 return "spacewar.Game"; } 58 59 public String findClassName() { 60 return ""; } 62 63 public String findFileName() { 64 JFileChooser chooser = new JFileChooser ("."); 65 String fileName = "bad.file.name"; 66 chooser.addChoosableFileFilter(new FileFilter () { 67 public boolean accept(File f) { 68 return f != null && (f.getName().endsWith(".java") || f.isDirectory()); 69 } 70 public String getDescription() { 71 return "Java files (*.java)"; 72 } 73 }); 74 int result = chooser.showDialog(null, "OK"); 75 System.out.println("result=" + result); 76 if (result == 0) { 77 fileName = chooser.getSelectedFile().getAbsolutePath(); 78 } 79 return fileName; 80 } 81 82 public List getInitialBreakpoints() { 83 return new Vector (); 84 } 85 86 protected void markLine(String className, List argumentTypeNames) { 87 System.out.println("className:" + className + " argumentTypeNames:" + argumentTypeNames); 88 } 89 90 protected void markLineWithClass(String className, int line) { 91 System.out.println("markLineWithClass:className=" + className); 92 } 93 94 protected void markLine(String sourceName, int line) { 95 System.out.println("markLine() sourceName:" + sourceName + ",line:" + line); 96 } 97 98 protected void unmarkLine(String sourceName, int line) { 99 System.out.println("unmarkLine() sourceName:" + sourceName + ",line:" + line); 100 } 101 102 protected void handle(Throwable t) { 103 t.printStackTrace(); 104 } 105 } 106 | Popular Tags |