testdev/ite/src/com.nokia.testfw.resultview/src/com/nokia/testfw/resultview/ResultViewPlugin.java
author Johnson Ma <johnson.ma@nokia.com>
Tue, 30 Mar 2010 14:39:29 +0800
changeset 1 96906a986c3b
permissions -rw-r--r--
contribute ITE to symbian foundation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     1
/*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     8
*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    11
*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    12
* Contributors:
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    13
*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    14
* Description: 
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    15
*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    16
*/
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    17
package com.nokia.testfw.resultview;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    18
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    19
import java.net.MalformedURLException;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    20
import java.net.URL;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    21
import java.util.Hashtable;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    22
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    23
import org.eclipse.core.runtime.IStatus;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    24
import org.eclipse.core.runtime.Status;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    25
import org.eclipse.jface.resource.ImageDescriptor;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    26
import org.eclipse.swt.graphics.Image;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    27
import org.eclipse.ui.plugin.AbstractUIPlugin;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    28
import org.osgi.framework.Bundle;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    29
import org.osgi.framework.BundleContext;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    30
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    31
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    32
/**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    33
 * The activator class controls the plug-in life cycle
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    34
 */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    35
public class ResultViewPlugin extends AbstractUIPlugin {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    36
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    37
	// The plug-in ID
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    38
	public static final String PLUGIN_ID = "com.nokia.testfw.resultview";
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    39
	
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    40
	private static final String IMAGE_PATH = "icons/full/";
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    41
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    42
	// The shared instance
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    43
	private static ResultViewPlugin plugin;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    44
	
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    45
	private static Hashtable<String, Image> images;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    46
	
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    47
	/**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    48
	 * The constructor
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    49
	 */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    50
	public ResultViewPlugin() {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    51
		images = new Hashtable<String, Image>();
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    52
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    53
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    54
	/*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    55
	 * (non-Javadoc)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    56
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    57
	 */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    58
	public void start(BundleContext context) throws Exception {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    59
		super.start(context);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    60
		plugin = this;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    61
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    62
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    63
	/*
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    64
	 * (non-Javadoc)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    65
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    66
	 */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    67
	public void stop(BundleContext context) throws Exception {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    68
		plugin = null;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    69
		super.stop(context);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    70
		//dispose image
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    71
		for (Image image : images.values()) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    72
			if (!image.isDisposed()) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    73
				image.dispose();
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    74
			}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    75
		}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    76
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    77
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    78
	/**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    79
	 * Returns the shared instance
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    80
	 *
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    81
	 * @return the shared instance
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    82
	 */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    83
	public static ResultViewPlugin getDefault() {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    84
		return plugin;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    85
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    86
	
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    87
	/**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    88
     * retrieve an image based on its name (from the plug-in standard image folder)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    89
     * @param imageName
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    90
     * @return <code>ImageDescriptor</code> of the image if found or the standard missing image descvritor
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    91
     */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    92
    public static ImageDescriptor getImageDescriptor(String imageName) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    93
        return getImageDescriptor(ResultViewPlugin.getDefault().getBundle(), imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    94
    }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    95
    
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    96
    public static Image getImage(String imageName) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    97
    	Image image = images.get(imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    98
		if (image == null) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
    99
			ImageDescriptor desc = getImageDescriptor(imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   100
			image = desc.createImage();
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   101
			images.put(imageName, image);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   102
		}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   103
		return image;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   104
    }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   105
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   106
    /**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   107
     * retrieve an image based on its name (from the plug-in standard image folder)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   108
     * @param imageName
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   109
     * @return <code>ImageDescriptor</code> of the image if found or the standard missing image descriptor
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   110
     */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   111
    public static final ImageDescriptor getImageDescriptor(Bundle bundle,
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   112
        String imageName) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   113
        URL url = getImageUrl(bundle, imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   114
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   115
        return (url != null) ? ImageDescriptor.createFromURL(url)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   116
                             : ImageDescriptor.getMissingImageDescriptor();
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   117
    }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   118
 
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   119
    
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   120
    /**
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   121
     * retrieve the URL of an image file based on its name (from the plug-in standard image folder)
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   122
     * @param imageName
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   123
     * @return <code>URL</code> of the image if found or null if not found
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   124
     */
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   125
//    private static URL getImageUrl(String imageName) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   126
//        return getImageUrl(ResultViewPlugin.getDefault().getBundle(), imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   127
//    }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   128
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   129
    public static final URL getImageUrl(Bundle bundle, String imageName) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   130
        if (bundle == null) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   131
            bundle = ResultViewPlugin.getDefault().getBundle();
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   132
        }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   133
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   134
        try {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   135
            URL baseURL = bundle.getEntry("/");
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   136
            return new URL(baseURL, IMAGE_PATH + imageName);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   137
        } catch (MalformedURLException e) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   138
            //            LOG.warn("image URL invalid (image probably missing)", e);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   139
            return null;
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   140
        }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   141
    }
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   142
    
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   143
    public static void log(Throwable e) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   144
		log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error", e)); //$NON-NLS-1$
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   145
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   146
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   147
	public static void log(IStatus status) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   148
		getDefault().getLog().log(status);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   149
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   150
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   151
	public static void log(int status, String msg) {
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   152
		Status s = new Status(status, PLUGIN_ID, status, msg, null);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   153
		log(s);
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   154
	}
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   155
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   156
96906a986c3b contribute ITE to symbian foundation
Johnson Ma <johnson.ma@nokia.com>
parents:
diff changeset
   157
}