diff options
author | michelou <michelou@epfl.ch> | 2006-06-12 14:18:13 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-06-12 14:18:13 +0000 |
commit | 1c43cfe216a0d759568a964a16345ea773f32211 (patch) | |
tree | cc9c93e37b6817c14e1334d910b9012e408c85b8 /src/manual/scala/man1/Command.scala | |
parent | de843e4a74769be951e28d7f744dc812e3eed83e (diff) | |
download | scala-1c43cfe216a0d759568a964a16345ea773f32211.tar.gz scala-1c43cfe216a0d759568a964a16345ea773f32211.tar.bz2 scala-1c43cfe216a0d759568a964a16345ea773f32211.zip |
moved docs/man/src to src/manual and updated bu...
moved docs/man/src to src/manual and updated build.xml
Diffstat (limited to 'src/manual/scala/man1/Command.scala')
-rw-r--r-- | src/manual/scala/man1/Command.scala | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/manual/scala/man1/Command.scala b/src/manual/scala/man1/Command.scala new file mode 100644 index 0000000000..23f951354d --- /dev/null +++ b/src/manual/scala/man1/Command.scala @@ -0,0 +1,57 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2006 LAMP/EPFL + * @author Stephane Micheloud + */ +//$Id: $ + +package scala.man1 + +trait Command { + import _root_.scala.tools.docutil.ManPage._ + + protected def cn: String + def command = cn.substring(cn.lastIndexOf(".") + 1, cn.length() - 1) + + protected def MBold(contents: AbstractText) = Mono(Bold(contents)) + protected def MItalic(contents: AbstractText) = Mono(Italic(contents)) + + protected def CmdLine(opts: AbstractText) = + MBold(command) & Mono(" " & opts) + + protected def CmdOption(opt: String, params: AbstractText) = + Mono(Bold(NDash & opt) & " " & params & " ") + + protected def CmdOption(opt: String): AbstractText = + Mono(Bold(NDash & opt) & " ") + + protected def CmdOptionLong(opt: String, params: AbstractText) = + Mono(Bold(NDash & NDash & opt) & " " & params & " ") + + protected def CmdOptionLong(opt: String): AbstractText = + Mono(Bold(NDash & NDash & opt) & " ") + + protected def Argument(arg: String): AbstractText = + "<" & Italic(arg) & ">" + + def authors = Section("AUTHOR", + + "Written by Martin Odersky and other members of the " & + Link("Scala team", "http://scala.epfl.ch/community/") & ".") + + def copyright = Section("COPYRIGHT", + + "This is free software; see the distribution for copying conditions. " & + "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A " & + "PARTICULAR PURPOSE.") + + def bugs = Section("REPORTING BUGS", + + "Report bugs to " & Mono("<scala@listes.epfl.ch>") & ".") + + //private val df = new java.text.SimpleDateFormat("MMM d, yyyy") + //private val rightNow = new java.util.Date() + + def lastModified: String = "June 8, 2006" // df.format(rightNow) + + def manpage: Document +} |