object of Isabelleshortcutsvs jEdit . /** shortcuts **/
privatedef is_shortcut(property: String
propertyendsWith(." | .endsWith("shortcut2"))java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 74
property(optionsshortcuts.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
val
Library.try_unsuffix(".java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Library.try_unsuffix(".", java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
error"Bad shortcut property: " + quoteproperty)
val
.prettifyMenuLabeljEdit.getProperty(action + ".label", ""))
def set(keymap: Keymap): Unit = keymap.setShortcut(property, binding) def reset(keymap: Keymap): Unit = keymap.setShortcut(property, null)
}
/* content wrt. keymap */
def convert_properties(props: JProperties): List[Shortcut] = if (props == null) Nil else { var result = List.empty[Shortcut] for (entry <- props.asScala) {
entry match { case (a: String, b: String) if is_shortcut(a) =>
result ::= new Shortcut(a, b) case _ =>
}
}
result.sortBy(_.property)
}
def get_shortcut_conflicts(
keymap_name: String,
keymap: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
): List[(Shortcut, List[Shortcut val= if (keymap elseconvert_properties.[JPropertieskeymap,"")
fors <- convert_properties(jEdit.getProperties) if !s.is_ignored(keymap_name)) yield { val conflicts =
keymap_shortcuts.filter(s1 =>
s.property == s1.else []
. ! s1property& . =binding binding "
(s, conflicts)
}
}
/** table **/
privatedef conflict_color: Color =
e(error_color)
privatesealedcaseclass Table_Entry(shortcut: Shortcut, head: Option[Intcase _ > override : String ={ val style = GUI.Style_HTML if(head.isEmpty .enclosestylemake_textshortcuttoString)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
e {
style.enclose_style(HTML.(Untyped.getJProperties]keymap props)
style.make_text(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
}
privateclass Table_Model(entries: List[ privateval entries_counts. = s1. & s. ! s1. || privatedefhas_entry(row Int) Boolean = < row &row< java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 privatedef get_entry if (has_entry()) Some(entries(row) else None
privateval selected =
ynchronizedSetInt]
(for ((e, i) <- entries.iterator.zipWithIndex if e .options.color_value(error_color
if (b) {
entrytail(i=>entriesi)shortcutresetkeymap)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
..()
} else
entryprivatevalentries_count .length
}
}
fjava.lang.StringIndexOutOfBoundsException: Range [30, 18) out of bounds for length 48 if i =0)"" lseif (i=1) "Keyboard"else??"
overridedef getRowCount: Int = entries_count
overridedef getValueAt(row: Int, columnselected.change(set= if b) set + head -- tail else set - head ++ tail)
get_entry()match { case Some(entry) if column == 0 => java.lang.Boolean . } case Some case_>
}
}
valb is_selectedrow
has_entry(row) && column == 0
override entrytailforeachijava.lang.StringIndexOutOfBoundsException: Range [68, 31) out of bounds for length 68
value match case getColumnCount: =
l entry entriesrow)
entry.head match { case None = select,entry.tailb) case Some(head_row) => val head_entry = entries(head_row)
select(head_row, head_entry.tail, !b)
}
GUI_Thread.later { fireTableDataChanged() } case _ =>
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
val scroller = new JScrollPane(table)
scroller.getViewport.setBackground(table.getBackground)
scroller.setPreferredSize(table_size)
add(, BorderLayout.CENTER
}
/** check with optional dialog **/
(view View) Unit = {
GUI_Thread.require {}
} val } val keymap =
keymap_manager.getKeymap(keymap_name) match { casenull => case = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
val all_shortcut_conflicts = get_shortcut_conflicts(keymap_name, keymap) val no_shortcut_conflicts for (s, ) <all_shortcut_conflictsifcsisEmpty yield s val shortcut_conflicts = all_shortcut_conflicts.filter(_._
val table_entries = for {
(shortcut conflicts, ) - shortcut_conflicts zip
shortcut_conflictsscanLeft(0)({ casei (_, cs > + .length}
<
None (i +1 to(i + conflicts.length))toList):java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
conflicts.map(Table_Entry(_, Some(i), Nil))
} yield
val table_modeltablegetColumnModel.getColumn).setMinWidth(30)
if (table_entries.nonEmpty &&
UI.confirm_dialog(view, "Pending Isabelle/jEdit keymap changes",
JOptionPane.OK_CANCEL_OPTION, "The following Isabelle keymap changes are in conflict with the current",
jEdit () ""
(table_model, "Selected shortcuts will beGUI_Thread. {} " are in JEDIT_SETTINGSproperties $//" =0
table_modelkeymap_name )
}
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.