org.aspectj.ajde
Class Ajde

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

public class Ajde
extends java.lang.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.


Field Summary
protected static Ajde INSTANCE
           
 
Constructor Summary
protected Ajde()
          This class can only be constructured by itself (as a singleton) or by sub-classes.
 
Method Summary
 TreeViewBuildConfigEditor getBuildConfigEditor()
           
 BuildConfigManager getBuildConfigManager()
           
 IBuildProgressMonitor getBuildProgressMonitor()
           
 ICompilerConfiguration getCompilerConfig()
           
 AjCompiler getCompilerForConfigFile(java.lang.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
static Ajde getDefault()
           
 EditorAdapter getEditorAdapter()
           
 StructureViewPanel getFileStructurePanel()
           
 IconRegistry getIconRegistry()
           
 IdeUIAdapter getIdeUIAdapter()
           
 IUIBuildMessageHandler getMessageHandler()
           
 AsmManager getModel()
           
 AsmManager getModelForConfigFile(java.lang.String configFile)
           
 OptionsFrame getOptionsFrame()
           
 java.awt.Frame getRootFrame()
           
 StructureSearchManager getStructureSearchManager()
           
 StructureViewManager getStructureViewManager()
           
 BrowserViewManager getViewManager()
           
 void init(ICompilerConfiguration compilerConfig, IUIBuildMessageHandler uiBuildMessageHandler, IBuildProgressMonitor monitor, EditorAdapter editorAdapter, IdeUIAdapter ideUIAdapter, IconRegistry iconRegistry, java.awt.Frame rootFrame, IRuntimeProperties runtimeProperties, boolean useFileView)
          Initializes the ajde ui and sets up the compiler
 boolean isInitialized()
           
 void runBuildInDifferentThread(java.lang.String configFile, boolean buildFresh)
          Set the build off in a different thread.
 void runBuildInSameThread(java.lang.String configFile, boolean buildFresh)
          Set the build off in the same thread
 LangUtil.ProcessController runInNewVM()
          Utility to run the project main class from the project properties in a new VM.
 java.lang.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.
 void showOptionsFrame()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

protected static final Ajde INSTANCE
Constructor Detail

Ajde

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

Method Detail

getModel

public AsmManager getModel()

init

public void init(ICompilerConfiguration compilerConfig,
                 IUIBuildMessageHandler uiBuildMessageHandler,
                 IBuildProgressMonitor monitor,
                 EditorAdapter editorAdapter,
                 IdeUIAdapter ideUIAdapter,
                 IconRegistry iconRegistry,
                 java.awt.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 java.lang.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.

Parameters:
project - the ProjectPropertiesAdapter specifying the main class, classpath, and executable arguments.
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(java.lang.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(java.lang.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 java.awt.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(java.lang.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(java.lang.String configFile)