1 23 24 package org.enhydra.kelp.forte.services; 25 26 import org.openide.compiler.*; 27 import org.openide.compiler.Compiler; 28 import org.openide.filesystems.*; 29 30 34 public class XMLCCleanCompiler extends Compiler { 35 36 private FileObject fo; 37 38 public XMLCCleanCompiler(FileObject fo) 39 { 40 this.fo = fo; 41 } 42 43 public boolean equals (Object o) { 45 if (! (o instanceof XMLCCleanCompiler)) return false; 46 XMLCCleanCompiler other = (XMLCCleanCompiler) o; 47 try { 50 return fo.getFileSystem ().getSystemName ().equals (other.fo.getFileSystem ().getSystemName ()) && 51 fo.getPackageNameExt ('/', '.').equals (other.fo.getPackageNameExt ('/', '.')); 52 } catch (FileStateInvalidException fsie) { 53 if (Boolean.getBoolean ("netbeans.debug.exceptions")) 54 fsie.printStackTrace (); 55 return false; 56 } 57 } 58 59 public int hashCode () { 61 return 1234 ^ fo.getPackageNameExt ('/', '.').hashCode (); 62 } 63 64 74 75 public Class compilerGroupClass () { 76 return XMLCCleanCompilerGroup.class; 77 } 78 79 public boolean isUpToDate () { 80 return FileUtil.findBrother (fo, "compiledExt") == null; 82 } 83 84 public FileObject getFileObject () { 86 return fo; 87 } 88 89 } 90 | Popular Tags |