/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt object CommandStrings { @deprecated("Use the `log` member of a State instance directly.", "0.12.0") def logger(s: State) = s.log @deprecated("Use the `globalLogging` member of a State instance directly.", "0.12.0") def globalLogging(s: State) = s.globalLogging /** The prefix used to identify a request to execute the remaining input on source changes.*/ val AboutCommand = "about" val TasksCommand = "tasks" val SettingsCommand = "settings" val ProjectCommand = "project" val ProjectsCommand = "projects" val ShowCommand = "show" val BootCommand = "boot" @deprecated("Moved to BasicCommandStrings", "0.12.0") val ContinuousExecutePrefix = BasicCommandStrings.ContinuousExecutePrefix @deprecated("Moved to BasicCommandStrings", "0.12.0") val Exit = BasicCommandStrings.Exit @deprecated("Moved to BasicCommandStrings", "0.12.0") val Quit = BasicCommandStrings.Quit val EvalCommand = "eval" val evalBrief = (EvalCommand + " ", "Evaluates the given Scala expression and prints the result and type.") val evalDetailed = EvalCommand + """ Evaluates the given Scala expression and prints the result and type.""" def showHelp = Help(ShowCommand, (ShowCommand + " ", actBrief), actDetailed) def actBrief = "Displays the result of evaluating the setting or task associated with 'key'." def actDetailed = ShowCommand + """ Displays the value of the specified setting. """ + ShowCommand + """ Evaluates the specified task and display the value returned by the task.""" val LastCommand = "last" val LastGrepCommand = "last-grep" val lastGrepBrief = (LastGrepCommand + " ", "Shows lines from the last output for 'key' that match 'pattern'.") val lastGrepDetailed = LastGrepCommand + """ [key] is a regular expression interpreted by java.util.Pattern. Lines that match 'pattern' from the last streams output associated with the key are displayed. If no key is specified, the global streams output is used. See also '""" + LastCommand + "'." val lastBrief = (LastCommand + " ", "Prints the last output associated with 'key'.") val lastDetailed = LastCommand + """ Redisplays the last streams output associated with the key (typically a task key). If no key is specified, the global streams output is displayed. See also '""" + LastGrepCommand + "'." val InspectCommand = "inspect" val inspectBrief = (InspectCommand + " [tree] ", "Prints the value for 'key', the defining scope, delegates, related definitions, and dependencies.") val inspectDetailed = InspectCommand + """ [tree] For a plain setting, the value bound to the key argument is displayed using its toString method. Otherwise, the type of task ("Task" or "Input task") is displayed. "Dependencies" shows the settings that this setting depends on. If 'tree' is specified, the bound value as well as the settings that this setting depends on (and their bound values) are displayed as a tree structure. "Reverse dependencies" shows the settings that depend on this setting. When a key is resolved to a value, it may not actually be defined in the requested scope. In this case, there is a defined search sequence. "Delegates" shows the scopes that are searched for the key. "Provided by" shows the scope that contained the value returned for the key. "Related" shows all of the scopes in which the key is defined.""" val SetCommand = "set" val setBrief = (SetCommand + " [every] ", "Evaluates the given Setting and applies it to the current project.") val setDetailed = SetCommand + """ Applies the given setting to the current project: 1) Constructs the expression provided as an argument by compiling and loading it. 2) Appends the new setting to the current project's settings. 3) Re-evaluates the build's settings. This command does not rebuild the build definitions, plugins, or configurations. It does not automatically persist the setting(s) either. To persist the setting(s), run 'session save' or 'session save-all'. If 'every' is specified, the setting is evaluated in the current context and the resulting value is used in every scope. This overrides the value bound to the key everywhere. """ def SessionCommand = "session" def sessionBrief = (SessionCommand + " ", "Manipulates session settings. For details, run 'help " + SessionCommand + "'.") /** The command name to terminate the program.*/ @deprecated("Moved to BasicCommandStrings", "0.12.0") val TerminateAction: String = BasicCommandStrings.TerminateAction def settingsPreamble = commonPreamble("settings") def tasksPreamble = commonPreamble("tasks") + """ Tasks produce values. Use the 'show' command to run the task and print the resulting value.""" def commonPreamble(label: String) = """ This is a list of %s defined for the current project. It does not list the scopes the %