--- a/src/Tools/VSCode/src/build_vscode_extension.scala Tue Mar 22 19:19:09 2022 +0100
+++ b/src/Tools/VSCode/src/build_vscode_extension.scala Tue Mar 22 19:33:38 2022 +0100
@@ -139,20 +139,6 @@
lazy val extension_dir = Path.explode("$ISABELLE_VSCODE_HOME/extension")
- def uninstall_extension(progress: Progress = new Progress): Unit =
- VSCode_Main.run_vscodium(
- List("--uninstall-extension", "Isabelle.isabelle"), progress = progress).check
-
- def install_extension(vsix: File.Content, progress: Progress = new Progress): Unit =
- {
- Isabelle_System.with_tmp_dir("tmp")(tmp_dir =>
- {
- vsix.write(tmp_dir)
- VSCode_Main.run_vscodium(
- List("--install-extension", File.platform_path(tmp_dir + vsix.path)), progress = progress).check
- })
- }
-
def build_extension(options: Options,
logic: String = default_logic,
dirs: List[Path] = Nil,
@@ -219,11 +205,11 @@
val options = Options.init()
val progress = new Console_Progress()
- if (uninstall) uninstall_extension(progress = progress)
+ if (uninstall) VSCode_Main.uninstall_extension(progress = progress)
else {
val vsix = build_extension(options, logic = logic, dirs = dirs, progress = progress)
vsix.write(extension_dir)
- if (install) install_extension(vsix, progress = progress)
+ if (install) VSCode_Main.install_extension(vsix, progress = progress)
}
})
}
--- a/src/Tools/VSCode/src/vscode_main.scala Tue Mar 22 19:19:09 2022 +0100
+++ b/src/Tools/VSCode/src/vscode_main.scala Tue Mar 22 19:33:38 2022 +0100
@@ -71,6 +71,22 @@
}
+ /* extensions */
+
+ def uninstall_extension(progress: Progress = new Progress): Unit =
+ run_vscodium(List("--uninstall-extension", "Isabelle.isabelle"), progress = progress).check
+
+ def install_extension(vsix: File.Content, progress: Progress = new Progress): Unit =
+ {
+ Isabelle_System.with_tmp_dir("tmp")(tmp_dir =>
+ {
+ vsix.write(tmp_dir)
+ run_vscodium(List("--install-extension", File.platform_path(tmp_dir + vsix.path)),
+ progress = progress).check
+ })
+ }
+
+
/* settings */
def settings_path: Path =