[Pydev-cvs] org.python.pydev.debug/src/org/python/pydev/debug/ui/blocks MainModuleBlock.java, 1.3,
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-08-17 00:26:47
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/blocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7013/src/org/python/pydev/debug/ui/blocks Modified Files: MainModuleBlock.java Log Message: <li><strong>Pydev debugger</strong>Workaround for python bug when filenames don't have absolute paths correctly generated</li> <li><strong>Pydev code-completion</strong>Wild import will only show tokens defined in __all__ (if it's available)</li> <li><strong>Interactive console</strong>: Fixed problem when more attempts to connect were needed</li> <li><strong>Interactive console</strong>Fixed console integration problem with other plugins because of interfaces not properly implemented</li> <li><strong>Code Formatter</strong>: Exponentials handled correctly</li> <li><strong>Launching</strong>: Unit-test and code-coverage may launch multiple folders/files at once</li> <li><strong>Code coverage</strong>: Number format exception no longer given when trying to show lines not executed in the editor and all lines are executed</li> Index: MainModuleBlock.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/blocks/MainModuleBlock.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MainModuleBlock.java 12 Apr 2008 19:51:13 -0000 1.3 --- MainModuleBlock.java 17 Aug 2008 00:26:56 -0000 1.4 *************** *** 30,33 **** --- 30,34 ---- import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Widget; + import org.python.pydev.core.docutils.StringUtils; import org.python.pydev.debug.core.Constants; import org.python.pydev.plugin.nature.PythonNature; *************** *** 245,258 **** String location = fMainModuleText.getText(); try { ! String expandedLocation = stringVariableManager.performStringSubstitution(location); ! File file = new File(expandedLocation); ! if(!file.exists()){ ! setErrorMessage("The file in the location does not exist."); ! result = false; ! } ! else if(!file.isFile()) { ! setErrorMessage("The file in the location is not actually a file."); ! result = false; } } catch (CoreException e) { setErrorMessage("Unable to resolve location"); --- 246,279 ---- String location = fMainModuleText.getText(); try { ! ! String identifier = launchConfig.getType().getIdentifier(); ! if(identifier.equals(Constants.ID_PYTHON_UNITTEST_LAUNCH_CONFIGURATION_TYPE) || ! identifier.equals(Constants.ID_JYTHON_UNITTEST_LAUNCH_CONFIGURATION_TYPE) || ! identifier.equals(Constants.ID_PYTHON_COVERAGE_LAUNCH_CONFIGURATION_TYPE)){ ! ! //may have multiple files selected for the run for unitest and code-coverage ! for(String loc:StringUtils.split(location, '|')){ ! String expandedLocation = stringVariableManager.performStringSubstitution(loc); ! File file = new File(expandedLocation); ! if(!file.exists()){ ! setErrorMessage(StringUtils.format("The file \"%s\" does not exist.", file)); ! result = false; ! break; ! } ! ! } ! }else{ ! String expandedLocation = stringVariableManager.performStringSubstitution(location); ! File file = new File(expandedLocation); ! if(!file.exists()){ ! setErrorMessage(StringUtils.format("The file \"%s\" does not exist.", file)); ! result = false; ! ! }else if(!file.isFile()) { ! setErrorMessage(StringUtils.format("The file \"%s\" does not actually map to a file.", file)); ! result = false; ! } } + } catch (CoreException e) { setErrorMessage("Unable to resolve location"); |