Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.Saros Class Reference

Inherits AbstractUIPlugin.

List of all members.

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

Detailed Description

The main plug-in of Saros.

Author:
rdjemili
coezbek

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.Saros.Saros ( )

Create the shared instance.


Member Function Documentation

static void de.fu_berlin.inf.dpp.Saros.checkInitialized ( ) [static, protected]
void de.fu_berlin.inf.dpp.Saros.convertAccountStore ( )
Deprecated:
Only of one-time use to convert from the old, IDE-dependent format to the new, IDE-independent format. Will be removed in Release n+2
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).

Returns:
the preferences node for this plug-in containing global preferences that are visible for all workspaces of this eclipse installation
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


Member Data Documentation

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.

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]

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)

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.

 All Classes Namespaces Files Functions Variables Enumerations