Removed unused import
authorkh5325.kim <kh5325.kim@samsung.com>
Fri, 10 May 2013 13:44:41 +0000 (22:44 +0900)
committerkh5325.kim <kh5325.kim@samsung.com>
Fri, 10 May 2013 13:44:41 +0000 (22:44 +0900)
org.tizen.common/src/org/tizen/common/CommonPlugin.java
package/changelog
package/pkginfo.manifest

index 3ffec2b..40c763b 100755 (executable)
@@ -30,11 +30,10 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.tizen.common.core.application.InstallPathConfig;
 import org.tizen.common.core.command.EclipseExecutor;
 import org.tizen.common.core.command.Executor;
@@ -56,7 +55,8 @@ import org.tizen.sdblib.SmartDevelopmentBridge;
  * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
  */
 public class CommonPlugin extends AbstractUIPlugin {
-    private static final Logger logger = LoggerFactory.getLogger(CommonPlugin.class);
+    // logger can not be initialized because logger requires preference store of CommonPlugin
+    //private static final Logger logger = LoggerFactory.getLogger(CommonPlugin.class);
 
     // The plug-in ID
     public static final String PLUGIN_ID = "org.tizen.common"; //$NON-NLS-1$
@@ -90,22 +90,21 @@ public class CommonPlugin extends AbstractUIPlugin {
 
         String sdbPath = InstallPathConfig.getSDBPath();
         if (!HostUtil.exists(sdbPath)) {
-            DialogUtil.openMessageDialog("There is no " + sdbPath + ".");
+            DialogUtil.openMessageDialog(String.format("There is no %s.", sdbPath));
         }
         else {
             try {
                 SmartDevelopmentBridge.init();
                 SmartDevelopmentBridge.createBridge(sdbPath, true);
             } catch (Throwable t) {
-                logger.error("Problem occurred while initializing sdb", t.getMessage(), t);
+                plugin.getLog().log(new Status(Status.ERROR, PLUGIN_ID, "Problem occurred while initializing sdb", t));
                 DialogUtil.openErrorDialog("Failed to start sdb");
             }
         }
 
         if (OSChecker.isWindows()) {
             String dllPath = InstallPathConfig.getSdbWinUsbApiPath();
-            if (!HostUtil.exists(dllPath))
-            {
+            if (!HostUtil.exists(dllPath)) {
                 DialogUtil.openMessageDialog("There is no " + dllPath + ".\n" +
                         "It's not mandatory but you may have problem in using sdb through USB.");
             }
@@ -124,9 +123,7 @@ public class CommonPlugin extends AbstractUIPlugin {
         super.stop(context);
     }
     
-
-    public static void setDefault( CommonPlugin plugin )
-    {
+    public static void setDefault( CommonPlugin plugin ) {
         CommonPlugin.plugin = plugin;
     }
 
@@ -144,8 +141,7 @@ public class CommonPlugin extends AbstractUIPlugin {
      */
     @Override
     protected void initializeDefaultPreferences( final IPreferenceStore store ) {
-        if (InstallPathConfig.getSDKPath() != null)
-        {
+        if (InstallPathConfig.getSDKPath() != null) {
             store.setDefault(TizenBasePreferencePage.KEY_SDKLOCATION, InstallPathConfig.getSDKPath());
         }
         store.setDefault(TizenBasePreferencePage.KEY_SDKUPDATE, TizenBasePreferencePage.VALUE_SDKUPDATE_DEFAULT);
@@ -155,44 +151,37 @@ public class CommonPlugin extends AbstractUIPlugin {
     }
 
     /**
-     * Set {@link Executor} in eclipse plugin environment
+     * Sets {@link Executor} in eclipse plugin environment
      * 
      * @param executor {@link Executor}
      */
-    public void setExecutor( final Executor executor )
-    {
+    public void setExecutor( final Executor executor ) {
         this.executor = executor;
     }
     
     /**
-     * Return {@link Executor} in eclipse plugin environment
+     * Returns {@link Executor} in eclipse plugin environment
      * @return
      */
-    public Executor getExecutor()
-    {
+    public Executor getExecutor() {
         return this.executor;
     }
     
     /**
-     * Return {@link Prompter} in eclipse plugin environment
+     * Returns {@link Prompter} in eclipse plugin environment
      * 
      * @return {@link Prompter}
      */
-    public Prompter getPrompter()
-    {
+    public Prompter getPrompter() {
         return this.prompter;
     }
 
-    protected void initializeExecutor()
-    {
+    protected void initializeExecutor() {
         this.prompter = new EclipsePrompter( new SWTPrompter() );
-        
         this.executor = new EclipseExecutor( prompter );
     }
 
-    protected void finalizeExecutor()
-    {
-        
+    protected void finalizeExecutor() {
     }
 
     private void addCSCreateListener() {
@@ -203,7 +192,7 @@ public class CommonPlugin extends AbstractUIPlugin {
         IExtensionRegistry x = RegistryFactory.getRegistry();
         IConfigurationElement[] ces = x.getConfigurationElementsFor(EXT_ID);
 
-        for ( IConfigurationElement ce : ces ) {
+        for (IConfigurationElement ce : ces) {
             if (ATTR_SCOPE.equals(ce.getName())) {
                 String className = ce.getAttribute(ATTR_CLASS);
                 if (className != null) {
@@ -213,7 +202,7 @@ public class CommonPlugin extends AbstractUIPlugin {
                             CrashReportService.addCrashReportServiceListener((ICrashReportServiceListener)obj);
                         }
                     } catch (CoreException e) {
-                        logger.warn("Error occurred while adding CrashReportServiceListener", e);
+                        plugin.getLog().log(new Status(Status.WARNING, PLUGIN_ID, "Problem occurred while adding CrashReportServiceListener", e));
                     }
                 }
             }
index ff792b6..16c2351 100644 (file)
@@ -1,3 +1,6 @@
+* 2.1.25
+- Removed unused import
+== kh5325.kim <kh5325.kim@samsung.com> 2013-05-10
 * 2.1.24
 - updated tizen web ui fw to 0.2.29
 == jihoon80.song <jihoon80.song@samsung.com> 2013-05-10 18:57
index 797a869..8cbf3c9 100644 (file)
@@ -1,4 +1,4 @@
-Version:2.1.24
+Version:2.1.25
 Source:common-eplugin
 Maintainer:kangho kim <kh5325.kim@samsung.com>, yoonki park <yoonki.park@samsung.com>, hyunsik non <hyunsik.noh@samsung.com>, taeyoung son <taeyoung2.son@samsung.com>, gune Kim <gune.kim@samsung.com>, ho namkoong <ho.namkoong@samsung.com>, hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>, shingil kang <shingil.kang@samsung.com>