src/Tools/jEdit/src/token_markup.scala
changeset 59079 12a689755c3d
parent 59077 7e0d3da6e6d8
child 59083 88b0b1f28adc
equal deleted inserted replaced
59078:cf255dc2b48f 59079:12a689755c3d
   191         case _ => false
   191         case _ => false
   192       }
   192       }
   193   }
   193   }
   194 
   194 
   195   def buffer_line_context(buffer: JEditBuffer, line: Int): Line_Context =
   195   def buffer_line_context(buffer: JEditBuffer, line: Int): Line_Context =
   196     Untyped.get(buffer, "lineMgr") match {
   196   {
   197       case line_mgr: LineManager =>
   197     val line_mgr = Untyped.get[LineManager](buffer, "lineMgr")
   198         def context =
   198     def context =
   199           line_mgr.getLineContext(line) match {
   199       line_mgr.getLineContext(line) match {
   200             case c: Line_Context => Some(c)
   200         case c: Line_Context => Some(c)
   201             case _ => None
   201         case _ => None
   202           }
   202       }
   203         context getOrElse {
   203     context getOrElse {
   204           buffer.markTokens(line, DummyTokenHandler.INSTANCE)
   204       buffer.markTokens(line, DummyTokenHandler.INSTANCE)
   205           context getOrElse Line_Context.init
   205       context getOrElse Line_Context.init
   206         }
   206     }
   207       case _ => Line_Context.init
   207   }
   208     }
       
   209 
   208 
   210 
   209 
   211   /* line tokens */
   210   /* line tokens */
   212 
   211 
   213   private def try_line_tokens(syntax: Outer_Syntax, buffer: JEditBuffer, line: Int)
   212   private def try_line_tokens(syntax: Outer_Syntax, buffer: JEditBuffer, line: Int)