Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-03-04 23:07:30 +0000
committerSergey Prigogin2011-03-04 23:07:30 +0000
commit9738529f904f09af92c21610aafc225563bcd639 (patch)
tree0a38796d8511f4b563bc0475367e5ae3bb0c56d9 /codan/org.eclipse.cdt.codan.core
parent0c4c2720e21291e196d4f049dd13f880648396a4 (diff)
downloadorg.eclipse.cdt-9738529f904f09af92c21610aafc225563bcd639.tar.gz
org.eclipse.cdt-9738529f904f09af92c21610aafc225563bcd639.tar.xz
org.eclipse.cdt-9738529f904f09af92c21610aafc225563bcd639.zip
Bug 338492 - 'log(String, Throwable)' method. Patch by Alex Ruiz.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java44
1 files changed, 31 insertions, 13 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
index 9b67ff99154..befb24ac5cb 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
@@ -22,8 +22,12 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class CodanCorePlugin extends Plugin {
- // The plug-in ID
+ /** The plug-in ID */
public static final String PLUGIN_ID = "org.eclipse.cdt.codan.core"; //$NON-NLS-1$
+ /**
+ * The nature used to run Codan builder.
+ * @noreference This constant is not intended to be referenced by clients.
+ */
public static final String NATURE_ID = CodeAnlysisNature.NATURE_ID;
// The shared instance
private static CodanCorePlugin plugin;
@@ -34,13 +38,16 @@ public class CodanCorePlugin extends Plugin {
public CodanCorePlugin() {
}
+ /**
+ * @return the preferences node for this plug-in.
+ */
public IEclipsePreferences getStorePreferences() {
- return new InstanceScope().getNode(PLUGIN_ID);
+ return InstanceScope.INSTANCE.getNode(PLUGIN_ID);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
@@ -52,7 +59,7 @@ public class CodanCorePlugin extends Plugin {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
@@ -64,7 +71,7 @@ public class CodanCorePlugin extends Plugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static CodanCorePlugin getDefault() {
@@ -73,7 +80,7 @@ public class CodanCorePlugin extends Plugin {
/**
* Logs the specified status with this plug-in's log.
- *
+ *
* @param status
* status to log
*/
@@ -83,19 +90,30 @@ public class CodanCorePlugin extends Plugin {
/**
* Logs an internal error with the specified throwable
- *
- * @param e
- * the exception to be logged
+ *
+ * @param e the exception to be logged
+ * @noreference This method is not intended to be referenced by clients.
*/
public static void log(Throwable e) {
- log(new Status(IStatus.ERROR, PLUGIN_ID, 1, "Internal Error", e)); //$NON-NLS-1$
+ log("Internal Error", e); //$NON-NLS-1$
+ }
+
+ /**
+ * Logs an internal error with the specified message and throwable
+ *
+ * @param message the error message to log
+ * @param e the exception to be logged
+ * @noreference This method is not intended to be referenced by clients.
+ */
+ public static void log(String message, Throwable e) {
+ log(new Status(IStatus.ERROR, CodanCorePlugin.PLUGIN_ID, 1, message, e));
}
/**
* Logs an internal error with the specified message.
- *
- * @param message
- * the error message to log
+ *
+ * @param message the error message to log
+ * @noreference This method is not intended to be referenced by clients.
*/
public static void log(String message) {
log(new Status(IStatus.ERROR, PLUGIN_ID, 1, message, null));

Back to the top