src/Pure/General/completion.scala
changeset 55914 c5b752d549e3
parent 55813 08a1c860bc12
child 55977 ec4830499634
--- a/src/Pure/General/completion.scala	Wed Mar 05 09:59:48 2014 +0100
+++ b/src/Pure/General/completion.scala	Wed Mar 05 13:11:08 2014 +0100
@@ -27,6 +27,11 @@
     immediate: Boolean)
   { override def toString: String = description }
 
+  object Result
+  {
+    def empty(range: Text.Range): Result = Result(range, "", false, Nil)
+  }
+
   sealed case class Result(
     range: Text.Range,
     original: String,
@@ -136,6 +141,8 @@
               Some(Names(info.range, total, names))
             }
             catch { case _: XML.Error => None }
+          case XML.Elem(Markup(Markup.NO_COMPLETION, _), _) =>
+            Some(Names(info.range, 0, Nil))
           case _ => None
         }
     }
@@ -143,6 +150,8 @@
 
   sealed case class Names(range: Text.Range, total: Int, names: List[(String, String)])
   {
+    def no_completion: Boolean = total == 0 && names.isEmpty
+
     def complete(
       history: Completion.History,
       decode: Boolean,