harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghar...@apache.org
Subject svn commit: r418985 - /incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java
Date Tue, 04 Jul 2006 11:44:22 GMT
Author: gharley
Date: Tue Jul  4 04:44:21 2006
New Revision: 418985

URL: http://svn.apache.org/viewvc?rev=418985&view=rev
Log:
HARMONY 700 : wrong line endings (0xD) HyLaunchingPlugin.java

Modified:
    incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java

Modified: incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java?rev=418985&r1=418984&r2=418985&view=diff
==============================================================================
--- incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java
(original)
+++ incubator/harmony/enhanced/tools/trunk/eclipse/org.apache.harmony.eclipse.jdt.launching/src/org/apache/harmony/eclipse/jdt/launching/HyLaunchingPlugin.java
Tue Jul  4 04:44:21 2006
@@ -1,4 +1,4 @@
-/* Copyright 2000, 2005 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 2000, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -11,4 +11,125 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- */

package org.apache.harmony.eclipse.jdt.launching;

import org.eclipse.core.runtime.IStatus;
import
org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import
org.osgi.framework.BundleContext;

public class HyLaunchingPlugin extends Plugin {

	/**
 * Unique identifier constant.
	 */
	private static final String PI_Harmony_Launching = "org.apache.harmony.jdt.launching";
//$NON-NLS-1$

	private static HyLaunchingPlugin plugin;

	static final String DEBUG_PLUGIN
= PI_Harmony_Launching + "/plugin"; //$NON-NLS-1$

	static final String DEBUG_INSTALLING =
PI_Harmony_Launching + "/vm/installing"; //$NON-NLS-1$

	static final String DEBUG_LAUNCHING
= PI_Harmony_Launching + "/application/launching"; //$NON-NLS-1$

	/**
	 * Default constructor.
 */
	public HyLaunchingPlugin() {
		super();
		plugin = this;
	}

	public void start(BundleContext
context) throws Exception {
		super.start(context);

		if (isDebugging()
				
 && (Platform.getDebugOption(DEBUG_PLUGIN)
						.equalsIgnoreCase("true"))) { //$NON-NLS-1$
		System.out.println(PI_Harmony_Launching + "--> Plugin started"); //$NON-NLS-1$
		}
	}

public void stop(BundleContext context) throws Exception {
		if (isDebugging()
				&&
(Platform.getDebugOption(DEBUG_PLUGIN)
						.equalsIgnoreCase("true"))) { //$NON-NLS-1$
		System.out.println(PI_Harmony_Launching + "--> Plugin stopping"); //$NON-NLS-1$
		}

	super.stop(context);
	}

	public static HyLaunchingPlugin getDefault() {
		return plugin;
}

	/**
	 * Convenience method which returns the unique identifier of this plugin.
	 */
	public
static String getUniqueIdentifier() {
		return PI_Harmony_Launching;
	}

	/**
	 * Convenience
method to write status information to the platform log.
	 * 
	 * @param msg
	 *          
 information to be written to the platform log.
	 */
	public void log(String msg) {
		log(msg,
null);
	}

	/**
	 * Convenience method to write problem information to the 
 platform log.
	 * 
	 * @param msg
	 *            additional information about the event
 * @param e
	 *            exception encapsulating any non-fatal problem
	 */
	public void
log(String msg, Exception e) {
		getLog().log(
				new Status(IStatus.INFO, getUniqueIdentifier(),
IStatus.OK,
						msg, e));
	}

	/**
	 * Convenience method to write error information to
the platform log.
	 * 
	 * @param msg
	 *            additional information about the event
 * @param e
	 *            exception encapsulating the error
	 */
	public void logError(String
msg, Exception e) {
		getLog().log(
				new Status(IStatus.INFO, getUniqueIdentifier(), IStatus.ERROR,
					msg, e));
	}

	/**
	 * Convenience method that returns a boolean indication of whether
or not
	 * the plug-in is running with debug trace on <em>and</em> if the option
 * to allow trace messages about the VM installation activities has been
	 * specified.
	
* 
	 * @return <code>true</code> if tracing of VM install activi
 ties is
	 *         enabled, otherwise <code>false</code>.
	 */
	public static
boolean isDebuggingInstalling() {
		boolean result = false;
		if (plugin.isDebugging()) {
		String option = Platform.getDebugOption(DEBUG_INSTALLING);
			if ((option != null) &&
option.equalsIgnoreCase("true")) { //$NON-NLS-1$
				result = true;
			}
		}
		return result;
}
}
+ */
+
+package org.apache.harmony.eclipse.jdt.launching;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+public class HyLaunchingPlugin extends Plugin {
+
+	/**
+	 * Unique identifier constant.
+	 */
+	private static final String PI_Harmony_Launching = "org.apache.harmony.jdt.launching"; //$NON-NLS-1$
+
+	private static HyLaunchingPlugin plugin;
+
+	static final String DEBUG_PLUGIN = PI_Harmony_Launching + "/plugin"; //$NON-NLS-1$
+
+	static final String DEBUG_INSTALLING = PI_Harmony_Launching + "/vm/installing"; //$NON-NLS-1$
+
+	static final String DEBUG_LAUNCHING = PI_Harmony_Launching + "/application/launching"; //$NON-NLS-1$
+
+	/**
+	 * Default constructor.
+	 */
+	public HyLaunchingPlugin() {
+		super();
+		plugin = this;
+	}
+
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+
+		if (isDebugging()
+				&& (Platform.getDebugOption(DEBUG_PLUGIN)
+						.equalsIgnoreCase("true"))) { //$NON-NLS-1$
+			System.out.println(PI_Harmony_Launching + "--> Plugin started"); //$NON-NLS-1$
+		}
+	}
+
+	public void stop(BundleContext context) throws Exception {
+		if (isDebugging()
+				&& (Platform.getDebugOption(DEBUG_PLUGIN)
+						.equalsIgnoreCase("true"))) { //$NON-NLS-1$
+			System.out.println(PI_Harmony_Launching + "--> Plugin stopping"); //$NON-NLS-1$
+		}
+
+		super.stop(context);
+	}
+
+	public static HyLaunchingPlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Convenience method which returns the unique identifier of this plugin.
+	 */
+	public static String getUniqueIdentifier() {
+		return PI_Harmony_Launching;
+	}
+
+	/**
+	 * Convenience method to write status information to the platform log.
+	 * 
+	 * @param msg
+	 *            information to be written to the platform log.
+	 */
+	public void log(String msg) {
+		log(msg, null);
+	}
+
+	/**
+	 * Convenience method to write problem information to the platform log.
+	 * 
+	 * @param msg
+	 *            additional information about the event
+	 * @param e
+	 *            exception encapsulating any non-fatal problem
+	 */
+	public void log(String msg, Exception e) {
+		getLog().log(
+				new Status(IStatus.INFO, getUniqueIdentifier(), IStatus.OK,
+						msg, e));
+	}
+
+	/**
+	 * Convenience method to write error information to the platform log.
+	 * 
+	 * @param msg
+	 *            additional information about the event
+	 * @param e
+	 *            exception encapsulating the error
+	 */
+	public void logError(String msg, Exception e) {
+		getLog().log(
+				new Status(IStatus.INFO, getUniqueIdentifier(), IStatus.ERROR,
+						msg, e));
+	}
+
+	/**
+	 * Convenience method that returns a boolean indication of whether or not
+	 * the plug-in is running with debug trace on <em>and</em> if the option
+	 * to allow trace messages about the VM installation activities has been
+	 * specified.
+	 * 
+	 * @return <code>true</code> if tracing of VM install activities is
+	 *         enabled, otherwise <code>false</code>.
+	 */
+	public static boolean isDebuggingInstalling() {
+		boolean result = false;
+		if (plugin.isDebugging()) {
+			String option = Platform.getDebugOption(DEBUG_INSTALLING);
+			if ((option != null) && option.equalsIgnoreCase("true")) { //$NON-NLS-1$
+				result = true;
+			}
+		}
+		return result;
+	}
+}



Mime
View raw message