diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-15 14:27:43 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-15 16:42:33 -0700 |
commit | 3e038d801cd3177ed1230eb7729e11f8743db23a (patch) | |
tree | a2905dab0bc63bad5408f5a69a5d065d0c1c0696 /src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | |
parent | f865e3b9a0f053c09669ca70c77d88456ed2b8ba (diff) | |
download | scala-3e038d801cd3177ed1230eb7729e11f8743db23a.tar.gz scala-3e038d801cd3177ed1230eb7729e11f8743db23a.tar.bz2 scala-3e038d801cd3177ed1230eb7729e11f8743db23a.zip |
Removing more unneeded code.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala index 795b2e3678..b1e6a9d7d9 100644 --- a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala +++ b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala @@ -279,24 +279,6 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput if (parsed.isEmpty) xs map ("." + _) else xs } - // chasing down results which won't parse - // This used to work fine, now it reports a type error before any - // exception gets to us. See SI-5657. Don't have time to deal with - // it, so disabling everything. - def execute(line: String): Option[ExecResult] = { - return None // disabled - - val parsed = Parsed(line) - def noDotOrSlash = line forall (ch => ch != '.' && ch != '/') - - if (noDotOrSlash) None // we defer all unqualified ids to the repl. - else { - (ids executionFor parsed) orElse - (rootClass executionFor parsed) orElse - (FileCompletion executionFor line) - } - } - // generic interface for querying (e.g. interpreter loop, testing) def completions(buf: String): List[String] = topLevelFor(Parsed.dotted(buf + ".", buf.length + 1)) @@ -360,15 +342,9 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput if (!looksLikeInvocation(buf)) None else tryCompletion(Parsed.dotted(buf drop 1, cursor), lastResultFor) - def regularCompletion = tryCompletion(mkDotted, topLevelFor) - def fileCompletion = - if (!looksLikePath(buf)) None - else tryCompletion(mkUndelimited, FileCompletion completionsFor _.buffer) - def tryAll = ( lastResultCompletion - orElse regularCompletion - orElse fileCompletion + orElse tryCompletion(mkDotted, topLevelFor) getOrElse Candidates(cursor, Nil) ) |