Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java44
1 files changed, 23 insertions, 21 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java
index c87ed143d59..54335cb568c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/Activator.java
@@ -31,9 +31,9 @@ public class Activator extends AbstractUIPlugin {
private static Activator plugin;
/** Logging helper */
- public static LogHelper log;
-
- /**
+ public static LogHelper log;
+
+ /**
* The constructor
*/
public Activator() {
@@ -44,11 +44,12 @@ public class Activator extends AbstractUIPlugin {
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
// register the login helper
- log = new LogHelper(plugin);
+ log = new LogHelper(plugin);
}
/*
@@ -56,6 +57,7 @@ public class Activator extends AbstractUIPlugin {
*
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
+ @Override
public void stop(BundleContext context) throws Exception {
plugin = null;
log = null;
@@ -64,7 +66,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
@@ -74,15 +76,15 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns an <code>org.eclipse.swt.graphics.Image</code> identified by its key.<BR>
* By default, it returns a default image. This image is the image placed in the directory <em>resources/icons/default.gif</em>
- *
+ *
* @param key
- * the key of the image
+ * the key of the image
* @return the Image
*/
public static Image getImage(String key) {
ImageRegistry registry = getDefault().getImageRegistry();
Image image = registry.get(key);
- if(image == null) {
+ if (image == null) {
ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, key);
registry.put(key, desc);
image = registry.get(key);
@@ -93,17 +95,17 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns an <code>org.eclipse.swt.graphics.Image</code> identified by its key and its owning
* plugin.<BR>
- *
+ *
* @param pluginID
- * the plugin id where to retrieve the image
+ * the plugin id where to retrieve the image
* @param key
- * the key of the image
+ * the key of the image
* @return the Image
*/
public static Image getImage(String pluginID, String key) {
ImageRegistry registry = getDefault().getImageRegistry();
Image image = registry.get(key);
- if(image == null) {
+ if (image == null) {
ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginID, key);
registry.put(key, desc);
image = registry.get(key);
@@ -113,11 +115,11 @@ public class Activator extends AbstractUIPlugin {
/**
* Log a message and an exception in the plugin's log.
- *
+ *
* @param message
- * the message to log
+ * the message to log
* @param e
- * the exception to log
+ * the exception to log
*/
public static void log(String message, Exception e) {
getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, message, e));
@@ -125,9 +127,9 @@ public class Activator extends AbstractUIPlugin {
/**
* Log a message in the plugin's log.
- *
+ *
* @param message
- * the message to log
+ * the message to log
*/
public static void log(String message) {
getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, message, null));
@@ -135,9 +137,9 @@ public class Activator extends AbstractUIPlugin {
/**
* Log a message in the plugin's log.
- *
+ *
* @param message
- * the message to log
+ * the message to log
*/
public static void log(Exception e) {
getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.OK, e.getLocalizedMessage(), e));
@@ -145,9 +147,9 @@ public class Activator extends AbstractUIPlugin {
/**
* Log a message in the plugin's log.
- *
+ *
* @param message
- * the message to log
+ * the message to log
*/
public static void debug(String message) {
getDefault().getLog().log(new Status(IStatus.INFO, Activator.PLUGIN_ID, IStatus.OK, message, null));

Back to the top