Package mars

Class Application

java.lang.Object
mars.Application

public class Application extends Object
Collection of globally-available data structures.
Author:
Pete Sanderson, August 2003
  • Field Details

    • NAME

      public static final String NAME
      The name of the application.
      See Also:
    • VERSION

      public static final String VERSION
      The current MARS Red version number.
      See Also:
    • IMAGES_PATH

      public static final String IMAGES_PATH
      Path to the resources folder that contains images.
      See Also:
    • ACTION_ICONS_PATH

      public static final String ACTION_ICONS_PATH
      Path to the resources folder that contains action icons.
      See Also:
    • HELP_PATH

      public static final String HELP_PATH
      Path to the resources folder that contains help documentation.
      See Also:
    • FILE_EXTENSIONS

      public static final ArrayList<String> FILE_EXTENSIONS
      List of accepted file extensions for MIPS assembly source files.
    • MAXIMUM_MESSAGE_CHARACTERS

      public static final int MAXIMUM_MESSAGE_CHARACTERS
      Maximum length of scrolled message window (Messages and Console).
    • MAXIMUM_ERROR_MESSAGES

      public static final int MAXIMUM_ERROR_MESSAGES
      Maximum number of assembler errors produced by one assemble operation.
    • MAXIMUM_BACKSTEPS

      public static final int MAXIMUM_BACKSTEPS
      Maximum number of back-step operations to buffer.
    • exitCode

      public static int exitCode
      MARS exit code -- useful with syscall 17 when running from command line (not GUI).
    • debug

      public static boolean debug
      Flag to determine whether or not to produce internal debugging information.
    • instructionSet

      public static InstructionSet instructionSet
      The set of implemented MIPS instructions.
    • assembler

      public static Assembler assembler
  • Constructor Details

    • Application

      public Application()
  • Method Details

    • getGUI

      public static VenusUI getGUI()
    • setGUI

      public static void setGUI(VenusUI gui)
    • getSettings

      public static Settings getSettings()
    • initialize

      public static void initialize()
      Method called once upon system initialization to create the global data structures.
    • setupLookAndFeel

      public static void setupLookAndFeel()
      Configure the look and feel of the GUI according to application settings, refreshing the appearance of the GUI if it is already created.
    • getAsciiNonPrint

      public static String getAsciiNonPrint()
      Read ASCII default display character for non-printing characters, from properties file.
    • getAsciiTable

      public static String[] getAsciiTable()
      Read ASCII strings for codes 0-255, from /config/values.properties under AsciiTable. If a string is null, substitute value of AsciiNonPrint. If string is space, substitute string containing one space character.
    • getConfigString

      public static String getConfigString(String key)
      Obtain a configuration string from /config/values.properties.
      Parameters:
      key - The name of the configuration string to retrieve.
      Returns:
      The configuration string requested, or null if it is not specified.
    • getConfigString

      public static String getConfigString(String key, String defaultValue)
      Obtain a configuration string from /config/values.properties.
      Parameters:
      key - The name of the configuration string to retrieve.
      defaultValue - The default value to use if no string is found.
      Returns:
      The configuration string requested, or defaultValue if it is not specified.