Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Inherits AbstractUIPlugin.
Public Member Functions | |
Saros () | |
void | start (BundleContext context) throws Exception |
void | stop (BundleContext context) throws Exception |
synchronized Preferences | getGlobalPreferences () |
synchronized void | saveGlobalPreferences () |
String | getVersion () |
void | convertAccountStore () |
Static Public Member Functions | |
static boolean | isInitialized () |
static void | setDefault (Saros newPlugin) |
Static Public Attributes | |
static final String | PLUGIN_ID = "de.fu_berlin.inf.dpp" |
Protected Member Functions | |
void | setupLoggers () |
Static Protected Member Functions | |
static void | setInitialized (boolean initialized) |
static void | checkInitialized () |
Protected Attributes | |
DotGraphMonitor | dotMonitor |
Preferences | configPrefs |
ISecurePreferences | securePrefs |
Logger | log |
SarosContext | sarosContext |
Static Protected Attributes | |
static Saros | plugin |
static boolean | isInitialized |
The main plug-in of Saros.
de.fu_berlin.inf.dpp.Saros.Saros | ( | ) |
Create the shared instance.
static void de.fu_berlin.inf.dpp.Saros.checkInitialized | ( | ) | [static, protected] |
void de.fu_berlin.inf.dpp.Saros.convertAccountStore | ( | ) |
synchronized Preferences de.fu_berlin.inf.dpp.Saros.getGlobalPreferences | ( | ) |
Returns the global Preferences with ConfigurationScope for this plug-in or null if the node couldn't be determined.
The returned Preferences can be accessed concurrently by multiple threads of the same JVM without external synchronization. If they are used by multiple JVMs no guarantees can be made concerning data consistency (see Preferences for details).
String de.fu_berlin.inf.dpp.Saros.getVersion | ( | ) |
Returns a string representing the Saros Version number for instance "9.5.7.r1266"
This method only returns a valid version string after the plugin has been started.
This is equivalent to the bundle version.
static boolean de.fu_berlin.inf.dpp.Saros.isInitialized | ( | ) | [static] |
Returns true if the Saros instance has been initialized so that calling SarosContext#reinject(Object) will be well defined.
synchronized void de.fu_berlin.inf.dpp.Saros.saveGlobalPreferences | ( | ) |
Saves the global preferences to disk. Should be called at least before the bundle is stopped to prevent loss of data. Can be called whenever found necessary.
static void de.fu_berlin.inf.dpp.Saros.setDefault | ( | Saros | newPlugin | ) | [static] |
static void de.fu_berlin.inf.dpp.Saros.setInitialized | ( | boolean | initialized | ) | [static, protected] |
void de.fu_berlin.inf.dpp.Saros.setupLoggers | ( | ) | [protected] |
void de.fu_berlin.inf.dpp.Saros.start | ( | BundleContext | context | ) | throws Exception |
This method is called upon plug-in activation
void de.fu_berlin.inf.dpp.Saros.stop | ( | BundleContext | context | ) | throws Exception |
This method is called when the plug-in is stopped
Preferences de.fu_berlin.inf.dpp.Saros.configPrefs [protected] |
2, Some Basics:
Preferences are managed by Eclipse-provided classes. Most are kept by Preferences, but some sensitive data (like user account data) is kept in a SecurePreference.
If you press Ctrl+Shift+R and type in "*preference*" you will see every class in Saros that deals with preferences. Classes named "*PreferencePage" implement individual pages within the Eclipse preferences's Saros section. Preference labels go in PreferenceConstants.java. The global plug-in preferences, shared among all workspaces. Should only be accessed over getGlobalPreferences() from outside this class.
DotGraphMonitor de.fu_berlin.inf.dpp.Saros.dotMonitor [protected] |
To print an architecture diagram at the end of the plug-in life-cycle initialize the dotMonitor with a new instance:
dotMonitor= new DotGraphMonitor();
boolean de.fu_berlin.inf.dpp.Saros.isInitialized [static, protected] |
True if the Saros instance has been initialized so that calling reinject() will be well defined.
Logger de.fu_berlin.inf.dpp.Saros.log [protected] |
Saros de.fu_berlin.inf.dpp.Saros.plugin [static, protected] |
1, Some Basics:
This class manages the lifecycle of the Saros plug-in, contains some important supporting data members and provides methods for the integration of Saros into Eclipse.
Browse the data members. Some are quite obvious (version, feature etc.) some need closer examination. The single instance of the Saros plugin.
final String de.fu_berlin.inf.dpp.Saros.PLUGIN_ID = "de.fu_berlin.inf.dpp" [static] |
This is the Bundle-SymbolicName (a.k.a the pluginID)
SarosContext de.fu_berlin.inf.dpp.Saros.sarosContext [protected] |
4, Invitation Process:
If you haven't already read about PicoContainer, stop and do so now (http://picocontainer.codehaus.org).
Saros uses PicoContainer to manage dependencies on our behalf. The SarosContext class encapsulates our usage of PicoContainer. It's a well documented class, so take a look at it.
ISecurePreferences de.fu_berlin.inf.dpp.Saros.securePrefs [protected] |
The secure preferences store, used to store sensitive data that may (at the user's option) be stored encrypted.