added action "isabelle.options" (despite problems with initial window size);
authorwenzelm
Wed Jul 23 23:08:22 2014 +0200 (2014-07-23 ago)
changeset 5762765fc7ae1bf66
parent 57626 2288a6f17930
child 57628 c80fc5576271
added action "isabelle.options" (despite problems with initial window size);
src/Doc/JEdit/JEdit.thy
src/Tools/jEdit/src/actions.xml
src/Tools/jEdit/src/isabelle.scala
src/Tools/jEdit/src/jEdit.props
     1.1 --- a/src/Doc/JEdit/JEdit.thy	Wed Jul 23 21:02:45 2014 +0200
     1.2 +++ b/src/Doc/JEdit/JEdit.thy	Wed Jul 23 23:08:22 2014 +0200
     1.3 @@ -184,6 +184,9 @@
     1.4    settings variable @{setting ISABELLE_BUILD_OPTIONS} to change defaults for
     1.5    batch builds without affecting Isabelle/jEdit.
     1.6  
     1.7 +  The jEdit action @{action_def isabelle.options} opens the options dialog for
     1.8 +  the Isabelle plugin; it can be mapped to editor GUI elements as usual.
     1.9 +
    1.10    \medskip Options are usually loaded on startup and saved on shutdown of
    1.11    Isabelle/jEdit. Editing the machine-generated @{file_unchecked
    1.12    "$ISABELLE_HOME_USER/jedit/properties"} or @{file_unchecked
     2.1 --- a/src/Tools/jEdit/src/actions.xml	Wed Jul 23 21:02:45 2014 +0200
     2.2 +++ b/src/Tools/jEdit/src/actions.xml	Wed Jul 23 23:08:22 2014 +0200
     2.3 @@ -122,4 +122,9 @@
     2.4  	    isabelle.jedit.Isabelle.reset_dictionary();
     2.5  	  </CODE>
     2.6  	</ACTION>
     2.7 +	<ACTION NAME="isabelle.options">
     2.8 +	  <CODE>
     2.9 +	    isabelle.jedit.Isabelle.plugin_options(view);
    2.10 +	  </CODE>
    2.11 +	</ACTION>
    2.12  </ACTIONS>
     3.1 --- a/src/Tools/jEdit/src/isabelle.scala	Wed Jul 23 21:02:45 2014 +0200
     3.2 +++ b/src/Tools/jEdit/src/isabelle.scala	Wed Jul 23 23:08:22 2014 +0200
     3.3 @@ -9,12 +9,15 @@
     3.4  
     3.5  import isabelle._
     3.6  
     3.7 +import java.awt.Frame
     3.8 +
     3.9  import scala.swing.CheckBox
    3.10  import scala.swing.event.ButtonClicked
    3.11  
    3.12  import org.gjt.sp.jedit.{jEdit, View, Buffer}
    3.13  import org.gjt.sp.jedit.textarea.JEditTextArea
    3.14  import org.gjt.sp.jedit.gui.{DockableWindowManager, CompleteWord}
    3.15 +import org.gjt.sp.jedit.options.PluginOptions
    3.16  
    3.17  
    3.18  object Isabelle
    3.19 @@ -314,5 +317,14 @@
    3.20        JEdit_Lib.jedit_views().foreach(_.repaint())
    3.21      }
    3.22    }
    3.23 +
    3.24 +
    3.25 +  /* plugin options */
    3.26 +
    3.27 +  def plugin_options(frame: Frame)
    3.28 +  {
    3.29 +    GUI_Thread.require {}
    3.30 +    new org.gjt.sp.jedit.options.PluginOptions(frame, "plugin.isabelle.jedit.Plugin")
    3.31 +  }
    3.32  }
    3.33  
     4.1 --- a/src/Tools/jEdit/src/jEdit.props	Wed Jul 23 21:02:45 2014 +0200
     4.2 +++ b/src/Tools/jEdit/src/jEdit.props	Wed Jul 23 23:08:22 2014 +0200
     4.3 @@ -216,6 +216,7 @@
     4.4  isabelle.include-word-permanently.label=Include word permanently
     4.5  isabelle.exclude-word.label=Exclude word
     4.6  isabelle.exclude-word-permanently.label=Exclude word permanently
     4.7 +isabelle.options.label=Isabelle options
     4.8  isabelle.reset-words.label=Reset non-permanent words
     4.9  isabelle.reset-continuous-checking.label=Reset continuous checking
    4.10  isabelle.reset-font-size.label=Reset font size