[Title] Removed "Http Proxy" Preference on "TizenSDK->Platform"
authordonghee yang <donghee.yang@samsung.com>
Wed, 7 Nov 2012 03:07:29 +0000 (12:07 +0900)
committerdonghee yang <donghee.yang@samsung.com>
Wed, 7 Nov 2012 03:07:29 +0000 (12:07 +0900)
13 files changed:
org.tizen.nativeplatform/META-INF/MANIFEST.MF
org.tizen.nativeplatform/plugin.xml
org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentPackager.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgmgr/ui/RPMPackageDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/PreferencesManager.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyPreferencePage.java [deleted file]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyUtil.java [deleted file]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ModifyProxyDialog.java [deleted file]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfDialog.java [deleted file]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfUIMessages.properties [deleted file]
org.tizen.nativeplatform/src/org/tizen/nativeplatform/rootstrap/RootstrapManager.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/AddRootstrapDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/views/ui/RootstrapView.java

index 329d6d7..20f5d1b 100644 (file)
@@ -29,6 +29,7 @@ Import-Package: org.eclipse.cdt.debug.core,
  org.eclipse.cdt.launch.internal.ui,
  org.eclipse.cdt.launch.ui,
  org.eclipse.core.expressions,
+ org.eclipse.core.net.proxy,
  org.eclipse.debug.core,
  org.eclipse.debug.core.model,
  org.eclipse.debug.ui,
index d83e29c..3316845 100644 (file)
                </page>
        </extension>
        
-       <extension
-               point="org.eclipse.ui.preferencePages">
-               <page
-                       category="org.tizen.nativeplatform.preferences"
-                       class="org.tizen.nativeplatform.preferences.ui.proxy.HttpProxyPreferencePage"
-                       id="org.tizen.nativeplatform.gitconfig"
-                       name="%org.tizen.nativeplatform.proxyconfig.label">
-               </page>
-       </extension>
        
        <extension
                point="org.eclipse.ui.preferencePages">
       </context>
        </extension>
 <!-- package manager end -->
-</plugin>
\ No newline at end of file
+</plugin>
index 9972a76..8374599 100644 (file)
@@ -33,11 +33,9 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.tizen.nativecommon.build.CommonProjectDependentPackager;
-import org.tizen.nativecommon.build.SmartBuildInterface;
 import org.tizen.nativecommon.build.exception.SBIException;
 import org.tizen.nativeplatform.password.SudoPasswdManager;
 import org.tizen.nativeplatform.preferences.PreferencesManager;
-import org.tizen.nativeplatform.preferences.ui.proxy.HttpProxyUtil;
 import org.tizen.nativeplatform.rootstrap.RootstrapManager;
 import org.tizen.nativeplatform.views.model.ICheckTreeItem;
 import org.tizen.nativeplatform.views.model.PlatformRootstrap;
@@ -97,12 +95,8 @@ public class PlatformProjectDependentPackager extends CommonProjectDependentPack
                String workingDir = getWorkingDir(config);
                
                String passwd = SudoPasswdManager.getSudoPassword();            
-               String httpAddr = PreferencesManager.getHttpProxy();
-               String httpPort = PreferencesManager.getHttpProxyPort();
-               String httpProxy = "";
-               if (!httpAddr.isEmpty()) {
-                       httpProxy = HttpProxyUtil.getHttpProxy(httpAddr, httpPort);
-               } else {
+               String httpProxy = PreferencesManager.getHttpProxy();
+               if (httpProxy.isEmpty()) {
                        httpProxy = "noproxy";
                }
                String name = rootstrap.getName();
index 0644c94..f9d8977 100644 (file)
@@ -69,7 +69,6 @@ import org.tizen.nativeplatform.pkgmgr.model.LocalPkgProvider;
 import org.tizen.nativeplatform.pkgmgr.model.PackageProvider;
 import org.tizen.nativeplatform.pkgmgr.model.RemotePkgProvider;
 import org.tizen.nativeplatform.preferences.PreferencesManager;
-import org.tizen.nativeplatform.preferences.ui.proxy.HttpProxyUtil;
 import org.tizen.nativeplatform.views.model.PlatformRootstrap;
 
 public class RPMPackageDialog extends Dialog { 
@@ -103,10 +102,8 @@ public class RPMPackageDialog extends Dialog {
         x = bounds.x + (bounds.width - width)/2;
         y = bounds.y + (bounds.height - height)/2;
         
-        String addr = PreferencesManager.getHttpProxy();
-        String port = PreferencesManager.getHttpProxyPort();
-        http_proxy = HttpProxyUtil.getHttpProxy(addr, port);
-        RPMPackageCommander.setHttpProxy(http_proxy);
+        http_proxy = PreferencesManager.getHttpProxy();
+        RPMPackageCommander.setHttpProxy(PreferencesManager.getHttpProxy());
         
         this.rootstrap = rootstrap;
        }
@@ -125,9 +122,7 @@ public class RPMPackageDialog extends Dialog {
                        IProject _project = CurrentEnabledProject.getCurrentProject();
                        IConfiguration config = ManagedBuildManager.getBuildInfo( _project ).getDefaultConfiguration();
                        configuration = config.getName();
-               String addr = PreferencesManager.getHttpProxy();
-               String port = PreferencesManager.getHttpProxyPort();
-               http_proxy = HttpProxyUtil.getHttpProxy(addr, port);
+               http_proxy = PreferencesManager.getHttpProxy();
                RPMPackageCommander.setHttpProxy(http_proxy);
                }
                if (enableTarget) {
index dc01814..32845e7 100644 (file)
@@ -12,6 +12,10 @@ import java.util.Arrays;
 
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.util.tracker.ServiceTracker;
 
 
 public class PreferencesManager {
@@ -35,7 +39,7 @@ public class PreferencesManager {
        private static final String GIT_LIST_CACHE_FILE_FORMAT = ".%s.index.html";
        
        private static IPreferenceStore prefStore = org.tizen.nativecommon.Activator.getDefault().getPreferenceStore();
-       
+       private static ServiceTracker<IProxyService,IProxyService> proxyTracker;
        
        public static void setDefaultValues() {
                if ( !prefStore.contains(GIT_CONFIG_NAME) ) {
@@ -47,26 +51,71 @@ public class PreferencesManager {
        }
        
        
-       public static void setHttpProxy(String s) {
-               prefStore.setValue(HTTPPROXY_KEY, s);
-       }
-       
-       public static void setHttpProxyPort(String s) {
-               prefStore.setValue(PROXYPORT_KEY, s);
-       }
-       
        public static void setPassword(String p) {
                prefStore.setValue(PASSWORD_KEY, p);
        }
        
+
        public static String getHttpProxy() {
-               return prefStore.getString(HTTPPROXY_KEY);        
+               IProxyData data = getHttpProxyData();
+               if ( data != null ) {
+                       if ( data.getUserId() != null && data.getPassword() != null ) {
+                               return String.format("http://%s:%s@%s:%d", 
+                                               data.getUserId(), data.getPassword(), data.getHost(), data.getPort());
+                       }
+                       else if ( data.getUserId() != null && data.getPassword() != null ) {
+                               return String.format("http://%s@%s:%d", 
+                                               data.getUserId(), data.getHost(), data.getPort());
+                       } 
+                       else {
+                               return String.format("http://%s:%d", data.getHost(), data.getPort());
+                       }
+               }
+               
+               return "";
        }
        
+       
+       public static String getHttpProxyHost() {
+               IProxyData data = getHttpProxyData();
+               if ( data != null ) {
+                       return data.getHost();
+               }
+               else {
+                       return "";
+               }
+       }
+       
+       
        public static String getHttpProxyPort() {
-               return prefStore.getString(PROXYPORT_KEY);
+               IProxyData data = getHttpProxyData();
+               if ( data != null ) {
+                       return String.format("%d", data.getPort() );
+               }
+               return "";
        }
        
+       
+    private static IProxyData getHttpProxyData() {
+       if ( proxyTracker == null ) {
+               proxyTracker = new ServiceTracker<IProxyService,IProxyService>(FrameworkUtil.getBundle(
+                               PreferencesManager.class).getBundleContext(), IProxyService.class
+                    .getName(), null);
+               proxyTracker.open();
+       }
+       
+       IProxyService service = proxyTracker.getService();
+               if ( service.isProxiesEnabled() ) {
+                       IProxyData data = service.getProxyData(IProxyData.HTTP_PROXY_TYPE);
+                       if ( data != null && data.getHost() != null ) {
+                               return data;
+                       } 
+               }
+               
+               return null;
+    }
+    
+    
        public static String getPassword() {
                return prefStore.getString(PASSWORD_KEY);
        }
diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyPreferencePage.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyPreferencePage.java
deleted file mode 100644 (file)
index 458c5d8..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-package org.tizen.nativeplatform.preferences.ui.proxy;
-
-import java.util.ArrayList;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.tizen.nativeplatform.preferences.PreferencesManager;
-
-
-public class HttpProxyPreferencePage extends PreferencePage implements IWorkbenchPreferencePage{
-
-    private String port;
-    private String proxy;
-    private TableViewer proxyTable;    
-    
-    private final String BUNDLE_NAME = HttpProxyPreferencePage.class.getPackage().getName() + ".ProxyConfUIMessages";//$NON-NLS-1$
-       private ResourceBundle resources = ResourceBundle.getBundle(BUNDLE_NAME);       
-    
-    public HttpProxyPreferencePage() {
-    }
-    
-    @Override
-    public void init(IWorkbench workbench) {
-       updateData(); 
-    }
-
-    @Override
-    public void createControl(Composite parent) {
-        super.createControl(parent);
-        Button defaultButton = getDefaultsButton();
-        if (defaultButton != null) {
-            defaultButton.setVisible(false);
-        }
-        
-        Button applyButton = getApplyButton();
-        
-        if(applyButton != null) {
-            applyButton.setVisible(false);
-        }
-    }
-    
-    @Override
-    protected Control createContents(Composite parent) {
-        initializeDialogUnits(parent);
-        
-        Composite composite = new Composite(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        layout.numColumns = 1;
-        layout.marginWidth = 0;
-        layout.marginHeight = 0;
-        composite.setLayout(layout);
-        composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-        
-        createGitDetailTableComposite(composite);      
-        
-        return parent;
-    }
-    
-     private void createGitDetailTableComposite(Composite parent) {
-       
-       Composite composite = new Composite(parent, SWT.NONE);          
-               GridLayout gridLayout = new GridLayout(1, false);
-        gridLayout.marginHeight = 0;
-        gridLayout.marginWidth = 0;
-        composite.setLayout(gridLayout);
-        composite.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_BEGINNING)); 
-        
-        createDetailTableComposite(composite);
-        createGitButtonComposite(composite);
-    }
-    
-    private void createDetailTableComposite(Composite parent) {
-
-       proxyTable = new TableViewer(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-        Table table = proxyTable.getTable();
-       table.setHeaderVisible(true);
-       table.setLinesVisible(true);            
-               
-       proxyTable.setLabelProvider(new TableViewerProvider());         
-       proxyTable.setContentProvider(new ArrayContentProvider());
-               
-        TableColumn column = new TableColumn(table, SWT.NONE);        
-        column.setResizable(true);
-        column.setText(resources.getString("ConfPref.Column.Type"));
-        column.setWidth(100);        
-        
-        column = new TableColumn(table, SWT.NONE);        
-        column.setResizable(true);
-        column.setText(resources.getString("ConfPref.Column.Value"));
-        column.setWidth(300);
-        
-        GridData tableGridData = new GridData(GridData.FILL_HORIZONTAL);
-        tableGridData.minimumHeight = 300;
-        table.setLayoutData(tableGridData);     
-        
-        setTableData();
-    }
-    
-    private void setTableData() {
-       ArrayList<String> datas = new ArrayList<String>();        
-        datas.add(resources.getString("ConfPref.Text.Addr") + "::" + proxy);
-        datas.add(resources.getString("ConfPref.Text.Port") + "::" + port);
-
-        proxyTable.setInput(datas);
-    }
-    
-    private void updateData() {        
-       proxy = PreferencesManager.getHttpProxy();
-       port = PreferencesManager.getHttpProxyPort();           
-       
-       if (proxy.isEmpty() && port.isEmpty()) {
-               setDefaultProxy();
-       }
-    }    
-    
-    private void createGitButtonComposite(Composite parent) {
-       Composite composite = new Composite(parent, SWT.NONE);          
-               GridLayout gridLayout = new GridLayout(1, false);
-        gridLayout.marginHeight = 0;
-        gridLayout.marginWidth = 0;
-        
-        composite.setLayout(gridLayout);
-        composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_BEGINNING));        
-        
-        Button modifyBt = new Button(composite, SWT.PUSH);
-        modifyBt.setText(resources.getString("ConfPref.Button.Modify"));
-        
-        modifyBt.addMouseListener(new MouseListener(){
-
-                       @Override
-                       public void mouseDoubleClick(MouseEvent e) {
-                       }
-
-                       @Override
-                       public void mouseDown(MouseEvent e) {                           
-                               ModifyProxyDialog dialog = new ModifyProxyDialog(getShell(), proxy, port);
-                               if (dialog.open() == ModifyProxyDialog.OK) {
-                                       updateData();
-                                       setTableData();
-                               }                               
-                       }
-
-                       @Override
-                       public void mouseUp(MouseEvent e) {
-                       }
-        });
-
-    }
-
-    @Override
-    public boolean performOk() {
-        return super.performOk();
-    }
-    
-       private class TableViewerProvider extends LabelProvider implements ITableLabelProvider 
-       {
-               @Override
-               public Image getColumnImage(Object element, int columnIndex) {
-                       return null;
-               }
-
-               @Override
-               public String getColumnText(Object element, int columnIndex) {                  
-                       String[] splitValues = ((String)element).split("::");                   
-                       switch(columnIndex) {
-                       case 0:
-                               return splitValues[0];
-                       case 1:
-                               if (splitValues.length == 2) {
-                                       return splitValues[1];
-                               } else {
-                                       return "";
-                               }
-                       }
-                       return null;
-               }
-       }
-       
-       private void setDefaultProxy() {
-               String[] values = HttpProxyUtil.getProxyEnv();
-               
-               if (values == null) {
-                       return;
-               }
-               
-               if (values.length == 2) {
-                       proxy = values[0];
-                       port = values[1];
-               } else if (values.length == 1) {
-                       proxy = values[0];
-               } 
-               
-               return;
-       }    
-}
diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyUtil.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/HttpProxyUtil.java
deleted file mode 100644 (file)
index b6649ce..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.tizen.nativeplatform.preferences.ui.proxy;
-
-import java.util.Map;
-
-public class HttpProxyUtil {
-       
-       private static final String HTTP_PROXY_KEY = "http_proxy";
-       private static final String[] HTTP_PROTOCOL = {"http://", "https://"};
-       private static final String DELIMITER_PORT = ":";
-
-       public HttpProxyUtil() {
-               
-       }
-       
-       public static String removeHttpProtocol(String s) {
-               return s.replaceAll(HTTP_PROTOCOL[0], "").replaceAll(HTTP_PROTOCOL[1], "");
-       }
-       
-       public static String[] getProxyEnv() {
-               Map<String, String> envMap = System.getenv();
-               String value = envMap.get(HTTP_PROXY_KEY);
-               
-               if (value == null) {
-                       return null;
-               }
-               value = removeHttpProtocol(value);
-               String[] values = value.split(":");
-               
-               if (values.length == 2) { 
-                       // filter a port string on just number
-                       String match = "[^0-9.,]+";
-                       values[1] = values[1].replaceAll(match, "");
-                       return values;
-               } else if (values.length == 1) {
-                       return values;
-               } 
-               
-               return null;
-       }
-       
-       public static String getHttpProxy(String addr, String port) {
-               if (addr.isEmpty()) {
-                       return "";
-               }
-               
-               if (port.isEmpty()) {
-                       return HTTP_PROTOCOL[0] + addr; 
-               } else { 
-                       return HTTP_PROTOCOL[0] + addr + DELIMITER_PORT + port;
-               }
-       }
-}
diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ModifyProxyDialog.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ModifyProxyDialog.java
deleted file mode 100644 (file)
index 7a0793a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.tizen.nativeplatform.preferences.ui.proxy;
-
-import org.eclipse.swt.widgets.Shell;
-
-public class ModifyProxyDialog extends ProxyConfDialog {
-
-       public ModifyProxyDialog(Shell parentShell, String proxy, String port) {
-               super(parentShell, proxy, port);
-       }
-       
-       @Override
-       protected void okPressed() {            
-               super.okPressed();
-       }
-}
diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfDialog.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfDialog.java
deleted file mode 100644 (file)
index 9ef6591..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.tizen.nativeplatform.preferences.ui.proxy;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.tizen.common.util.DialogUtil;
-import org.tizen.nativeplatform.preferences.PreferencesManager;
-
-public class ProxyConfDialog extends Dialog {
-       
-       private Text proxyText;
-       private Text portText;
-       private String port = "";
-       private String proxy = "";
-       
-       private int x = 0;
-       private int y = 0;
-       private final int width = 500;
-       private final int height = 200;
-       
-       private final String BUNDLE_NAME = ProxyConfDialog.class.getPackage().getName() + ".ProxyConfUIMessages";//$NON-NLS-1$
-       private ResourceBundle resources = ResourceBundle.getBundle(BUNDLE_NAME);
-
-       protected ProxyConfDialog(Shell parentShell) {
-               super(parentShell);     
-       }
-       
-       public ProxyConfDialog(Shell parentShell, String proxy, String port) {
-               super(parentShell);
-               
-               this.port = port;
-               this.proxy = proxy;
-
-               Rectangle bounds = parentShell.getBounds();
-        x = bounds.x + (bounds.width - width)/2;
-        y = bounds.y + (bounds.height - height)/2;
-       }
-       
-       @Override
-       protected void configureShell(Shell newShell) {
-               super.configureShell(newShell);         
-               
-               newShell.setText(resources.getString("ConfDlg.Title"));         
-               newShell.setLocation(x, y);
-               newShell.setSize(width, height);
-       }
-       
-       @Override
-       protected Control createDialogArea(Composite parent) {          
-               
-               Composite composite = new Composite( parent, SWT.NONE);
-               composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-               composite.setLayout(new GridLayout(1, false));       
-
-               //createDescComposite(composite);
-        createProxyComposite(composite);       
-        
-               return null;
-       }
-       
-       private void createDescComposite(Composite parent) {
-               
-               Composite comp_descrip = new Composite(parent, SWT.NONE);
-        Color whiteColor = new Color(parent.getDisplay(), 255, 255, 255);
-
-        comp_descrip.setLayout(new GridLayout(1, false));
-        GridData comp_descrip_gd = new GridData(GridData.FILL_HORIZONTAL);
-        comp_descrip_gd.heightHint = height/3;
-        comp_descrip.setLayoutData(comp_descrip_gd);
-        comp_descrip.setBackground(whiteColor);
-        
-               Label descLabel = new Label(comp_descrip, SWT.NONE);
-               descLabel.setText(resources.getString("ConfDlg.Label.Desc"));
-               descLabel.setBackground(whiteColor);
-       }
-       
-       private void createProxyComposite(Composite parent) {
-               Composite composite = new Composite( parent, SWT.NONE);
-               composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-               composite.setLayout(new GridLayout(2, false));
-
-        Label proxyLabel = new Label(composite, SWT.NONE);
-        proxyLabel.setText(resources.getString("ConfDlg.Label.Addr"));
-        proxyText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH);
-        GridData gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
-               gridData.minimumHeight = 0;
-               proxyText.setLayoutData(gridData);
-               proxyText.setText(proxy);
-               
-               Label portLabel = new Label(composite, SWT.NONE);
-               portLabel.setText(resources.getString("ConfDlg.Label.Port"));
-               portText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH);
-        gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL);
-               gridData.minimumHeight = 0;
-               portText.setLayoutData(gridData);
-               portText.setText(port);
-
-       }
-
-       @Override
-       protected void okPressed() {
-               String newPort = HttpProxyUtil.removeHttpProtocol(portText.getText().trim());           
-               String newProxy = HttpProxyUtil.removeHttpProtocol(proxyText.getText().trim());
-               
-               /*
-               if (newProxy.isEmpty()) {
-                       DialogUtil.openMessageDialog(resources.getString("ConfDlg.Info.Input.Addr"));
-                       return;
-               }
-               */
-               
-               // filter a port string on just number
-               String match = "[^0-9.,]+";
-               newPort = newPort.replaceAll(match, "");        
-               
-               if (newProxy != proxy) {
-                       PreferencesManager.setHttpProxy(newProxy);
-               }
-               
-               if (newPort != port) {
-                       PreferencesManager.setHttpProxyPort(newPort);
-               }
-               
-               super.okPressed();
-       }
-}
diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfUIMessages.properties b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/ui/proxy/ProxyConfUIMessages.properties
deleted file mode 100644 (file)
index 8bebc3e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-ConfDlg.Title = Modify HTTP Proxy
-ConfDlg.Label.Port = Port:
-ConfDlg.Label.Addr = HTTP Proxy:
-ConfDlg.Label.Desc = Input http proxy information as below.\n - HTTP Proxy: 172.21.17.105\n - Port: 8080
-
-ConfDlg.Info.Input.Addr = HTTP proxy address should be input for cloning git project
-
-ConfPref.Button.Modify = Modify
-ConfPref.Button.Add = Add
-
-ConfPref.Text.Port = Port
-ConfPref.Text.Addr = HTTP Proxy
-ConfPref.Column.Type = Type
-ConfPref.Column.Value = Value
-
-
-
-FileDlg.Title = File Dialog
-FileDlg.Filter.Ext = txt
\ No newline at end of file
index 620ee02..b69ccf2 100644 (file)
@@ -14,7 +14,6 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.tizen.nativecommon.build.SmartBuildInterface;
 import org.tizen.nativecommon.build.exception.SBIException;
-import org.tizen.nativecommon.build.model.SBIModel;
 import org.tizen.nativeplatform.build.PlatformConfigurationManager;
 import org.tizen.nativeplatform.views.model.ICheckTreeItem;
 import org.tizen.nativeplatform.views.model.PlatformRootstrap;
index ccc7809..0b7a7db 100644 (file)
@@ -255,11 +255,11 @@ public class AddRootstrapDialog extends Dialog {
                proxyText.setEnabled(false);
                portText.setEnabled(false);
                
-               String prefProxy = PreferencesManager.getHttpProxy();
+               String prefProxyHost = PreferencesManager.getHttpProxyHost();
                String prefProxyPort = PreferencesManager.getHttpProxyPort();
                
-               if (!prefProxy.isEmpty()) {
-               proxyText.setText(prefProxy);
+               if (!prefProxyHost.isEmpty()) {
+               proxyText.setText(prefProxyHost);
         }
                
                if (!prefProxyPort.isEmpty()) {
index c1f960c..3b19d23 100644 (file)
@@ -10,8 +10,6 @@ import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
 import org.eclipse.cdt.managedbuilder.core.IManagedProject;
 import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.IMenuListener;
@@ -54,7 +52,6 @@ import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.part.ViewPart;
 import org.tizen.common.TizenHelpContextIds;
 import org.tizen.common.util.DialogUtil;
-import org.tizen.common.util.HostUtil;
 import org.tizen.common.util.ImageUtil;
 
 import org.tizen.nativecommon.ProjectUtil;