1 28 29 30 package org.objectweb.ecm.taskdefs; 31 32 35 public class OpenORBIDLtoJavaTask 36 extends IDLtoJavaTask 37 { 38 40 public 42 OpenORBIDLtoJavaTask() 43 { 44 } 46 47 51 final protected void 52 compileIDL(java.io.File idlfile, java.io.File compileto, 53 java.io.File [] includedirs, String prefix) 54 { 55 org.apache.tools.ant.Task task = getProject().createTask("java"); 57 org.apache.tools.ant.taskdefs.Java java = (org.apache.tools.ant.taskdefs.Java)task; 58 java.setClassname("org.openorb.compiler.IdlCompiler"); 59 java.setFork(true); 60 java.setFailonerror(true); 61 62 org.apache.tools.ant.types.Path cp = java.createClasspath(); 64 cp.setRefid(new org.apache.tools.ant.types.Reference("OpenORB.class.path")); 67 org.apache.tools.ant.types.Commandline.Argument args = java.createArg(); 68 69 String argline = "-D__OPENORB__"; 71 for (int i=0;i<includedirs.length;i++) { 73 argline = argline+" -I "+includedirs[i].getPath(); 74 } 75 76 argline = argline+" "+idlfile.getPath()+" -d "+compileto.getPath(); 78 args.setLine(argline); 80 81 java.execute(); 83 } 84 } 85 | Popular Tags |