Module Simula

Class RTS_COMMON

java.lang.Object
simula.runtime.RTS_COMMON

public final class RTS_COMMON extends Object
Utility class containing a lot of common stuff.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
  • Field Details

    • console

      static RTS_ConsolePanel console
      The runtime console. May be null
    • progamIdent

      static String progamIdent
      The program ident.
    • currentModid

      static String currentModid
      The current module ident.
    • currentSimLine

      static int currentSimLine
      The current simula source line number.
    • numberOfEditOverflows

      static int numberOfEditOverflows
      Number of edit overflows.
  • Constructor Details

    • RTS_COMMON

      private RTS_COMMON()
      Default constructor.
  • Method Details

    • setRuntimeOptions

      public static void setRuntimeOptions(String[] args)
      Set runtime options.
      Parameters:
      args - argument array
    • help

      private static void help()
      Print synopsis of standard options
    • error

      private static void error(String msg)
      Utility: Print an error message in a popup panel.
      Parameters:
      msg - the error message
    • popUpError

      static void popUpError(String msg)
      Popup an error message box.
      Parameters:
      msg - the error message
    • optionDialog

      static int optionDialog(Object msg, String title, int optionType, int messageType, String... option)
      Brings up an option dialog.
      Parameters:
      msg - the message to display
      title - the title string for the dialog
      optionType - an integer designating the options available on the dialog
      messageType - an integer designating the kind of message this is
      option - an array of objects indicating the possible choices the user can make
      Returns:
      an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
    • listRuntimeOptions

      static void listRuntimeOptions()
      List runtime options.
    • println

      static void println(String msg)
      Print a line on the runtime console if present, otherwise on System.out
      Parameters:
      msg - the message to print
    • printError

      static void printError(String msg)
      Print an error on the runtime console if present, otherwise on System.out
      Parameters:
      msg - the message to print
    • printWarning

      static void printWarning(String msg)
      Print a warning message on the runtime console if present, otherwise on System.out
      Parameters:
      msg - the message to print
    • TRACE

      static void TRACE(String msg)
      TRACE Utility.
      Parameters:
      msg - a trace message
    • IERR

      static void IERR(String msg)
      Utility: Internal error.
      Parameters:
      msg - an error message
    • getJavaID

      static String getJavaID()
      Returns System property "java.vm.specification.version"
      Returns:
      System property "java.vm.specification.version"
    • printStaticChain

      static void printStaticChain()
      Print static chain starting with the current instance.
    • printStaticChain

      static void printStaticChain(RTS_RTObject ins)
      Print static chain starting with 'ins'
      Parameters:
      ins - argument
    • printSimulaStackTrace

      static void printSimulaStackTrace(int start)
      Utility: Print Simula stack trace.
      Parameters:
      start - start index in Java stackTrace
    • printSimulaStackTrace

      static void printSimulaStackTrace(Throwable e, int start)
      Utility: Print Simula stack trace.
      Parameters:
      e - a Throwable
      start - start index in Java stackTrace
    • printSimulaStackTrace

      private static void printSimulaStackTrace(StackTraceElement[] stackTraceElement, int start)
      Utility: Print Simula StackTrace.
      Parameters:
      stackTraceElement - Java stackTrace
      start - start index in Java stackTrace
    • printSimulaLineInfo

      private static boolean printSimulaLineInfo(StackTraceElement elt, String lead)
      Utility: Print SimulaLineInfo
      Parameters:
      elt - a StackTraceElement
      lead - the keading string
      Returns:
      the resulting line info
    • printThreadList

      static void printThreadList()
      Print Thread list.
    • printThreadList

      static void printThreadList(boolean withStackTrace)
      Print Thread list.
      Parameters:
      withStackTrace - argument
    • _LINE

      public static void _LINE(String modid, int simLine)
      Utility: Set current modid and Simula source line number.
      Parameters:
      modid - new current modid
      simLine - new Simula source line number