[Title] Remove HostUtil class eclipse dependency. Added SmartDevelopmentBridge class...
authorgyeongseok.seo <gyeongseok.seo@samsung.com>
Mon, 16 Jul 2012 04:59:21 +0000 (13:59 +0900)
committergyeongseok.seo <gyeongseok.seo@samsung.com>
Mon, 16 Jul 2012 04:59:21 +0000 (13:59 +0900)
[Type] Enhancement
[Module] common-eplugin
[Priority] Minor
[Jira#]
[Redmine#] 5363
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I703991639990aa48e4741e1d0517143656a47935

org.tizen.common/src/org/tizen/common/core/command/sdb/SmartDevelopmentBridgeManager.java
org.tizen.common/src/org/tizen/common/util/HostUtil.java

index b4123f9..66a5bb9 100644 (file)
@@ -1,8 +1,44 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* 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.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
 package org.tizen.common.core.command.sdb;
 
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 
+/**
+ * <p>
+ * SmartDevelopmentBridgeManager.
+ * 
+ * class for delegate SmartDevelopmentBridge.
+ * 
+ * </p>
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
 public class SmartDevelopmentBridgeManager
 {
     private SmartDevelopmentBridge impl = SmartDevelopmentBridge.getBridge();
@@ -46,4 +82,12 @@ public class SmartDevelopmentBridgeManager
     public String toString() {
         return impl.toString();
     }
+
+    public void disconnectBridge() {
+        impl.disconnectBridge();
+    }
+
+    public void terminate() {
+        impl.terminate();
+    }
 }
index 4288c34..1cf2781 100644 (file)
@@ -38,8 +38,6 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.nio.channels.FileChannel;
 
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
 import org.tizen.common.ui.view.console.ConsoleManager;
 
 public abstract class HostUtil{
@@ -73,20 +71,19 @@ public abstract class HostUtil{
         
         return contents.toString().trim();
     }
-    
+
     public static boolean exists(String path) {
-        if(path==null||path.equals("")) //$NON-NLS-1$
+        if( path == null || path.equals("") ) //$NON-NLS-1$
             return false;
-        
-        IPath ipath = new Path(path);
-        File file = ipath.toFile();
-            
-        if(file!=null&&file.exists())
+
+        File file = new File( path );
+
+        if( file != null && file.exists() )
             return true;
         else
             return false;
     }
-    
+
     public static boolean execute(String command){
         
         if(command == null) {