Class Ajde

java.lang.Object
org.aspectj.ajde.Ajde

public class Ajde extends Object
Singleton class used to initialize the Ajde ui as well as the properties required to run the compiler. Users must call "Ajde.init(...)" before doing anything else. There are getter methods for the various properties that are set in the initialization. This also defines the factory for getting new AjCompiler instances.
Author:
Mik Kersten, Andy Clement
  • Field Details

    • INSTANCE

      protected static final Ajde INSTANCE
  • Constructor Details

    • Ajde

      protected Ajde()
      This class can only be constructured by itself (as a singleton) or by sub-classes.
  • Method Details

    • getModel

      public AsmManager getModel()
    • init

      public void init(ICompilerConfiguration compilerConfig, IUIBuildMessageHandler uiBuildMessageHandler, IBuildProgressMonitor monitor, EditorAdapter editorAdapter, IdeUIAdapter ideUIAdapter, IconRegistry iconRegistry, Frame rootFrame, IRuntimeProperties runtimeProperties, boolean useFileView)
      Initializes the ajde ui and sets up the compiler
    • showOptionsFrame

      public void showOptionsFrame()
    • isInitialized

      public boolean isInitialized()
      Returns:
      true if init(..) has been run, false otherwise
    • runInSameVM

      public Thread runInSameVM()
      Utility to run the project main class from the project properties in the same VM using a class loader populated with the classpath and output path or jar. Errors are logged to the ErrorHandler.
      Returns:
      Thread running with process, or null if unable to start
    • runInNewVM

      public LangUtil.ProcessController runInNewVM()
      Utility to run the project main class from the project properties in a new VM. Errors are logged to the ErrorHandler.
      Returns:
      LangUtil.ProcessController running with process, or null if unable to start
    • runBuildInSameThread

      public void runBuildInSameThread(String configFile, boolean buildFresh)
      Set the build off in the same thread
      Parameters:
      configFile -
      buildFresh - - true if want to do a full build, false otherwise
    • runBuildInDifferentThread

      public void runBuildInDifferentThread(String configFile, boolean buildFresh)
      Set the build off in a different thread. Would need to set the build off in a different thread if using a swing application to display the build progress.
      Parameters:
      configFile -
      buildFresh - - true if want to do a full build, false otherwise
    • getDefault

      public static Ajde getDefault()
      Returns:
      the singleton instance
    • getViewManager

      public BrowserViewManager getViewManager()
      Returns:
      the BrowserViewManager
    • getRootFrame

      public Frame getRootFrame()
      Returns:
      the main frame
    • getOptionsFrame

      public OptionsFrame getOptionsFrame()
      Returns:
      the parent frame for the options panel
    • getIdeUIAdapter

      public IdeUIAdapter getIdeUIAdapter()
      Returns:
      the IdeUIAdapter
    • getEditorAdapter

      public EditorAdapter getEditorAdapter()
      Returns:
      the EditorAdapter
    • getBuildConfigEditor

      public TreeViewBuildConfigEditor getBuildConfigEditor()
      Returns:
      the TreeViewBuildConfigEditor
    • getFileStructurePanel

      public StructureViewPanel getFileStructurePanel()
      Returns:
      the StructureViewPanel
    • getIconRegistry

      public IconRegistry getIconRegistry()
      Returns:
      the IconRegistry
    • getStructureViewManager

      public StructureViewManager getStructureViewManager()
      Returns:
      the StructureViewManager
    • getStructureSearchManager

      public StructureSearchManager getStructureSearchManager()
      Returns:
      the StructureSearchManager
    • getBuildConfigManager

      public BuildConfigManager getBuildConfigManager()
      Returns:
      the BuildConfigManager
    • getCompilerConfig

      public ICompilerConfiguration getCompilerConfig()
      Returns:
      the ICompilerConfiguration
    • getMessageHandler

      public IUIBuildMessageHandler getMessageHandler()
      Returns:
      the IUIBuildMessageHandler
    • getBuildProgressMonitor

      public IBuildProgressMonitor getBuildProgressMonitor()
      Returns:
      the IBuildProgressMonitor
    • getCompilerForConfigFile

      public AjCompiler getCompilerForConfigFile(String configFile)
      If the provided configFile is the same as the id for the last compiler then returns that, otherwise clears the state for the saved compiler and creates a new one for the provided configFile
      Parameters:
      configFile -
      Returns:
      the AjCompiler with the id of the given configFile
    • getModelForConfigFile

      public AsmManager getModelForConfigFile(String configFile)