Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I came up with a solution that works, but not perfect. You need to run the app to generate the Scala code for the templates. Then run 'play scaladoc' with the code below.</p> <p>Add 'play/framework/pym/play/commands/scaladoc.py' with contents: </p> <pre><code>import os, os.path import shutil import subprocess from play.utils import * COMMANDS = ['scaladoc', 'sd'] HELP = { 'scaladoc': 'Generate your application scaladoc' } def execute(**kargs): command = kargs.get("command") app = kargs.get("app") args = kargs.get("args") play_env = kargs.get("env") app.check() modules = app.modules() if not os.environ.has_key('SCALA_HOME'): scaladoc_path = "scaladoc" else: scaladoc_path = os.path.normpath("%s/bin/scaladoc" % os.environ['SCALA_HOME']) fileList = [] def add_scala_files(app_path): for root, subFolders, files in os.walk(os.path.join(app_path, 'app')): for file in files: if file.endswith(".scala"): fileList.append(os.path.join(root, file)) for root, subFolders, files in os.walk(os.path.join(app_path, 'tmp/generated')): for file in files: if file.endswith(".scala"): fileList.append(os.path.join(root, file)) add_scala_files(app.path) for module in modules: add_scala_files(os.path.normpath(module)) outdir = os.path.join(app.path, 'scaladoc') sout = open(os.path.join(app.log_path(), 'scaladoc.log'), 'w') serr = open(os.path.join(app.log_path(), 'scaladoc.err'), 'w') if (os.path.isdir(outdir)): shutil.rmtree(outdir) scaladoc_cmd = [scaladoc_path, '-classpath', app.cp_args(), '-d', outdir] + args + fileList print "Generating scaladoc in " + outdir + "..." subprocess.call(scaladoc_cmd, env=os.environ, stdout=sout, stderr=serr) print "Done! You can open " + os.path.join(outdir, 'overview-tree.html') + " in your browser." </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload