| net.sf.jmoney.JMoneyPlugin
JMoneyPlugin | public class JMoneyPlugin extends AbstractUIPlugin (Code) | | The main plugin class to be used in the desktop.
|
DEBUG | final public static boolean DEBUG(Code) | | |
JMoneyPlugin | public JMoneyPlugin()(Code) | | The constructor.
|
addSessionChangeListener | public void addSessionChangeListener(CurrentSessionChangeListener listener, Control control)(Code) | | Adds a change listener.
The listener is active only for as long as the given control exists. When the
given control is disposed, the listener is removed and will receive no more
notifications.
This method is generally used when a listener is used to update contents in a
control. Typically multiple controls are updated by a listener and the parent
composite control is passed to this method.
Parameters: listener - Parameters: control - |
areEqual | public static boolean areEqual(Object object1, Object object2)(Code) | | Helper method to compare two objects. Either or both
the objects may be null. If both objects are null,
they are considered equal.
Parameters: object - Parameters: object2 - |
createImage | public static Image createImage(String name)(Code) | | |
createImageDescriptor | public static ImageDescriptor createImageDescriptor(String name)(Code) | | |
getDateFormat | public String getDateFormat()(Code) | | Get the format to be used for dates. This format is
compatible with the VerySimpleDateFormat class.
The format is read from the preference store.
|
getIsoCurrency | public static Currency getIsoCurrency(Session session, String code)(Code) | | Get the corresponding ISO currency for "code". If "session" already
contains such a currency this currency is returned. Otherwise, we
check our list of ISO 4217 currencies and we create a new currency
instance for "session".
Parameters: session - Session object which will contain the currency Parameters: code - ISO currency code Currency for "code" |
getResourceBundle | public ResourceBundle getResourceBundle()(Code) | | Returns the plugin's resource bundle,
|
getResourceString | public static String getResourceString(String key)(Code) | | Returns the string from the plugin's resource bundle,
or 'key' if not found.
|
initSystemCurrency | public static void initSystemCurrency(Session session)(Code) | | Whenever a new session is created, JMoney will set a single initial
currency. The currency is taken from our list of ISO 4217
currencies and chosen using information from the default locale.
This currency is also set as the default currency.
By doing this, we minimize the number of steps that a new JMoney
user must take to get started. If a user only ever uses a single
currency then the user may never have to worry about currencies
and may never see a currency selection control.
Parameters: session - |
log | public static void log(IStatus status)(Code) | | Log status to log the of this plug-in.
|
log | public static void log(Throwable e)(Code) | | Log exception to the log of this plug-in.
Parameters: e - Exception to log |
openSession | public static Session openSession(IMemento memento)(Code) | | Given a memento containing the data needed to open a session,
return the session. If the session is already open
then return the session, otherwise the session is opened
by this method and returned.
Parameters: memento - |
saveOldSession | public boolean saveOldSession(IWorkbenchWindow window)(Code) | | Saves the old session.
Returns false if canceled by user or the save fails.
|
setSessionManager | public void setSessionManager(DatastoreManager newSessionManager)(Code) | | Sets the Session object. The session object contains the accounting
data so this method will replace the accounting data in the framework
with a new set of accounting data. This method is normally called
only by plug-ins that implement a datastore when accounting data
is loaded.
To avoid doing too much work and user input before setting the new
session, only to find that the
user does not want to close the previous session, plug-in actions
that expect to set a new session should call canClose on the previous
session before preparing the new session. It is the caller's
responsibility to ensure that
both canClose() and close() are called on the previous session.
This method will not close any previously set session.
|
start | public void start(BundleContext context) throws Exception(Code) | | This method is called upon plug-in activation
|
stop | public void stop(BundleContext context) throws Exception(Code) | | This method is called when the plug-in is stopped
|
|
|