Commit Graph

60 Commits

Author SHA1 Message Date
Erik Bakker 995ccf85a6 Fix search result highlighting on Windows
Use only ANSI color codes that are supported by Windows
2015-11-20 22:08:03 +01:00
Martin Duhem a2abb6eeb6 Update to latest version of incremental, fix imports 2015-09-16 10:16:03 +02:00
Martin Duhem c981abd295 Fix all imports 2015-09-14 14:28:09 +02:00
Pierre DAL-PRA 8f1fb2d232 Fix additional warnings 2015-08-07 00:23:14 +02:00
Pierre DAL-PRA 54d54b9f4f Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Pierre DAL-PRA 13b37cc987 Fix several warnings 2015-07-17 09:17:42 +02:00
Dale Wijnand 97ed5822c7 Implement SimpleCommand.toString. Fixes #1998. 2015-05-05 09:11:52 +01:00
David Perez 5ce11c67c5 Catch exceptions with NonFatal 2015-03-25 15:02:45 +01:00
David Perez 2c52efeca5 Removed unicode arrow 2015-03-25 13:14:48 +01:00
David Perez 79ef772219 Removed unicode arrow 2015-03-24 14:54:10 +01:00
David Perez 508fc1b5ec Issue 1900, more robustness in help system 2015-03-12 15:30:43 +01:00
Paul Phillips e88d1436c5 Remove line of dead code.
Unmoored expression in constructor does nothing except pack
on a few micros.
2014-05-19 06:17:44 -07:00
Eugene Yokota 785b0274ee some more source getting formatted 2014-05-02 18:07:05 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Jacek Laskowski f49ed56c1f Use string interpolation and replace deprecated methods 2014-01-06 14:17:42 +01:00
Mark Harrah 1d9b44d5d7 Expand aliases instead of evaluating directly.
This avoids an additional cause of recursion via the semicolon/multiple command, which fixes #933.
It also provides error messages on the expanded command.  This fixes #598.
2013-11-24 15:19:24 -05:00
Mark Harrah 1a3c88ef20 Log at the debug level the commands being executed by the command engine. 2013-11-23 19:18:54 -05:00
Heikki Vesalainen 9989e5631f Completion command: support quoted strings 2013-11-21 08:20:37 -05:00
Heikki Vesalainen b2980b913f completions command
The completions command is meant for dump terminals that cannot use
the default tab completion. It has been built for use by the emacs
sbt-mode (see https://github.com/hvesalai/sbt-mode), but is equally
useful for other code editors that can integrate with sbt.
2013-11-21 08:20:37 -05:00
Mark Harrah c2b319e977 error,warn,info,debug commands to set log level, useful in conjunction with early combinator --. Fixes #806. 2013-10-24 16:34:16 -04:00
Mark Harrah f461b94e73 Fix API comment for State.{+,++} 2013-10-24 16:34:16 -04:00
Mark Harrah e93c4450a1 early commands: anything prefixed with -- gets moved to the front of the command sequence on startup 2013-10-24 16:34:16 -04:00
Mark Harrah 86ae3c8c59 Deprecate -, --, and --- in favor of onFailure, sbtClearOnFailure, and resumeFromFailure. 2013-10-24 16:34:16 -04:00
Mark Harrah 5498275ebd Track whether global logging levels were set explicitly by the user or not. 2013-10-24 16:34:16 -04:00
Mark Harrah fb1437cf36 Transfer logging,trace levels from old to new global loggers. 2013-10-24 16:34:16 -04:00
James Roper 1eaf548bcd Added shutdown hook for restoring the terminal 2013-07-30 19:02:10 +10:00
Mark Harrah 919d0ac63d Failed task execution should still preserve State changes. Fixes #804.
Candidate for inclusion in 0.13.0 if there is another RC, otherwise
scheduled for 0.13.1.
2013-07-03 17:16:00 -04:00
Mark Harrah b1cba90332 Promote new State methods to public 2013-06-19 12:01:45 -04:00
Mark Harrah 53f75a85cc Basic named commands now print usage if the argument parser fails on empty input. Fixes #776.
The Help for these commands now needs to be cleaned up, since they were not written with
this feature in mind.  In particular,

* consider adding syntax summaries in the short help strings
* alternatively, add the syntax summary data elsewhere for use specifically by this feature
* display a better message when there is no short help string, such as
   "See 'help <command>' for usage." or just displaying the lower level error message, such as
   "Expected whitespace"
2013-06-17 12:06:13 -04:00
Mark Harrah 53e7960976 separate out help message functions 2013-06-17 12:06:13 -04:00
Mark Harrah 74438d0c72 handle empty help list in aligned printing 2013-06-17 12:06:13 -04:00
Mark Harrah 6a70b9f565 Proper support for stashing on-failure handlers. Fixes #732. 2013-04-30 18:55:02 -04:00
Mark Harrah 8d0c1408c0 Allow -cp argument to 'apply' command to be quoted. Fixes #724. 2013-04-12 12:47:45 -04:00
Mark Harrah fd2823e827 clean up 'inspect' command and limit Related section to 10 keys 2013-03-12 14:51:19 -04:00
Mark Harrah d6f78db0c9 Construct input tasks in multiple steps to allow input task reuse. Fixes #407. 2013-03-08 14:23:30 -05:00
Mark Harrah 0cf702efd5 Move GlobalLogBacking.newLogger to GlobalLogging to make the role of GlobalLogBacking clearer. 2013-02-25 09:24:05 -05:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah 824f10aa9a better error message when help search syntax isn't a valid java.util.regex 2013-02-19 14:33:22 -05:00
Eugene Yokota 125727ba83 support binary version in launcher 2013-01-29 16:55:13 -05:00
Paolo G. Giarrusso 236143be8d Silence boring Eclipse warnings: catching all exceptions
Here I make explicit where catching all exceptions is intended.
Mark Harrah corrected one decision during review.
2013-01-22 09:05:15 -05:00
Mark Harrah f0a72e53e8 use proper separator in command tab completion 2013-01-03 11:37:40 -05:00
Mark Harrah 912948f5c8 update 'apply' help string to include -cp option 2012-12-09 20:40:41 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Mark Harrah 8f25b07d71 -cp/-classpath option to 'apply' command 2012-12-04 21:08:39 -05:00
Mark Harrah e47a357ab7 Resolve Scala version for projects in the normal `update` task.
1. Scala jars won't be copied to the boot directory, except for those needed to run sbt.
2. Scala SNAPSHOTs behave like normal SNAPSHOTs.  In particular, running `update` will properly re-resolve the dynamic revision.
3. Scala jars are resolved using the same repositories and configuration as other dependencies.
4. Classloaders (currently, Scala classloaders) are cached by the timestamps of entries instead of Scala class loaders being cached by version.

TODO: Support external dependency configuration
2012-11-17 20:23:06 -05:00
Mark Harrah 1612af8dbb Parser.failOnException method, don't let rhs of alias fail the parse. Fixes #572.
alias only parses the right hand side for tab completion help.
The assignment should happen whether or not the parse is successful because the
context may change by the time the alias is actually evaluated.
In particular, the 'set' command uses the loaded project for tab completion in 0.12.1.
When a .sbtrc file is processed, the project has not been loaded yet, so aliases
involving set fail.  Wrapping the rhs in failOnException addresses this.
2012-10-15 12:42:27 -04:00
Mark Harrah 2a6ad35502 correct CommandUtil.aligned to use provided prefix 2012-07-13 14:33:27 -04:00
Mark Harrah dc2aaaf7ac show full stack trace by default when running in batch mode 2012-06-22 22:11:24 -04:00
Mark Harrah 5ff33fad3e Second try at printing message when stack trace suppressed.
Problems:

  1. Without a message, users don't find 'last'
  2. Showing a message for every error clutters output.

This tries to address these issues by:

1. Only showing the message when other feedback has not been provided and
   'last' would not usually be helpful.  This will require ongoing tweaking.
   For now, all commands except 'compile' display the message.  'update' could
   omit the message as well, but perhaps knowing about 'last' might be
   useful there.

2. Including the exact command to show the output:
    last test:compile
   and not just
    last <task>

3. Highlighting the command in blue for visibility as an experiment.

Review by @ijuma and @retronym, please.
2012-05-19 18:20:19 -04:00
Mark Harrah 756099c67b add extra category of help for listing command names without summary 2012-04-07 18:10:23 -04:00