Jean-Rémi Desjardins
ca736e55d3
Minor code cleanup
2014-12-03 09:56:34 -08:00
Eugene Yokota
3f958a5bce
enable -deprecation for Scala 2.10
...
Enable -deprecation flag to catch old code being use when we migrate
things.
In this commit I moved error to sys.error.
2014-10-10 15:42:26 -04:00
Eugene Yokota
65e4b773d4
Fixes #1530 . Fixes NPE by using IO.listFiles
2014-08-15 03:52:54 -04:00
Josh Suereth
244abd3b6f
Scalariforming test code
2014-05-07 11:52:23 -04:00
Eugene Yokota
adb41611cf
added scalariform
2014-05-01 12:50:07 -04:00
Matej Urbas
247252fac1
Reintroduced the `examples` method. Reintroduced and deprecated the `checkMatches` method.
2014-04-18 16:44:26 +01:00
Matej Urbas
134b0322f6
Added tests for FileExamples. Improved the file-searching in FileExamples.
2014-04-16 08:36:27 +01:00
Matej Urbas
7aa58fd784
Improved the description of ParserWithExamples tests.
2014-04-14 08:24:02 +01:00
Matej Urbas
447ab8d334
Created unit tests for ParserWithExamples and FixedSetExampleSource.
2014-04-12 20:16:58 +01:00
Matej Urbas
5b40b0c73a
Now using ExampleSource in collection-based completion parsers. Removed the Examples parser. Renamed DynamicExamples to ParserWithExamples.
2014-04-08 21:31:04 +01:00
Matej Urbas
d00037263b
Documented the DynamicExamples and FixedSetExamples classes.
2014-04-08 20:40:51 +01:00
Matej Urbas
fc6b2e087d
Documented the new Parsers API a bit. Prepared the new API so that we can port the old ones to the new. Added support for filtering erroneous examples.
2014-04-06 23:49:15 +01:00
Matej Urbas
ac4712cac7
Moved ExampleSource into a separate file.
2014-04-06 22:48:22 +01:00
Matej Urbas
4d6a5472d8
Overloaded the the fileParser method. Renamed SourceOfExamples to ExampleSource. Documented fileParser, FileExamples, and ExampleSource.
2014-04-06 22:39:10 +01:00
Matej Urbas
60c6460755
Ported the file search with pre-Java 7 API.
2014-04-06 00:01:30 +01:00
Matej Urbas
143993fdc1
Implemented a file parser. Added SourceOfExamples for lazy example listing (especially useful when lazily searching for files that match a certain prefix).
2014-04-05 22:11:00 +01:00
Mark Harrah
8b103271a7
API docs for Parser(s).
2013-08-16 14:22:14 -04:00
Mark Harrah
6604437f7f
Restore lower case hex digits to HexDigit Parser, accidentally removed in 8545e912da.
2013-08-16 14:22:14 -04:00
Mark Harrah
033829d4a0
init/restore instead of setEchoEnabled in order to handle full jline customizations. Fixes #822 .
2013-07-19 20:03:06 -04:00
Mark Harrah
036156413d
disable JLine event expansion
2013-07-12 09:42:16 -04:00
Mark Harrah
1048976844
jline/jansi fixes for windows. Fixes #763 , fixes #562 .
...
The startup script should set sbt.cygwin=true if running from cygwin.
This will set the terminal type properly for JLine if not already set.
If sbt.cygwin=false or unset and os.name includes "windows", JAnsi is
downloaded by the launcher and installed on standard out/err.
The value for jline.terminal is transformed from explicit jline.X to
the basic types "windows", "unix", or "none". Now that sbt uses JLine
2.0, these types are understood by both sbt's JLine and Scala's.
Older Scala versions shaded the classes but not the terminal property
so both couldn't be configured with a class name at the same time.
2013-06-26 13:40:33 -04:00
Mark Harrah
684dda144f
SoftInvalid parser, which defers being invalid in order to preserve a failure message on empty input.
2013-06-17 12:06:13 -04:00
Mark Harrah
a4bad86614
invalid/failure Parser construction methods now accept definitive flag
2013-06-17 12:06:13 -04:00
Mark Harrah
c269706750
Merge failures from a,b in a|b when a,b fail on the same input position.
...
Previously, only the failures from b were used.
2013-06-17 12:06:13 -04:00
Mark Harrah
676c93043c
'definitive' Parser failures
...
Support a definitive flag for Failure that ignores later failures
instead of appending them. This is useful to override the default
behavior of listing the failures of alternative parsers.
2013-06-17 12:06:13 -04:00
Mark Harrah
3e32c7d1f1
changes needed for tests for jline 2.10
2013-02-26 09:27:57 -05:00
Mark Harrah
45aae0cdc6
add Jline.createReader() back for source compatibility
2013-02-26 09:27:56 -05:00
Alex Dupre
92e99cfef0
Switch from JLine 1.0 to 2.10.
2013-02-26 07:39:33 -05:00
Mark Harrah
f6d73128fc
deprecations
2013-02-25 09:24:04 -05:00
Mark Harrah
c0b1bb51e6
-Xlint
2013-02-04 17:30:31 -05:00
Mark Harrah
3035cbf2d1
update version for backported Parser deprecations
2013-01-03 17:40:07 -05:00
Mark Harrah
4434d84f65
require a failure message for parser
2013-01-03 11:37:40 -05:00
Mark Harrah
935267b96b
minor cleanup of previous commit: var->val in sbt.JLine
2012-12-20 09:25:35 -05:00
Anthony
f7031502e4
Multi-line prompt text offset issue (ticket #625 )
2012-12-20 08:56:20 -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
1c1e5c4977
taking care of deprecations removed in Scala master
2012-11-14 11:48: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
Jason Zaugg
2ef0fcae6a
Fix #552 Compensate for JLine's absent EOF detection.
...
In the unsupported terminal mode, JLine treats a broken
stdin as an endless stream of empty lines. This is problematic
for idea-sbt-plugin: if the IntelliJ process is forcibly killed
and leaves the child SBT process running, it consumes considerable
CPU processing these.
Patching JLine itself would be the cleanest solution (the change
has already been applied to JLine 2), but I've shied away from that
and instead wrapped the InputStream that is read by JLine to
intercept the result of -1 from read(). When this happens, the
flat `inputEof` is set to true.
2012-09-23 15:58:15 -04:00
Mark Harrah
8c06949957
clean up token completions and make providing a general completion function easier
2012-07-13 14:33:27 -04:00
Mark Harrah
ce3ed37c8c
basic code for cleaning up Manifest.toString
2012-07-13 14:33:27 -04:00
Mark Harrah
0972791b58
clean up Completions and allow arbitrary 'display' for Token
2012-07-13 14:33:27 -04:00
Mark Harrah
72e05309c5
JLine completion integration now considers a suggestion with a newline to be preformatted
2012-07-13 14:33:27 -04:00
Mark Harrah
51da95644c
methods for working with Scala identifiers
2012-07-13 14:33:27 -04:00
Mark Harrah
5dd2bb8a24
print completions containing a newline first and on separate lines
2012-07-13 14:33:27 -04:00
Mark Harrah
8d20a7ea19
repeatDep parser combinator
2012-07-06 10:28:51 -04:00
Mark Harrah
cf2402cea4
another fix related to #460
2012-05-23 20:13:52 -04:00
Mark Harrah
e34b8e4bf2
print message and stack trace when exception occurs in completion
2012-05-21 22:23:44 -04:00
Mark Harrah
1f612aaecb
ensure enableEcho called after jline.Terminal.getTerminal. fixes #460
2012-05-19 18:20:19 -04:00
Mark Harrah
12d72facb1
enhance 'projects' to allow temporarily adding/removing builds to the session
2012-04-06 20:28:31 -04:00
Mark Harrah
41eb26ae1f
fix sample method interpretation of completions argument
2012-03-25 20:36:05 -04:00