src/Tools/jEdit/src/completion_popup.scala
changeset 56173 62f10624339a
parent 56171 15351577da10
child 56175 79c29244b377
     1.1 --- a/src/Tools/jEdit/src/completion_popup.scala	Mon Mar 17 11:39:46 2014 +0100
     1.2 +++ b/src/Tools/jEdit/src/completion_popup.scala	Mon Mar 17 12:24:00 2014 +0100
     1.3 @@ -139,10 +139,10 @@
     1.4            if (line_range.contains(text_area.getCaretPosition)) {
     1.5              before_caret_range(rendering).try_restrict(line_range) match {
     1.6                case Some(range) if !range.is_singularity =>
     1.7 -                rendering.completion_names(range) match {
     1.8 -                  case Some(names) =>
     1.9 -                    if (names.no_completion) None
    1.10 -                    else Some(names.range)
    1.11 +                rendering.semantic_completion(range) match {
    1.12 +                  case Some(semantic) =>
    1.13 +                    if (semantic.info.no_completion) None
    1.14 +                    else Some(semantic.range)
    1.15                    case None =>
    1.16                      syntax_completion(false, Some(rendering)) match {
    1.17                        case Some(result) => Some(result.range)
    1.18 @@ -178,7 +178,7 @@
    1.19            val context =
    1.20              (opt_rendering orElse PIDE.document_view(text_area).map(_.get_rendering()) match {
    1.21                case Some(rendering) =>
    1.22 -                rendering.completion_language(before_caret_range(rendering))
    1.23 +                rendering.language_context(before_caret_range(rendering))
    1.24                case None => None
    1.25              }) getOrElse syntax.language_context
    1.26  
    1.27 @@ -260,13 +260,14 @@
    1.28          PIDE.document_view(text_area) match {
    1.29            case Some(doc_view) =>
    1.30              val rendering = doc_view.get_rendering()
    1.31 -            rendering.completion_names(before_caret_range(rendering)) match {
    1.32 -              case Some(names) =>
    1.33 -                if (names.no_completion)
    1.34 -                  Some(Completion.Result.empty(names.range))
    1.35 +            rendering.semantic_completion(before_caret_range(rendering)) match {
    1.36 +              case Some(semantic) =>
    1.37 +                if (semantic.info.no_completion)
    1.38 +                  Some(Completion.Result.empty(semantic.range))
    1.39                  else
    1.40 -                  JEdit_Lib.try_get_text(buffer, names.range) match {
    1.41 -                    case Some(original) => names.complete(history, decode, original)
    1.42 +                  JEdit_Lib.try_get_text(buffer, semantic.range) match {
    1.43 +                    case Some(original) =>
    1.44 +                      semantic.info.complete(semantic.range, history, decode, original)
    1.45                      case None => None
    1.46                    }
    1.47                case None => None