Class SAApplication
- java.lang.Object
-
- com.sodius.mdw.metamodel.sa.io.app.SAApplication
-
public abstract class SAApplication extends Object
This is the Rational System Architect application object, through which the user interface can be controlled. It is the highest level in the object model.- Since:
- 2.2.0
- See Also:
getActiveApplication(MDWorkbench)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SAApplication()
Clients are not expected to subclass nor instantiate this class.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SAApplication
getActiveApplication(MDWorkbench workbench)
Connects to the active System Architect application instance.abstract IEncyclopedia
getEncyclopedia()
Returns the encyclopedia object, which facilitates access to the encyclopedia class attributes and methods.abstract FileManager
getFileManager()
Return a new file manager initialized from the System Architect application.abstract File
getInstallDirectory()
Return the install directory of the System Architect application.abstract void
refreshBrowser()
Refreshes the System Architect browser.abstract void
runWithoutDialogs(Runnable runnable, Logger logger)
Executes the specified runnable block and prevents dialogs from blocking the execution.abstract void
writeStatusLine(String text)
Allows short messages to be relayed to the user to keep them informed whilst code is being executed on the status bar of System Architect (bar in the bottom left hand corner).
-
-
-
Constructor Detail
-
SAApplication
protected SAApplication()
Clients are not expected to subclass nor instantiate this class.- See Also:
getActiveApplication(MDWorkbench)
-
-
Method Detail
-
getActiveApplication
public static SAApplication getActiveApplication(MDWorkbench workbench) throws CoreException
Connects to the active System Architect application instance. This method throws an exception if System Architect is not running.- Parameters:
workbench
- the workbench which determines the context in which the connection to the application is made.- Returns:
- the active application.
- Throws:
CoreException
- if System Architect is not running.
-
getEncyclopedia
public abstract IEncyclopedia getEncyclopedia()
Returns the encyclopedia object, which facilitates access to the encyclopedia class attributes and methods.- Returns:
- the encyclopedia object.
-
refreshBrowser
public abstract void refreshBrowser()
Refreshes the System Architect browser. This will force any items added to the encyclopedia since the last refresh to be displayed.
-
writeStatusLine
public abstract void writeStatusLine(String text)
Allows short messages to be relayed to the user to keep them informed whilst code is being executed on the status bar of System Architect (bar in the bottom left hand corner).- Parameters:
text
- text that will be shown on status bar.
-
runWithoutDialogs
public abstract void runWithoutDialogs(Runnable runnable, Logger logger)
Executes the specified runnable block and prevents dialogs from blocking the execution. If System Architect opens warning dialogs during the runnable execution, those dialogs will be closed automatically and their messages will be transmitted to the specified logger. The execution of the runnable will occur in the thread of the caller; the monitoring of dialogs will occur in another thread.- Parameters:
runnable
- an runnable to execute.logger
- the logger which is notified of System Architect potential warning messages.
-
getFileManager
public abstract FileManager getFileManager()
Return a new file manager initialized from the System Architect application.- Returns:
- the file manager.
- Since:
- 2.2.2
-
getInstallDirectory
public abstract File getInstallDirectory()
Return the install directory of the System Architect application. This method works with or without an opened Encyclopedia in the current System Architect application.- Returns:
- the install directory of System Architect.
- Since:
- 2.2.1
-
-