src/Tools/jEdit/src/rendering.scala
changeset 50715 8cfd585b9162
parent 50643 09394eaf6804
child 50895 3a1edaa0dc6d
equal deleted inserted replaced
50714:2af9e4614ba4 50715:8cfd585b9162
   250             }
   250             }
   251         }) match { case Text.Info(_, info :: _) #:: _ => Some(info) case _ => None }
   251         }) match { case Text.Info(_, info :: _) #:: _ => Some(info) case _ => None }
   252   }
   252   }
   253 
   253 
   254 
   254 
   255   private val active_include = Set(Markup.GRAPHVIEW, Markup.SENDBACK, Markup.DIALOG)
   255   private val active_include =
       
   256     Set(Markup.BROWSER, Markup.GRAPHVIEW, Markup.SENDBACK, Markup.DIALOG)
   256 
   257 
   257   def active(range: Text.Range): Option[Text.Info[XML.Elem]] =
   258   def active(range: Text.Range): Option[Text.Info[XML.Elem]] =
   258     snapshot.select_markup(range, Some(active_include), command_state =>
   259     snapshot.select_markup(range, Some(active_include), command_state =>
   259         {
   260         {
   260           case Text.Info(info_range, elem @ Protocol.Dialog(_, serial, _))
   261           case Text.Info(info_range, elem @ Protocol.Dialog(_, serial, _))
   261           if !command_state.results.defined(serial) =>
   262           if !command_state.results.defined(serial) =>
   262             Text.Info(snapshot.convert(info_range), elem)
   263             Text.Info(snapshot.convert(info_range), elem)
   263           case Text.Info(info_range, elem @ XML.Elem(Markup(name, _), _))
   264           case Text.Info(info_range, elem @ XML.Elem(Markup(name, _), _))
   264           if name == Markup.GRAPHVIEW || name == Markup.SENDBACK =>
   265           if name == Markup.BROWSER || name == Markup.GRAPHVIEW || name == Markup.SENDBACK =>
   265             Text.Info(snapshot.convert(info_range), elem)
   266             Text.Info(snapshot.convert(info_range), elem)
   266         }) match { case Text.Info(_, info) #:: _ => Some(info) case _ => None }
   267         }) match { case Text.Info(_, info) #:: _ => Some(info) case _ => None }
   267 
   268 
   268 
   269 
   269   def command_results(range: Text.Range): Command.Results =
   270   def command_results(range: Text.Range): Command.Results =