Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > 9f15bb7c04d3e396bc56768dd91ed658 > files > 5

eclipse-pydev-2.2.4-1.fc16.src.rpm

--- plugins/org.python.pydev/src/org/python/pydev/ui/pythonpathconf/PythonInterpreterEditor.java.sav	2011-06-24 19:51:34.000000000 +0300
+++ plugins/org.python.pydev/src/org/python/pydev/ui/pythonpathconf/PythonInterpreterEditor.java	2011-07-12 08:55:05.970513746 +0300
@@ -26,9 +26,6 @@ import org.python.pydev.editor.actions.P
 import org.python.pydev.plugin.PydevPlugin;
 import org.python.pydev.ui.UIConstants;
 
-import at.jta.Key;
-import at.jta.Regor;
-
 public class PythonInterpreterEditor extends AbstractInterpreterEditor{
 
     public PythonInterpreterEditor(String labelText, Composite parent, IInterpreterManager interpreterManager) {
@@ -55,72 +52,7 @@ public class PythonInterpreterEditor ext
                 return ret;
             }
         }else{
-            //On windows we can try to see the installed versions...
-            List<File> foundVersions = new ArrayList<File>();
-            try {
-                Regor regor = new Regor();
-
-                //The structure for Python is something as Software\\Python\\PythonCore\\2.6\\InstallPath
-                for (Key root : new Key[] { Regor.HKEY_LOCAL_MACHINE, Regor.HKEY_CURRENT_USER }) {
-                    Key key = regor.openKey(root, "Software\\Python\\PythonCore");
-                    if (key != null) {
-                        try {
-                            List l = regor.listKeys(key);
-                            for (Object o : l) {
-                                Key openKey = regor.openKey(key, (String) o + "\\InstallPath");
-                                if (openKey != null) {
-                                    try {
-                                        byte buf[] = regor.readValue(openKey, "");
-                                        if (buf != null) {
-                                            String parseValue = Regor.parseValue(buf);
-                                            //Ok, this should be the directory where it's installed, try to find a 'python.exe' there...
-                                            File file = new File(parseValue, "python.exe");
-                                            if(file.isFile()){
-                                                foundVersions.add(file);
-                                            }
-                                        }
-                                    } finally {
-                                        regor.closeKey(openKey);
-                                    }
-                                }
-                            }
-                        } finally {
-                            regor.closeKey(key);
-                        }
-                    }
-                }
-
-            } catch (Throwable e) {
-                Log.log(e);
-            }
-            if(foundVersions.size() == 1){
-                return new Tuple<String, String>(getUniqueInterpreterName("python"), foundVersions.get(0).toString());
-            }
-            if(foundVersions.size() > 1){
-                //The user should select which one to use...
-                ListDialog listDialog = new ListDialog(PyAction.getShell());
-                
-                listDialog.setContentProvider(new ArrayContentProvider());
-                listDialog.setLabelProvider(new LabelProvider(){
-                    @Override
-                    public Image getImage(Object element) {
-                        return PydevPlugin.getImageCache().get(UIConstants.PY_INTERPRETER_ICON);
-                    }
-                });
-                listDialog.setInput(foundVersions.toArray());
-                listDialog.setMessage("Multiple interpreters were found installed.\nPlease select which one you want to configure.");
-
-                int open = listDialog.open();
-                if(open != ListDialog.OK){
-                    throw cancelException;
-                }
-                Object[] result = listDialog.getResult();
-                if(result == null || result.length == 0){
-                    throw cancelException;
-                }
-                return new Tuple<String, String>(getUniqueInterpreterName("python"), result[0].toString());
-                
-            }
+           
         }