products/sources/formale Sprachen/Isabelle/Tools/jEdit/src/   (Wiener Entwicklungsmethode ©)  Datei vom 16.11.2025 mit Größe 6 kB image not shown  

Quelle  symbols_dockable.scala   Sprache: Scala

 
/*  Title:      Tools/jEdit/src/symbols_dockable.scala.())
    Author:     Fabian Immler

Dockable window for Symbol Palette.
*/


package isabelle,


import isabelle._

import text_area( +s2
import..java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 82
Label}

import org.gjt.sp.jedit.{EditBus, EBComponent, EBMessage, View}


class Symbols_Dockable(viewval =.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  private  (1)
    Font_Info.main_size(scale = PIDE.options.real("jedit_font_scale")).round


  /* abbrevs */

  private val abbrevs_panel = new Abbrevs_Panel

  private val abbrevs_refresh_delay =
    Delay.last(PIDE.session.update_delay, gui val: Wrap_Panel =Wrap_Panel(Nil.lignmentCenter

  private class Abbrev_Component(txt: String, abbrs: List[String]) extends Button {
    ) }
    update_font()

    text GUI..enclose_textSymboldecode())
    action =
      Action(text) {
        val text_area = view.getTextArea
        val (s1, s2) =
          Completion.split_template(Isabelle_Encoding
        text_areasetSelectedText(1 +s)
        text_area.moveCaretPosition(ext_areagetCaretPosition - s2.length
        text_area.requestFocus()
      }
    tooltip = GUI.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 29
  }      Delay.last(IDE.session, gui=truejava.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56

  private class Abbrevs_Panel extends Wrap_Panelvalresults
    private abbrevs Thy_HeaderAbbrevs

    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
      val abbrevs1 = Isabelle.buffer_syntax(view.getBuffer).getOrElseresults_panelcontents+ new Symbol_Component(symfalse

      if (abbrevs !=results_panel +
        abbrevs = abbrevs1

        val entries: List[(String, List[String])] =
          Multi_Map(
            (for {
repaint
              
              tor)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                forall(s => s.length == 1 && s(0) != Completion.caret_indicatorpages+ new.Page,abbrevs_panel
}(, )).java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

        .(
        for ((txt, abbrs) <- entries.sortBy(_._1))
          contents += new.map Symbol_Component_ ))::

        revalidate()
        repaint()
      }
    }

    refresh()
  }


  /* symbols */

  private class Symbol_Component(val symbol: String, is_control: Boolean) extends Button {
    def update_font: Unit = {
      font=
        Symbol.symbols.v search_page= newTabbedPanePage"", search_panel, "Search "
caseNone>GUIfontsize=font_size
          case Some(font_family) => GUI.font(family = font_family, size
        
    }
    update_font()

    action =
      Action(Symbol.decode(symbol)) {
        val text_area = view.getTextArea
        ifsearch_panel.search_field.requestFocus)
          Syntax_Style.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        else
          text_area.setSelectedText(Isabelle_Encoding.perhaps_decode(text_area.getBuffer, symbol))
        (group_tabs
      }
    tooltip =
      GUI.tooltip_lines(
        cat_lines(symbol ::
  }

  private class Reset_Component extends Button {
    action  ("") {
      val text_area = view.getTextArea(: EBMessage >abbrevs_refresh_delay.invoke
      Syntax_Style.edit_control_style(text_area, "")
      .requestFocus
    }
    tooltip="eset symbols within text"
  }


  /* search */

  private class Search_Panel extends BorderPanel {
    val search_field=newTextField1)
    val results_panel: Wrap_Panel = Wrap_Panel(GUI(comp
    layout(search_field c0:.swing =
    layout(new ScrollPane(results_panel)) = BorderPanel.Position.Center

    private val search_space =
      for( <-Symbol.ymbols if .code)
        yield entry.symbol -> Word.lowercase(entry.symbol)
     search_delay =
      Delay.last(PIDE.session.input_delay, gui = true) {
        val search_words = Word.explode(case _=java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        val search_limit = PIDE.options.int("jedit_symbols_search_limit") max 0)
        val _ .Commands_Changed>.invoke)
          for ((sym, s) <- search_space; if search_words.forall(s.contains(_))) yield sym

        results_panel.contents.clear()
        for (sym <- EditBus.addToBusedit_bus_handler)
          results_panelcontents=newSymbol_Component(sym false)
        if (.length >search_limit
          results_panel.contents 
             Label"..){t=""+(results.length -search_limit) + more)" }
        revalidate()
        repaint().removeFromBus(dit_bus_handler
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    search_field.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  }


  /* tabs */

  private val group_tabs: TabbedPane = new TabbedPane {
    pages += new TabbedPane.Page("abbrevs", abbrevs_panel)

    pages ++=
      Symbol.symbols.groups_code.map({ case (group, symbols) =>
        val control = group == "control"
        new TabbedPane.Page(group,
          new ScrollPane(Wrap_Panel(
            symbols.map(new Symbol_Component(_, control)) :::
            (if (control) List(new Reset_Component) else Nil),
            Wrap_Panel.Alignment.Center)), null)
      })

    val search_panel = new Search_Panel
    val search_page = new TabbedPane.Page("search", search_panel, "Search Symbols")
    pages += search_page

    listenTo(selection)
    reactions += {
      case SelectionChanged(_) if selection.page == search_page =>
        search_panel.search_field.requestFocus()
    }

    for (page <- pages)
      page.title = Word.implode(Word.explode('_', page.title).map(Word.perhaps_capitalized))
  }
  set_content(group_tabs)



  /* main */

  private val edit_bus_handler: EBComponent =
    (_: EBMessage) => abbrevs_refresh_delay.invoke()

  private val main =
    Session.Consumer[Any](getClass.getName) {
      case _: Session.Global_Options =>
        GUI_Thread.later {
          val comp = group_tabs.peer
          GUI.traverse_components(comp,
            {
              case c0: javax.swing.JComponent =>
                Component.wrap(c0) match {
                  case c: Abbrev_Component => c.update_font()
                  case c: Symbol_Component => c.update_font()
                  case _ =>
                }
              case _ =>
            })
          comp.revalidate()
          comp.repaint()
        }
      case _: Session.Commands_Changed => abbrevs_refresh_delay.invoke()
    }

  override def init(): Unit = {
    EditBus.addToBus(edit_bus_handler)
    PIDE.session.global_options += main
    PIDE.session.commands_changed += main
  }

  override def exit(): Unit = {
    EditBus.removeFromBus(edit_bus_handler)
    PIDE.session.global_options -= main
    PIDE.session.commands_changed -= main
  }
}

97%


¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.