src/Tools/jEdit/src/completion_popup.scala
changeset 57612 990ffb84489b
parent 57591 ff31aad27661
child 57833 2c2bae3da1c2
     1.1 --- a/src/Tools/jEdit/src/completion_popup.scala	Wed Jul 23 11:08:24 2014 +0200
     1.2 +++ b/src/Tools/jEdit/src/completion_popup.scala	Wed Jul 23 11:19:24 2014 +0200
     1.3 @@ -52,7 +52,7 @@
     1.4  
     1.5      def apply(text_area: TextArea): Option[Completion_Popup.Text_Area] =
     1.6      {
     1.7 -      Swing_Thread.require {}
     1.8 +      GUI_Thread.require {}
     1.9        text_area.getClientProperty(key) match {
    1.10          case text_area_completion: Completion_Popup.Text_Area => Some(text_area_completion)
    1.11          case _ => None
    1.12 @@ -78,7 +78,7 @@
    1.13  
    1.14      def exit(text_area: JEditTextArea)
    1.15      {
    1.16 -      Swing_Thread.require {}
    1.17 +      GUI_Thread.require {}
    1.18        apply(text_area) match {
    1.19          case None =>
    1.20          case Some(text_area_completion) =>
    1.21 @@ -98,7 +98,7 @@
    1.22  
    1.23      def dismissed(text_area: TextArea): Boolean =
    1.24      {
    1.25 -      Swing_Thread.require {}
    1.26 +      GUI_Thread.require {}
    1.27        apply(text_area) match {
    1.28          case Some(text_area_completion) => text_area_completion.dismissed()
    1.29          case None => false
    1.30 @@ -108,7 +108,7 @@
    1.31  
    1.32    class Text_Area private(text_area: JEditTextArea)
    1.33    {
    1.34 -    // owned by Swing thread
    1.35 +    // owned by GUI thread
    1.36      private var completion_popup: Option[Completion_Popup] = None
    1.37  
    1.38      def active_range: Option[Text.Range] =
    1.39 @@ -255,7 +255,7 @@
    1.40  
    1.41      private def insert(item: Completion.Item)
    1.42      {
    1.43 -      Swing_Thread.require {}
    1.44 +      GUI_Thread.require {}
    1.45  
    1.46        val buffer = text_area.getBuffer
    1.47        val range = item.range
    1.48 @@ -425,7 +425,7 @@
    1.49  
    1.50      def input(evt: KeyEvent)
    1.51      {
    1.52 -      Swing_Thread.require {}
    1.53 +      GUI_Thread.require {}
    1.54  
    1.55        if (PIDE.options.bool("jedit_completion")) {
    1.56          if (!evt.isConsumed) {
    1.57 @@ -449,7 +449,7 @@
    1.58      }
    1.59  
    1.60      private val input_delay =
    1.61 -      Swing_Thread.delay_last(PIDE.options.seconds("jedit_completion_delay")) {
    1.62 +      GUI_Thread.delay_last(PIDE.options.seconds("jedit_completion_delay")) {
    1.63          action()
    1.64        }
    1.65  
    1.66 @@ -458,7 +458,7 @@
    1.67  
    1.68      def dismissed(): Boolean =
    1.69      {
    1.70 -      Swing_Thread.require {}
    1.71 +      GUI_Thread.require {}
    1.72  
    1.73        completion_popup match {
    1.74          case Some(completion) =>
    1.75 @@ -504,7 +504,7 @@
    1.76      // see https://forums.oracle.com/thread/1361677
    1.77      if (GUI.is_macos_laf) text_field.setCaret(new DefaultCaret)
    1.78  
    1.79 -    // owned by Swing thread
    1.80 +    // owned by GUI thread
    1.81      private var completion_popup: Option[Completion_Popup] = None
    1.82  
    1.83  
    1.84 @@ -527,7 +527,7 @@
    1.85  
    1.86      private def insert(item: Completion.Item)
    1.87      {
    1.88 -      Swing_Thread.require {}
    1.89 +      GUI_Thread.require {}
    1.90  
    1.91        val range = item.range
    1.92        if (text_field.isEditable) {
    1.93 @@ -606,7 +606,7 @@
    1.94      }
    1.95  
    1.96      private val process_delay =
    1.97 -      Swing_Thread.delay_last(PIDE.options.seconds("jedit_completion_delay")) {
    1.98 +      GUI_Thread.delay_last(PIDE.options.seconds("jedit_completion_delay")) {
    1.99          action()
   1.100        }
   1.101  
   1.102 @@ -642,7 +642,7 @@
   1.103  {
   1.104    completion =>
   1.105  
   1.106 -  Swing_Thread.require {}
   1.107 +  GUI_Thread.require {}
   1.108  
   1.109    require(!items.isEmpty)
   1.110    val multi = items.length > 1