Mercurial > projects > dwt-addons
diff dwtx/core/runtime/Platform.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 7926b636c282 |
children |
line wrap: on
line diff
--- a/dwtx/core/runtime/Platform.d Wed Aug 27 14:49:30 2008 +0200 +++ b/dwtx/core/runtime/Platform.d Mon Sep 08 00:51:37 2008 +0200 @@ -14,6 +14,8 @@ import dwt.dwthelper.utils; +import dwtx.core.runtime.IPath; +import dwtx.core.runtime.ILog; // import java.io.IOException; // import java.lang.reflect.Method; // import java.net.URL; @@ -22,7 +24,7 @@ // import java.util.MissingResourceException; // import java.util.ResourceBundle; // -// import org.osgi.framework.Bundle; +import dwtx.org.osgi.framework.Bundle; // import org.osgi.service.packageadmin.PackageAdmin; // // import dwtx.core.internal.runtime.CompatibilityHelper; @@ -716,29 +718,31 @@ // public static IPath getLocation() throws IllegalStateException { // return InternalPlatform.getDefault().getLocation(); // } -// -// /** -// * Returns the location of the platform log file. This file may contain information -// * about errors that have previously occurred during this invocation of the Platform. -// * <p> -// * It is recommended not to keep this value, as the log location may vary when an instance -// * location is being set.</p> -// * <p> -// * Note: it is very important that users of this method do not leave the log -// * file open for extended periods of time. Doing so may prevent others -// * from writing to the log file, which could result in important error messages -// * being lost. It is strongly recommended that clients wanting to read the -// * log file for extended periods should copy the log file contents elsewhere, -// * and immediately close the original file.</p> -// * @return the path of the log file on disk. -// * -// * XXX consider making an ILogger interface that listeners can implements and it allows -// * us to implement Platform.getLogLocation() -// */ -// public static IPath getLogFileLocation() { -// return InternalPlatform.getDefault().getMetaArea().getLogLocation(); -// } -// + + /** + * Returns the location of the platform log file. This file may contain information + * about errors that have previously occurred during this invocation of the Platform. + * <p> + * It is recommended not to keep this value, as the log location may vary when an instance + * location is being set.</p> + * <p> + * Note: it is very important that users of this method do not leave the log + * file open for extended periods of time. Doing so may prevent others + * from writing to the log file, which could result in important error messages + * being lost. It is strongly recommended that clients wanting to read the + * log file for extended periods should copy the log file contents elsewhere, + * and immediately close the original file.</p> + * @return the path of the log file on disk. + * + * XXX consider making an ILogger interface that listeners can implements and it allows + * us to implement Platform.getLogLocation() + */ + public static IPath getLogFileLocation() { + implMissing(__FILE__,__LINE__); + return null; + //return InternalPlatform.getDefault().getMetaArea().getLogLocation(); + } + // /** // * Returns the plug-in runtime object for the identified plug-in // * or <code>null</code> if no such plug-in can be found. If @@ -1027,22 +1031,24 @@ // public static long getStateStamp() { // return InternalPlatform.getDefault().getStateTimeStamp(); // } -// -// /** -// * Returns the log for the given bundle. If no such log exists, one is created. -// * -// * @param bundle the bundle whose log is returned -// * @return the log for the given bundle -// * @since 3.0 -// * XXX change this into a LogMgr service that would keep track of the map. See if it can be a service factory. -// * It would contain all the methods that are here. -// * Relate to RuntimeLog if appropriate. -// * The system log listener needs to be optional: turned on or off. What about a system property? :-) -// */ -// public static ILog getLog(Bundle bundle) { -// return InternalPlatform.getDefault().getLog(bundle); -// } -// + + /** + * Returns the log for the given bundle. If no such log exists, one is created. + * + * @param bundle the bundle whose log is returned + * @return the log for the given bundle + * @since 3.0 + * XXX change this into a LogMgr service that would keep track of the map. See if it can be a service factory. + * It would contain all the methods that are here. + * Relate to RuntimeLog if appropriate. + * The system log listener needs to be optional: turned on or off. What about a system property? :-) + */ + public static ILog getLog(Bundle bundle) { + implMissing(__FILE__,__LINE__); + return null; + //return InternalPlatform.getDefault().getLog(bundle); + } + // /** // * Returns the given bundle's resource bundle for the current locale. // * <p> @@ -1395,26 +1401,28 @@ // return InternalPlatform.getDefault().getFragments(bundle); // } // -// /** -// * Returns the resolved bundle with the specified symbolic name that has the -// * highest version. If no resolved bundles are installed that have the -// * specified symbolic name then null is returned. -// * <p> -// * Clients are also able to acquire the {@link PackageAdmin} service and query -// * it for the bundle with the specified symbolic name. Clients can ask the -// * service for all bundles with that particular name and then determine the -// * one with the highest version. Note that clients may want to filter -// * the results based on the state of the bundles. -// * </p> -// * @param symbolicName the symbolic name of the bundle to be returned. -// * @return the bundle that has the specified symbolic name with the -// * highest version, or <tt>null</tt> if no bundle is found. -// * @since 3.0 -// */ -// public static Bundle getBundle(String symbolicName) { -// return InternalPlatform.getDefault().getBundle(symbolicName); -// } -// + /** + * Returns the resolved bundle with the specified symbolic name that has the + * highest version. If no resolved bundles are installed that have the + * specified symbolic name then null is returned. + * <p> + * Clients are also able to acquire the {@link PackageAdmin} service and query + * it for the bundle with the specified symbolic name. Clients can ask the + * service for all bundles with that particular name and then determine the + * one with the highest version. Note that clients may want to filter + * the results based on the state of the bundles. + * </p> + * @param symbolicName the symbolic name of the bundle to be returned. + * @return the bundle that has the specified symbolic name with the + * highest version, or <tt>null</tt> if no bundle is found. + * @since 3.0 + */ + public static Bundle getBundle(String symbolicName) { + implMissing(__FILE__, __LINE__ ); + return null; + //return InternalPlatform.getDefault().getBundle(symbolicName); + } + // /** // * Returns all bundles with the specified symbolic name. If no resolved bundles // * with the specified symbolic name can be found, <tt>null</tt> is returned.