72 \end{figure} |
72 \end{figure} |
73 |
73 |
74 Isabelle/jEdit (\figref{fig:isabelle-jedit}) consists of some plugins for |
74 Isabelle/jEdit (\figref{fig:isabelle-jedit}) consists of some plugins for |
75 the jEdit text editor, while preserving its general look-and-feel as far as |
75 the jEdit text editor, while preserving its general look-and-feel as far as |
76 possible. The main plugin is called ``Isabelle'' and has its own menu |
76 possible. The main plugin is called ``Isabelle'' and has its own menu |
77 \emph{Plugins~/ Isabelle} with several panels (see also |
77 \emph{Plugins~/ Isabelle} with access to several panels (see also |
78 \secref{sec:dockables}), as well as \emph{Plugins~/ Plugin Options~/ |
78 \secref{sec:dockables}), as well as \emph{Plugins~/ Plugin Options~/ |
79 Isabelle} (see also \secref{sec:options}). |
79 Isabelle} (see also \secref{sec:options}). |
80 |
80 |
81 The options allow to specify a logic session name --- the same selector is |
81 The options allow to specify a logic session name --- the same selector is |
82 accessible in the \emph{Theories} panel (\secref{sec:theories}). On |
82 accessible in the \emph{Theories} panel (\secref{sec:theories}). On |
83 application startup, the selected logic session image is provided |
83 application startup, the selected logic session image is provided |
84 automatically by the Isabelle build tool \cite{isabelle-sys}: if it is |
84 automatically by the Isabelle build tool \cite{isabelle-sys}: if it is |
85 absent or outdated wrt.\ its sources, the build process updates it before |
85 absent or outdated wrt.\ its sources, the build process updates it before |
86 entering the Prover IDE. Changing the logic session within Isabelle/jEdit |
86 entering the Prover IDE. Changing the logic session within Isabelle/jEdit |
87 requires a restart of the application. |
87 requires a restart of the whole application. |
88 |
88 |
89 \medskip The main job of the Prover IDE is to manage sources and their |
89 \medskip The main job of the Prover IDE is to manage sources and their |
90 changes, taking the logical structure as a formal document into account (see |
90 changes, taking the logical structure as a formal document into account (see |
91 also \secref{sec:document-model}). The editor and the prover are connected |
91 also \secref{sec:document-model}). The editor and the prover are connected |
92 asynchronously in a lock-free manner. The prover is free to organize the |
92 asynchronously in a lock-free manner. The prover is free to organize the |
93 checking of the formal text in parallel on multiple cores, and provides |
93 checking of the formal text in parallel on multiple cores, and provides |
94 feedback via markup, which is rendered in the editor via colors, boxes, |
94 feedback via markup, which is rendered in the editor via colors, boxes, |
95 squiggly underline, hyperlinks, popup windows, icons, clickable output etc. |
95 squiggly underlines, hyperlinks, popup windows, icons, clickable output etc. |
96 |
96 |
97 Using the mouse together with the modifier key @{verbatim CONTROL} (Linux, |
97 Using the mouse together with the modifier key @{verbatim CONTROL} (Linux, |
98 Windows) or @{verbatim COMMAND} (Mac OS X) exposes additional formal content |
98 Windows) or @{verbatim COMMAND} (Mac OS X) exposes additional formal content |
99 via tooltips and/or hyperlinks (see also \secref{sec:tooltips-hyperlinks}). |
99 via tooltips and/or hyperlinks (see also \secref{sec:tooltips-hyperlinks}). |
100 Formal output (in popups etc.) may be explored recursively, using the same |
100 Output (in popups etc.) may be explored recursively, using the same |
101 techniques as in the editor source buffer. |
101 techniques as in the editor source buffer. |
102 |
102 |
103 Thus the Prover IDE gives an impression of direct access to formal content |
103 Thus the Prover IDE gives an impression of direct access to formal content |
104 of the prover within the editor, but in reality only certain aspects are |
104 of the prover within the editor, but in reality only certain aspects are |
105 exposed, according to the possibilities of the prover and its many add-on |
105 exposed, according to the possibilities of the prover and its many tools. |
106 tools. |
|
107 *} |
106 *} |
108 |
107 |
109 |
108 |
110 subsection {* Documentation *} |
109 subsection {* Documentation *} |
111 |
110 |
127 *} |
126 *} |
128 |
127 |
129 |
128 |
130 subsection {* Plugins *} |
129 subsection {* Plugins *} |
131 |
130 |
132 text {* The \emph{Plugin Manager} of jEdit allows to augment editor |
131 text {* |
133 functionality by JVM modules (jars) that are provided by the central |
132 The \emph{Plugin Manager} of jEdit allows to augment editor functionality by |
134 plugin repository, which is accessible via various mirror sites. |
133 JVM modules (jars) that are provided by the central plugin repository, which |
135 |
134 is accessible via various mirror sites. |
136 Connecting to the plugin server infrastructure of the jEdit project |
135 |
137 allows to update bundled plugins or to add further functionality. |
136 Connecting to the plugin server-infrastructure of the jEdit project allows |
138 This needs to be done with the usual care for such an open bazaar of |
137 to update bundled plugins or to add further functionality. This needs to be |
139 contributions. Arbitrary combinations of add-on features are apt to |
138 done with the usual care for such an open bazaar of contributions. Arbitrary |
140 cause problems. It is advisable to start with the default |
139 combinations of add-on features are apt to cause problems. It is advisable |
141 configuration of Isabelle/jEdit and develop some understanding how |
140 to start with the default configuration of Isabelle/jEdit and develop some |
142 it is supposed to work, before loading additional plugins at a grand |
141 understanding how it is supposed to work, before loading additional plugins |
143 scale. |
142 at a grand scale. |
144 |
143 |
145 \medskip The main \emph{Isabelle} plugin is an integral part of |
144 \medskip The main \emph{Isabelle} plugin is an integral part of |
146 Isabelle/jEdit and needs to remain active at all times! A few additional |
145 Isabelle/jEdit and needs to remain active at all times! A few additional |
147 plugins are bundled with Isabelle/jEdit for convenience or out of necessity, |
146 plugins are bundled with Isabelle/jEdit for convenience or out of necessity, |
148 notably \emph{Console} with its Isabelle/Scala sub-plugin |
147 notably \emph{Console} with its Isabelle/Scala sub-plugin |
242 By default, the specified image is checked and built on demand. The |
243 By default, the specified image is checked and built on demand. The |
243 @{verbatim "-s"} option determines where to store the result session image |
244 @{verbatim "-s"} option determines where to store the result session image |
244 of @{tool build}. The @{verbatim "-n"} option bypasses the implicit build |
245 of @{tool build}. The @{verbatim "-n"} option bypasses the implicit build |
245 process for the selected session image. |
246 process for the selected session image. |
246 |
247 |
247 The @{verbatim "-m"} option specifies additional print modes for the |
248 The @{verbatim "-m"} option specifies additional print modes for the prover |
248 prover process. Note that the system option @{system_option_ref |
249 process. Note that the system option @{system_option_ref jedit_print_mode} |
249 jedit_print_mode} allows to do the same persistently (e.g.\ via the |
250 allows to do the same persistently (e.g.\ via the \emph{Plugin Options} |
250 Plugin Options dialog of Isabelle/jEdit), without requiring |
251 dialog of Isabelle/jEdit), without requiring command-line invocation. |
251 command-line invocation. |
252 |
252 |
253 The @{verbatim "-J"} and @{verbatim "-j"} options allow to pass additional |
253 The @{verbatim "-J"} and @{verbatim "-j"} options allow to pass |
254 low-level options to the JVM or jEdit, respectively. The defaults are |
254 additional low-level options to the JVM or jEdit, respectively. The |
255 provided by the Isabelle settings environment \cite{isabelle-sys}, but note |
255 defaults are provided by the Isabelle settings environment |
256 that these only work for the command-line tool described here, and not the |
256 \cite{isabelle-sys}. |
257 regular application. |
257 |
258 |
258 The @{verbatim "-b"} and @{verbatim "-f"} options control the self-build |
259 The @{verbatim "-b"} and @{verbatim "-f"} options control the self-build |
259 mechanism of Isabelle/jEdit. This is only relevant for building from |
260 mechanism of Isabelle/jEdit. This is only relevant for building from |
260 sources, which also requires an auxiliary @{verbatim jedit_build} component |
261 sources, which also requires an auxiliary @{verbatim jedit_build} component |
261 from @{url "http://isabelle.in.tum.de/components"}. Note that official |
262 from @{url "http://isabelle.in.tum.de/components"}. The official |
262 Isabelle releases already include a pre-built version of Isabelle/jEdit. |
263 Isabelle release already includes a pre-built version of Isabelle/jEdit. |
263 *} |
264 *} |
264 |
265 |
265 |
266 |
266 chapter {* Augmented jEdit functionality *} |
267 chapter {* Augmented jEdit functionality *} |
267 |
268 |
271 support ``native'' look-and-feel on all platforms, within the limits |
272 support ``native'' look-and-feel on all platforms, within the limits |
272 of what Oracle as Java provider and major operating system |
273 of what Oracle as Java provider and major operating system |
273 distributors allow (see also \secref{sec:problems}). |
274 distributors allow (see also \secref{sec:problems}). |
274 |
275 |
275 Isabelle/jEdit enables platform-specific look-and-feel by default as |
276 Isabelle/jEdit enables platform-specific look-and-feel by default as |
276 follows: |
277 follows. |
277 |
278 |
278 \begin{description} |
279 \begin{description} |
279 |
280 |
280 \item[Linux] The platform-independent \emph{Nimbus} is used by |
281 \item[Linux:] The platform-independent \emph{Nimbus} is used by |
281 default. |
282 default. |
282 |
283 |
283 \emph{GTK+} works under the side-condition that the overall GTK theme is |
284 \emph{GTK+} works under the side-condition that the overall GTK theme is |
284 selected in a Swing-friendly way.\footnote{GTK support in Java/Swing was |
285 selected in a Swing-friendly way.\footnote{GTK support in Java/Swing was |
285 once marketed aggressively by Sun, but never quite finished. Today (2013) it |
286 once marketed aggressively by Sun, but never quite finished. Today (2013) it |
286 is lagging behind further development of Swing and GTK. The graphics |
287 is lagging behind further development of Swing and GTK. The graphics |
287 rendering performance can be worse than for other Swing look-and-feels.} |
288 rendering performance can be worse than for other Swing look-and-feels.} |
288 |
289 |
289 \item[Windows] Regular \emph{Windows} is used by default, but |
290 \item[Windows:] Regular \emph{Windows} is used by default, but |
290 \emph{Windows Classic} also works. |
291 \emph{Windows Classic} also works. |
291 |
292 |
292 \item[Mac OS X] Regular \emph{Mac OS X} is used by default. |
293 \item[Mac OS X:] Regular \emph{Mac OS X} is used by default. |
293 |
294 |
294 Moreover the bundled \emph{MacOSX} plugin provides various functions that |
295 The bundled \emph{MacOSX} plugin provides various functions that are |
295 are expected from applications on that particular platform: quit from menu |
296 expected from applications on that particular platform: quit from menu or |
296 or dock, preferences menu, drag-and-drop of text files on the application, |
297 dock, preferences menu, drag-and-drop of text files on the application, |
297 full-screen mode for main editor windows. It is advisable to have the |
298 full-screen mode for main editor windows. It is advisable to have the |
298 \emph{MacOSX} enabled all the time on that platform. |
299 \emph{MacOSX} plugin enabled all the time on that platform. |
299 |
300 |
300 \end{description} |
301 \end{description} |
301 |
302 |
302 Users may experiment with different look-and-feels, but need to keep |
303 Users may experiment with different look-and-feels, but need to keep |
303 in mind that this extra variance of GUI functionality is unlikely to |
304 in mind that this extra variance of GUI functionality is unlikely to |
363 *} |
364 *} |
364 |
365 |
365 |
366 |
366 section {* Isabelle symbols \label{sec:symbols} *} |
367 section {* Isabelle symbols \label{sec:symbols} *} |
367 |
368 |
368 text {* Isabelle sources consist of \emph{symbols} that extend plain |
369 text {* |
369 ASCII to allow infinitely many mathematical symbols within the |
370 Isabelle sources consist of \emph{symbols} that extend plain ASCII to allow |
370 formal sources. This works without depending on particular |
371 infinitely many mathematical symbols within the formal sources. This works |
371 encodings and varying Unicode standards |
372 without depending on particular encodings and varying Unicode |
372 \cite{Wenzel:2011:CICM}.\footnote{Raw Unicode characters within |
373 standards.\footnote{Raw Unicode characters within formal sources would |
373 formal sources would compromise portability and reliability in the |
374 compromise portability and reliability in the face of changing |
374 face of changing interpretation of special features of Unicode, such |
375 interpretation of special features of Unicode, such as Combining Characters |
375 as Combining Characters or Bi-directional Text.} |
376 or Bi-directional Text.} See also \cite{Wenzel:2011:CICM}. |
376 |
377 |
377 For the prover back-end, formal text consists of ASCII characters |
378 For the prover back-end, formal text consists of ASCII characters that are |
378 that are grouped according to some simple rules, e.g.\ as plain |
379 grouped according to some simple rules, e.g.\ as plain ``@{verbatim a}'' or |
379 ``@{verbatim a}'' or symbolic ``@{verbatim "\<alpha>"}''. |
380 symbolic ``@{verbatim "\<alpha>"}''. For the editor front-end, a certain subset of |
380 |
381 symbols is rendered physically via Unicode glyphs, in order to show |
381 For the editor front-end, a certain subset of symbols is rendered |
382 ``@{verbatim "\<alpha>"}'' as ``@{text "\<alpha>"}'', for example. This symbol |
382 physically via Unicode glyphs, in order to show ``@{verbatim "\<alpha>"}'' |
383 interpretation is specified by the Isabelle system distribution in @{file |
383 as ``@{text "\<alpha>"}'', for example. This symbol interpretation is |
|
384 specified by the Isabelle system distribution in @{file |
|
385 "$ISABELLE_HOME/etc/symbols"} and may be augmented by the user in |
384 "$ISABELLE_HOME/etc/symbols"} and may be augmented by the user in |
386 @{file_unchecked "$ISABELLE_HOME_USER/etc/symbols"}. |
385 @{file_unchecked "$ISABELLE_HOME_USER/etc/symbols"}. |
387 |
386 |
388 The appendix of \cite{isabelle-isar-ref} gives an overview of the |
387 The appendix of \cite{isabelle-isar-ref} gives an overview of the |
389 standard interpretation of finitely many symbols from the infinite |
388 standard interpretation of finitely many symbols from the infinite |
390 collection. Uninterpreted symbols are displayed literally, e.g.\ |
389 collection. Uninterpreted symbols are displayed literally, e.g.\ |
391 ``@{verbatim "\<foobar>"}''. Overlap of Unicode characters used in |
390 ``@{verbatim "\<foobar>"}''. Overlap of Unicode characters used in |
392 symbol interpretation with informal ones (which might appear e.g.\ |
391 symbol interpretation with informal ones (which might appear e.g.\ |
393 in comments) needs to be avoided! Raw Unicode characters within |
392 in comments) needs to be avoided. Raw Unicode characters within |
394 prover source files should be restricted to informal parts, e.g.\ to |
393 prover source files should be restricted to informal parts, e.g.\ to |
395 write text in non-latin alphabets in comments. |
394 write text in non-latin alphabets in comments. |
396 |
395 |
397 \medskip \paragraph{Encoding.} Technically, the Unicode view on |
396 \medskip \paragraph{Encoding.} Technically, the Unicode view on Isabelle |
398 Isabelle symbols is an \emph{encoding} in jEdit (not in the |
397 symbols is an \emph{encoding} in jEdit (not in the underlying JVM) that is |
399 underlying JVM) that is called @{verbatim "UTF-8-Isabelle"}. It is |
398 called @{verbatim "UTF-8-Isabelle"}. It is provided by the Isabelle/jEdit |
400 provided by the Isabelle/jEdit plugin and enabled by default for all |
399 plugin and enabled by default for all source files. Sometimes such defaults |
401 source files. Sometimes such defaults are reset accidentally, or |
400 are reset accidentally, or malformed UTF-8 sequences in the text force jEdit |
402 malformed UTF-8 sequences in the text force jEdit to fall back on a |
401 to fall back on a different encoding like @{verbatim "ISO-8859-15"}. In that |
403 different encoding like @{verbatim "ISO-8859-15"}. In that case, |
402 case, verbatim ``@{verbatim "\<alpha>"}'' will be shown in the text buffer instead |
404 verbatim ``@{verbatim "\<alpha>"}'' will be shown in the text buffer |
403 of its Unicode rendering ``@{text "\<alpha>"}''. The jEdit menu operation |
405 instead of its Unicode rendering ``@{text "\<alpha>"}''. The jEdit menu |
404 \emph{File~/ Reload with Encoding~/ UTF-8-Isabelle} helps to resolve such |
406 operation \emph{File~/ Reload with Encoding~/ UTF-8-Isabelle} helps |
405 problems (after repairing malformed parts of the text). |
407 to resolve such problems, potentially after repairing malformed |
|
408 parts of the text. |
|
409 |
406 |
410 \medskip \paragraph{Font.} Correct rendering via Unicode requires a |
407 \medskip \paragraph{Font.} Correct rendering via Unicode requires a |
411 font that contains glyphs for the corresponding codepoints. Most |
408 font that contains glyphs for the corresponding codepoints. Most |
412 system fonts lack that, so Isabelle/jEdit prefers its own |
409 system fonts lack that, so Isabelle/jEdit prefers its own |
413 application font @{verbatim IsabelleText}, which ensures that |
410 application font @{verbatim IsabelleText}, which ensures that |
414 standard collection of Isabelle symbols are actually seen on the |
411 standard collection of Isabelle symbols are actually seen on the |
415 screen (or printer). |
412 screen (or printer). |
416 |
413 |
417 Note that a Java/AWT/Swing application can load additional fonts |
414 Note that a Java/AWT/Swing application can load additional fonts only if |
418 only if they are not installed on the operating system already! |
415 they are not installed on the operating system already! Some outdated |
419 Some old version of @{verbatim IsabelleText} that happens to be |
416 version of @{verbatim IsabelleText} that happens to be provided by the |
420 provided by the operating system would prevent Isabelle/jEdit to use |
417 operating system would prevent Isabelle/jEdit to use its bundled version. |
421 its bundled version. This could lead to missing glyphs (black |
418 This could lead to missing glyphs (black rectangles), when the system |
422 rectangles), when the system version of @{verbatim IsabelleText} is |
419 version of @{verbatim IsabelleText} is older than the application version. |
423 older than the application version. This problem can be avoided by |
420 This problem can be avoided by refraining to ``install'' any version of |
424 refraining to ``install'' any version of @{verbatim IsabelleText} in |
421 @{verbatim IsabelleText} in the first place, although it is occasionally |
425 the first place (although it is occasionally tempting to use |
422 tempting to use the same font in other applications. |
426 the same font in other applications). |
|
427 |
423 |
428 \medskip \paragraph{Input methods.} In principle, Isabelle/jEdit |
424 \medskip \paragraph{Input methods.} In principle, Isabelle/jEdit |
429 could delegate the problem to produce Isabelle symbols in their |
425 could delegate the problem to produce Isabelle symbols in their |
430 Unicode rendering to the underlying operating system and its |
426 Unicode rendering to the underlying operating system and its |
431 \emph{input methods}. Regular jEdit also provides various ways to |
427 \emph{input methods}. Regular jEdit also provides various ways to |
432 work with \emph{abbreviations} to produce certain non-ASCII |
428 work with \emph{abbreviations} to produce certain non-ASCII |
433 characters. Since none of these standard input methods work |
429 characters. Since none of these standard input methods work |
434 satisfactorily for the mathematical characters required for |
430 satisfactorily for the mathematical characters required for |
435 Isabelle, various specific Isabelle/jEdit mechanisms are provided. |
431 Isabelle, various specific Isabelle/jEdit mechanisms are provided. |
436 |
432 |
437 Here is a summary for practically relevant input methods for |
433 This is a summary for practically relevant input methods for Isabelle |
438 Isabelle symbols: |
434 symbols. |
439 |
435 |
440 \begin{enumerate} |
436 \begin{enumerate} |
441 |
437 |
442 \item The \emph{Symbols} panel: some GUI buttons allow to insert |
438 \item The \emph{Symbols} panel: some GUI buttons allow to insert |
443 certain symbols in the text buffer. There are also tooltips to |
439 certain symbols in the text buffer. There are also tooltips to |
560 the cross-platform \emph{System} shell. Thus the console provides similar |
555 the cross-platform \emph{System} shell. Thus the console provides similar |
561 functionality than the special Emacs buffers @{verbatim "*scratch*"} and |
556 functionality than the special Emacs buffers @{verbatim "*scratch*"} and |
562 @{verbatim "*shell*"}. |
557 @{verbatim "*shell*"}. |
563 |
558 |
564 Isabelle/jEdit extends the repertoire of the console by \emph{Scala}, which |
559 Isabelle/jEdit extends the repertoire of the console by \emph{Scala}, which |
565 is the regular Scala toplevel loop running inside the \emph{same} JVM |
560 is the regular Scala toplevel loop running inside the same JVM process as |
566 process as Isabelle/jEdit itself. This means the Scala command interpreter |
561 Isabelle/jEdit itself. This means the Scala command interpreter has access |
567 has access to the JVM name space and state of the running Prover IDE |
562 to the JVM name space and state of the running Prover IDE application: the |
568 application: the main entry points are @{verbatim view} (the current editor |
563 main entry points are @{verbatim view} (the current editor view of jEdit) |
569 view of jEdit) and @{verbatim PIDE} (the Isabelle/jEdit plugin object). For |
564 and @{verbatim PIDE} (the Isabelle/jEdit plugin object). For example, the |
570 example, the Scala expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE |
565 Scala expression @{verbatim "PIDE.snapshot(view)"} makes a PIDE document |
571 document snapshot of the current buffer within the current editor view. |
566 snapshot of the current buffer within the current editor view. |
572 |
567 |
573 This helps to explore Isabelle/Scala functionality interactively. Some care |
568 This helps to explore Isabelle/Scala functionality interactively. Some care |
574 is required to avoid interference with the internals of the running |
569 is required to avoid interference with the internals of the running |
575 application, especially in production use. |
570 application, especially in production use. |
576 *} |
571 *} |
577 |
572 |
578 |
573 |
579 section {* File-system access *} |
574 section {* File-system access *} |
580 |
575 |
581 text {* File specifications in jEdit follow various formats and |
576 text {* |
582 conventions according to \emph{Virtual File Systems}, which may be |
577 File specifications in jEdit follow various formats and conventions |
583 also provided by additional plugins. This allows to access remote |
578 according to \emph{Virtual File Systems}, which may be also provided by |
584 files via the @{verbatim "http:"} protocol prefix, for example. |
579 additional plugins. This allows to access remote files via the @{verbatim |
585 Isabelle/jEdit attempts to work with the file-system access model of |
580 "http:"} protocol prefix, for example. Isabelle/jEdit attempts to work with |
586 jEdit as far as possible. In particular, theory sources are passed |
581 the file-system model of jEdit as far as possible. In particular, theory |
587 directly from the editor to the prover, without indirection via |
582 sources are passed directly from the editor to the prover, without |
588 physical files. |
583 indirection via physical files. |
589 |
584 |
590 Despite the flexibility of URLs in jEdit, local files are |
585 Despite the flexibility of URLs in jEdit, local files are particularly |
591 particularly important and are accessible without protocol prefix. |
586 important and are accessible without protocol prefix. Here the path notation |
592 Here the path notation is that of the Java Virtual Machine on the |
587 is that of the Java Virtual Machine on the underlying platform. On Windows |
593 underlying platform. On Windows the preferred form uses |
588 the preferred form uses backslashes, but happens to accept forward slashes |
594 backslashes, but happens to accept forward slashes of Unix/POSIX, too. |
589 like Unix/POSIX. Further differences arise due to Windows drive letters and |
595 Further differences arise due to drive letters and network shares. |
590 network shares. |
596 |
591 |
597 The Java notation for files needs to be distinguished from the one of |
592 The Java notation for files needs to be distinguished from the one of |
598 Isabelle, which uses POSIX notation with forward slashes on \emph{all} |
593 Isabelle, which uses POSIX notation with forward slashes on \emph{all} |
599 platforms.\footnote{Isabelle/ML on Windows uses Cygwin file-system access |
594 platforms.\footnote{Isabelle/ML on Windows uses Cygwin file-system access |
600 and Unix-style path notation.} Moreover, environment variables from the |
595 and Unix-style path notation.} Moreover, environment variables from the |
601 Isabelle process may be used freely, e.g.\ @{file |
596 Isabelle process may be used freely, e.g.\ @{file |
602 "$ISABELLE_HOME/etc/symbols"} or @{file_unchecked "$POLYML_HOME/README"}. |
597 "$ISABELLE_HOME/etc/symbols"} or @{file_unchecked "$POLYML_HOME/README"}. |
603 There are special shortcuts: @{file "~"} for @{file "$USER_HOME"} and @{file |
598 There are special shortcuts: @{file "~"} for @{file "$USER_HOME"} and @{file |
604 "~~"} for @{file "$ISABELLE_HOME"}. |
599 "~~"} for @{file "$ISABELLE_HOME"}. |
605 |
600 |
606 \medskip Since jEdit happens to support environment variables within |
601 \medskip Since jEdit happens to support environment variables within file |
607 file specifications as well, it is natural to use similar notation |
602 specifications as well, it is natural to use similar notation within the |
608 within the editor, e.g.\ in the file-browser. This does not work in |
603 editor, e.g.\ in the file-browser. This does not work in full generality, |
609 full generality, though, due to the bias of jEdit towards |
604 though, due to the bias of jEdit towards platform-specific notation and of |
610 platform-specific notation and of Isabelle towards POSIX. Moreover, |
605 Isabelle towards POSIX. Moreover, the Isabelle settings environment is not |
611 the Isabelle settings environment is not yet active when starting |
606 yet active when starting Isabelle/jEdit via its standard application |
612 Isabelle/jEdit via its standard application wrapper (in contrast to |
607 wrapper, in contrast to @{verbatim "isabelle jedit"} run from the command |
613 @{verbatim "isabelle jedit"} run from the command line). |
608 line (\secref{sec:command-line}). |
614 |
609 |
615 Isabelle/jEdit imitates @{verbatim "$ISABELLE_HOME"} and @{verbatim |
610 Isabelle/jEdit imitates @{verbatim "$ISABELLE_HOME"} and @{verbatim |
616 "$ISABELLE_HOME_USER"} within the Java process environment, in order to |
611 "$ISABELLE_HOME_USER"} within the Java process environment, in order to |
617 allow easy access to these important places from the editor. The file |
612 allow easy access to these important places from the editor. The file |
618 browser of jEdit also includes \emph{Favorites} for these two important |
613 browser of jEdit also includes \emph{Favorites} for these two important |
757 treated as changes of the corresponding load command. |
752 treated as changes of the corresponding load command. |
758 |
753 |
759 \medskip As a concession to the massive amount of ML files in Isabelle/HOL |
754 \medskip As a concession to the massive amount of ML files in Isabelle/HOL |
760 itself, the content of auxiliary files is only added to the PIDE |
755 itself, the content of auxiliary files is only added to the PIDE |
761 document-model on demand, the first time when opened explicitly in the |
756 document-model on demand, the first time when opened explicitly in the |
762 editor. There are further special tricks to manage markup of ML files, such |
757 editor. There are further tricks to manage markup of ML files, such that |
763 that Isabelle/HOL may be edited conveniently in the Prover IDE on small |
758 Isabelle/HOL may be edited conveniently in the Prover IDE on small machines |
764 machines with only 4--8\,GB of main memory. Using @{verbatim Pure} as logic |
759 with only 4--8\,GB of main memory. Using @{verbatim Pure} as logic session |
765 session image, the exploration may start at the top @{file |
760 image, the exploration may start at the top @{file |
766 "$ISABELLE_HOME/src/HOL/Main.thy"} or the bottom @{file |
761 "$ISABELLE_HOME/src/HOL/Main.thy"} or the bottom @{file |
767 "$ISABELLE_HOME/src/HOL/HOL.thy"}, for example. |
762 "$ISABELLE_HOME/src/HOL/HOL.thy"}, for example. |
768 |
763 |
769 Initially, before an auxiliary file is opened in the editor, the prover |
764 Initially, before an auxiliary file is opened in the editor, the prover |
770 reads its content from the physical file-system. After the file is opened |
765 reads its content from the physical file-system. After the file is opened |
1286 subsection {* Completion popup \label{sec:completion-popup} *} |
1283 subsection {* Completion popup \label{sec:completion-popup} *} |
1287 |
1284 |
1288 text {* |
1285 text {* |
1289 A \emph{completion popup} is a minimally invasive GUI component over the |
1286 A \emph{completion popup} is a minimally invasive GUI component over the |
1290 text area that offers a selection of completion items to be inserted into |
1287 text area that offers a selection of completion items to be inserted into |
1291 the text, e.g.\ by mouse clicks. The popup interprets special keys |
1288 the text, e.g.\ by mouse clicks. Items are sorted dynamically, according to |
1292 @{verbatim TAB}, @{verbatim ESCAPE}, @{verbatim UP}, @{verbatim DOWN}, |
1289 the frequency of selection, with persistent history. The popup interprets |
1293 @{verbatim PAGE_UP}, @{verbatim PAGE_DOWN}, but all other key events are |
1290 special keys @{verbatim TAB}, @{verbatim ESCAPE}, @{verbatim UP}, @{verbatim |
1294 passed to the underlying text area. This allows to ignore unwanted |
1291 DOWN}, @{verbatim PAGE_UP}, @{verbatim PAGE_DOWN}, but all other key events |
|
1292 are passed to the underlying text area. This allows to ignore unwanted |
1295 completions most of the time and continue typing quickly. Thus the popup |
1293 completions most of the time and continue typing quickly. Thus the popup |
1296 serves as a mechanism of confirmation of proposed items, but the default is |
1294 serves as a mechanism of confirmation of proposed items, but the default is |
1297 to continue without completion. |
1295 to continue without completion. |
1298 |
1296 |
1299 The meaning of special keys is as follows: |
1297 The meaning of special keys is as follows: |
1320 |
1318 |
1321 text {* |
1319 text {* |
1322 Completion may first propose replacements to be selected (via a popup), or |
1320 Completion may first propose replacements to be selected (via a popup), or |
1323 replace text immediately in certain situations and depending on certain |
1321 replace text immediately in certain situations and depending on certain |
1324 options like @{system_option jedit_completion_immediate}. In any case, |
1322 options like @{system_option jedit_completion_immediate}. In any case, |
1325 insertion works uniformly, by imitating normal text insertion to some |
1323 insertion works uniformly, by imitating normal jEdit text insertion, |
1326 extent. The precise behaviour depends on the state of the \emph{text |
1324 depending on the state of the \emph{text selection}. Isabelle/jEdit tries to |
1327 selection} of jEdit. Isabelle/jEdit tries to accommodate the most common |
1325 accommodate the most common forms of advanced selections in jEdit, but not |
1328 forms of advanced selections in jEdit, but not all combinations make sense. |
1326 all combinations make sense. At least the following important cases are |
1329 At least the following important cases are well-defined. |
1327 well-defined: |
1330 |
1328 |
1331 \begin{description} |
1329 \begin{description} |
1332 |
1330 |
1333 \item[No selection.] The original is removed and the replacement inserted, |
1331 \item[No selection.] The original is removed and the replacement inserted, |
1334 depending on the caret position. |
1332 depending on the caret position. |
1335 |
1333 |
1336 \item[Rectangular selection zero width.] This special case is treated by |
1334 \item[Rectangular selection of zero width.] This special case is treated by |
1337 jEdit as ``tall caret'' and insertion of completion imitates its normal |
1335 jEdit as ``tall caret'' and insertion of completion imitates its normal |
1338 behaviour: separate copies of the replacement are inserted for each line of |
1336 behaviour: separate copies of the replacement are inserted for each line of |
1339 the selection. |
1337 the selection. |
1340 |
1338 |
1341 \item[Other rectangular selection or multiple selections.] Here the original |
1339 \item[Other rectangular selection or multiple selections.] Here the original |