コード例 #1
0
  void outputProject(boolean files, boolean paths, boolean clss, boolean opts, IvyXmlWriter xw) {
    if (xw == null) return;

    xw.begin("PROJECT");
    xw.field("NAME", project_name);
    xw.field("PATH", base_directory.getPath());
    xw.field("WORKSPACE", project_manager.getWorkSpaceDirectory().getPath());
    if (python_interpreter != null) {
      xw.textElement("EXE", python_interpreter.getExecutable().getPath());
    }

    if (paths) {
      for (IPathSpec ps : project_paths) {
        ps.outputXml(xw);
      }
    }
    if (files) {
      for (IFileSpec fs : project_files) {
        fs.outputXml(xw);
      }
    }

    if (opts) pybase_prefs.outputXml(xw, true);

    xw.end("PROJECT");
  }
コード例 #2
0
  void setupDefaults() {
    python_interpreter = project_manager.findInterpreter(null);
    if (python_interpreter == null) PybaseMain.logE("No interpreter found");
    else PybaseMain.logD("Found interpreter " + python_interpreter.getName());

    File src = new File(base_directory, "src");
    if (src.isDirectory() || src.mkdir()) {
      File rsrc = new File("/src");
      IPathSpec ps = project_manager.createPathSpec(rsrc, true, true, true);
      project_paths.add(ps);
    }
  }
コード例 #3
0
 void outputXml(IvyXmlWriter xw) {
   xw.begin("PROJECT");
   xw.field("NAME", project_name);
   xw.field("BASE", base_directory.getPath());
   if (python_interpreter != null) {
     xw.textElement("EXE", python_interpreter.getExecutable().getPath());
   }
   for (IPathSpec ps : project_paths) {
     ps.outputXml(xw);
   }
   for (IFileSpec fs : project_files) {
     fs.outputXml(xw);
   }
   pybase_prefs.outputXml(xw, false);
   xw.end("PROJECT");
 }
コード例 #4
0
 String getVersionName() {
   String nm = python_interpreter.getPythonVersion().toString();
   if (nm.startsWith("VERSION_")) nm = nm.substring(8);
   nm = nm.replace("_", ".");
   return "python " + nm;
 }
コード例 #5
0
 PybaseVersion getVersion() {
   return python_interpreter.getPythonVersion();
 }
コード例 #6
0
 public File getBinary() {
   return python_interpreter.getExecutable();
 }