Package org.aspectj.ajde
Class Ajde
java.lang.Object
org.aspectj.ajde.Ajde
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 Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Ajde()
This class can only be constructured by itself (as a singleton) or by sub-classes. -
Method Summary
Modifier and TypeMethodDescriptiongetCompilerForConfigFile(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 configFilestatic Ajde
getModel()
getModelForConfigFile(String configFile)
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 compilerboolean
void
runBuildInDifferentThread(String configFile, boolean buildFresh)
Set the build off in a different thread.void
runBuildInSameThread(String configFile, boolean buildFresh)
Set the build off in the same threadUtility to run the project main class from the project properties in a new VM.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
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Ajde
protected Ajde()This class can only be constructured by itself (as a singleton) or by sub-classes.
-
-
Method Details
-
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
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
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
Set the build off in the same thread- Parameters:
configFile
-buildFresh
- - true if want to do a full build, false otherwise
-
runBuildInDifferentThread
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
- Returns:
- the singleton instance
-
getViewManager
- Returns:
- the BrowserViewManager
-
getRootFrame
- Returns:
- the main frame
-
getOptionsFrame
- Returns:
- the parent frame for the options panel
-
getIdeUIAdapter
- Returns:
- the IdeUIAdapter
-
getEditorAdapter
- Returns:
- the EditorAdapter
-
getBuildConfigEditor
- Returns:
- the TreeViewBuildConfigEditor
-
getFileStructurePanel
- Returns:
- the StructureViewPanel
-
getIconRegistry
- Returns:
- the IconRegistry
-
getStructureViewManager
- Returns:
- the StructureViewManager
-
getStructureSearchManager
- Returns:
- the StructureSearchManager
-
getBuildConfigManager
- Returns:
- the BuildConfigManager
-
getCompilerConfig
- Returns:
- the ICompilerConfiguration
-
getMessageHandler
- Returns:
- the IUIBuildMessageHandler
-
getBuildProgressMonitor
- Returns:
- the IBuildProgressMonitor
-
getCompilerForConfigFile
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
-