diff -r bb339882c6e9 -r 0367d2db2c06 sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java --- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java Tue Aug 24 12:10:03 2010 +0300 +++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java Tue Aug 24 12:16:27 2010 +0300 @@ -38,11 +38,12 @@ /** * The activator class controls the plug-in life cycle - * @author kihe + * + * @author kihe */ public class Activator extends AbstractUIPlugin { - /** The plug-in ID. */ + /** The plug-in ID. */ public static final String PLUGIN_ID = Constants.PLUGINID; /** The shared instance. */ @@ -63,8 +64,10 @@ /* * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) */ @Override public final void start(final BundleContext context) { @@ -74,13 +77,14 @@ } catch (Exception e) { e.printStackTrace(); } - } /* * (non-Javadoc) - * - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) */ @Override public final void stop(final BundleContext context) { @@ -90,12 +94,11 @@ } catch (Exception e) { e.printStackTrace(); } - } /** * Returns the shared instance. - * + * * @return the shared instance */ public static Activator getDefault() { @@ -103,9 +106,9 @@ } /** - * Returns an image descriptor for the image file at the given - * plug-in relative path. - * + * Returns an image descriptor for the image file at the given plug-in + * relative path. + * * @param path * the path * @return the image descriptor @@ -116,7 +119,7 @@ /** * Returns AnalyzeTool used preference store. - * + * * @return Preference store */ public static IPreferenceStore getPreferences() { @@ -125,13 +128,12 @@ if (preferenceStore == null) { preferenceStore = getDefault().getPreferenceStore(); } - return preferenceStore; } /** * Add action listener class. - * + * * @param listener * Action listener */ @@ -141,7 +143,7 @@ /** * Gets action listener. - * + * * @return ActionListener Action listener */ public static IActionListener getActionListener() { @@ -150,16 +152,18 @@ /** * Returns a File corresponding to the given bundle relative path. - * @param path the bundle relative path to resource to locate + * + * @param path + * the bundle relative path to resource to locate * @return the File corresponding to the given bundle relative path, or null * @throws IOException */ public File locateFileInBundle(final String path) throws IOException { - Bundle myBundle= getDefault().getBundle(); - IPath ppath= new Path(path); - ppath= ppath.makeRelative(); - URL[] urls= FileLocator.findEntries(myBundle, ppath); - if(urls.length != 1) { + Bundle myBundle = getDefault().getBundle(); + IPath ppath = new Path(path); + ppath = ppath.makeRelative(); + URL[] urls = FileLocator.findEntries(myBundle, ppath); + if (urls.length != 1) { return null; } return new File(FileLocator.toFileURL(urls[0]).getFile()); @@ -167,46 +171,53 @@ /** * Logs information to the eclipse .log file - * @param severity Message severity - * @param code Message code - * @param message Message content + * + * @param severity + * Message severity + * @param code + * Message code + * @param message + * Message content */ public void logInfo(int severity, int code, String message) { - IStatus status = new Status(severity, PLUGIN_ID, code, message, (Throwable) null); + IStatus status = new Status(severity, PLUGIN_ID, code, message, + (Throwable) null); getDefault().getLog().log(status); } + /** * Logs the given message with the given severity and the given exception to * this plug-in's log. + * * @param aSeverity * the severity; one of the IStatus severity * constants: OK, ERROR, INFO, WARNING, or CANCEL * @param aMessage - * a human-readable message, localised to the current locale + * a human-readable message, localized to the current locale * @param aException * a low-level exception, or null if not applicable */ public void log(final int aSeverity, final String aMessage, - final Exception aException) - { - getLog().log(new Status(aSeverity, PLUGIN_ID, IStatus.OK, aMessage, aException)); + final Exception aException) { + getLog().log( + new Status(aSeverity, PLUGIN_ID, IStatus.OK, aMessage, + aException)); } - + /** * Creates and returns an Image for the file at the given plug-in relative * path. The Image is cached in the #ImageRegistry. - * @param aPath the plug-in relative path to the image file + * + * @param aPath + * the plug-in relative path to the image file * @return the requested Image */ - public Image getImage(final String aPath) - { + public Image getImage(final String aPath) { Image cachedImage = getImageRegistry().get(aPath); - if (null == cachedImage) - { + if (null == cachedImage) { cachedImage = getImageDescriptor(aPath).createImage(); getImageRegistry().put(aPath, cachedImage); } return cachedImage; } - }