more robust Scala 3 indentation, for the sake of IntelliJ IDEA;
authorwenzelm
Fri, 08 Jul 2022 20:24:05 +0200
changeset 75659 9bd92ac9328f
parent 75658 5905c7f484b3
child 75660 45d3497c0baa
more robust Scala 3 indentation, for the sake of IntelliJ IDEA;
src/Pure/Admin/build_jdk.scala
src/Pure/General/symbol.scala
src/Pure/PIDE/markup_tree.scala
src/Pure/Thy/bibtex.scala
src/Pure/Tools/build_docker.scala
src/Pure/Tools/phabricator.scala
src/Pure/Tools/scala_project.scala
src/Tools/jEdit/src/syntax_style.scala
--- a/src/Pure/Admin/build_jdk.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/Admin/build_jdk.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -69,7 +69,7 @@
   /* README */
 
   def readme(jdk_version: String): String =
-"""This is OpenJDK """ + jdk_version + """ based on downloads by Azul, see also
+    """This is OpenJDK """ + jdk_version + """ based on downloads by Azul, see also
 https://www.azul.com/downloads/zulu-community/?package=jdk
 
 The main license is GPL2, but some modules are covered by other (more liberal)
@@ -83,7 +83,7 @@
   /* settings */
 
   val settings: String =
-"""# -*- shell-script -*- :mode=shellscript:
+    """# -*- shell-script -*- :mode=shellscript:
 
 case "$ISABELLE_PLATFORM_FAMILY" in
   linux)
--- a/src/Pure/General/symbol.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/General/symbol.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -229,12 +229,13 @@
     def decode(symbol_offset: Offset): Text.Offset = index.decode(symbol_offset)
     def decode(symbol_range: Range): Text.Range = index.decode(symbol_range)
     def incorporate(symbol_range: Range): Option[Text.Range] = {
-      def in(r: Range): Option[Text.Range] =
+      def in(r: Range): Option[Text.Range] = {
         range.try_restrict(decode(r)) match {
           case Some(r1) if !r1.is_singularity => Some(r1)
           case _ => None
         }
-     in(symbol_range) orElse in(symbol_range - 1)
+      }
+      in(symbol_range) orElse in(symbol_range - 1)
     }
   }
 
--- a/src/Pure/PIDE/markup_tree.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/PIDE/markup_tree.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -258,7 +258,7 @@
       body ++= make_text(last, elem_range.stop)
       make_elems(elem_markup, body.toList)
     }
-   make_body(root_range, Nil, overlapping(root_range))
+    make_body(root_range, Nil, overlapping(root_range))
   }
 
   override def toString: String =
--- a/src/Pure/Thy/bibtex.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/Thy/bibtex.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -206,7 +206,7 @@
             val full_name = Long_Name.qualify(Markup.CITATION, entry)
             val description = List(entry, "(BibTeX entry)")
             val replacement = quote(entry)
-          Completion.Item(r, original, full_name, description, replacement, 0, false)
+            Completion.Item(r, original, full_name, description, replacement, 0, false)
         }).sorted(history.ordering).take(rendering.options.int("completion_limit"))
     } yield Completion.Result(r, original, false, items)
   }
--- a/src/Pure/Tools/build_docker.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/Tools/build_docker.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -57,22 +57,18 @@
 
 # Isabelle
 WORKDIR /home/isabelle
-""" +
- (if (is_remote)
-   "RUN curl --fail --silent " + Bash.string(app_archive) + " > Isabelle.tar.gz"
-  else "COPY Isabelle.tar.gz .") +
-"""
+""" + (if (is_remote)
+       "RUN curl --fail --silent " + Bash.string(app_archive) + " > Isabelle.tar.gz"
+      else "COPY Isabelle.tar.gz .") + """
 RUN tar xzf Isabelle.tar.gz && \
   mv """ + isabelle_name + """ Isabelle && \
   sed -i -e 's,ISABELLE_HOME_USER=.*,ISABELLE_HOME_USER="\$USER_HOME/.isabelle",g;' Isabelle/etc/settings && \
   sed -i -e 's,ISABELLE_LOGIC=.*,ISABELLE_LOGIC=""" + logic + """,g;' Isabelle/etc/settings && \
   Isabelle/bin/isabelle build -o system_heaps -b """ + logic + """ && \
-  rm Isabelle.tar.gz""" +
- (if (entrypoint) """
+  rm Isabelle.tar.gz""" + (if (entrypoint) """
 
 ENTRYPOINT ["Isabelle/bin/isabelle"]
-"""
-  else "")
+""" else "")
 
     output.foreach(File.write(_, dockerfile))
 
--- a/src/Pure/Tools/phabricator.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/Tools/phabricator.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -564,7 +564,7 @@
   /** setup mail **/
 
   val mailers_template: String =
-"""[
+    """[
   {
     "key": "example.org",
     "type": "smtp",
--- a/src/Pure/Tools/scala_project.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Pure/Tools/scala_project.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -87,7 +87,7 @@
       def dependency(jar: Path): String = {
         val name = jar.expand.drop_ext.base.implode
         val system_path = File.platform_path(jar.absolute)
-      """  <dependency>
+        """  <dependency>
     <groupId>classpath</groupId>
     <artifactId>""" + XML.text(name) + """</artifactId>
     <version>0</version>
--- a/src/Tools/jEdit/src/syntax_style.scala	Fri Jul 08 20:06:53 2022 +0200
+++ b/src/Tools/jEdit/src/syntax_style.scala	Fri Jul 08 20:24:05 2022 +0200
@@ -103,10 +103,12 @@
             AffineTransform.getScaleInstance(2.0, font0.getSize.toDouble)))
       new_styles(control) =
         new SyntaxStyle(style0.getForegroundColor, style0.getBackgroundColor,
-          { val font_style =
+          {
+            val font_style =
               (if (font0.isItalic) 0 else Font.ITALIC) |
               (if (font0.isBold) 0 else Font.BOLD)
-            new Font(font0.getFamily, font_style, font0.getSize) })
+            new Font(font0.getFamily, font_style, font0.getSize)
+          })
       new_styles
     }
   }