[Pydev-cvs] org.python.pydev.debug/src/org/python/pydev/debug/codecoverage RunManyDialog.java,1.2,1.
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-10-20 16:52:34
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16970/src/org/python/pydev/debug/codecoverage Modified Files: RunManyDialog.java Log Message: Index: RunManyDialog.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/RunManyDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RunManyDialog.java 18 Oct 2004 19:13:12 -0000 1.2 --- RunManyDialog.java 20 Oct 2004 16:52:16 -0000 1.3 *************** *** 6,10 **** --- 6,14 ---- package org.python.pydev.debug.codecoverage; + import java.io.File; + + import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.dialogs.Dialog; + import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; *************** *** 18,21 **** --- 22,26 ---- import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Widget; + import org.python.pydev.debug.core.PydevDebugPlugin; import org.python.pydev.plugin.PydevPrefs; *************** *** 184,188 **** layoutData.verticalAlignment = GridData.FILL; labelScript0 = new Label(composite, 0); ! labelScript0.setText("Script location (absolute)"); labelScript0.setLayoutData(layoutData); --- 189,193 ---- layoutData.verticalAlignment = GridData.FILL; labelScript0 = new Label(composite, 0); ! labelScript0.setText("Script location (absolute) - default script executes only files that match test_*.py"); labelScript0.setLayoutData(layoutData); *************** *** 193,197 **** layoutData.verticalAlignment = GridData.FILL; textScriptLocation = new Text(composite, SWT.SINGLE); ! textScriptLocation.setText("X:\\coilib30\\tools\\runtests.py"); textScriptLocation.setLayoutData(layoutData); --- 198,212 ---- layoutData.verticalAlignment = GridData.FILL; textScriptLocation = new Text(composite, SWT.SINGLE); ! try { ! String defaultV = PydevPrefs.getPreferences().getString(PydevPrefs.RUN_MANY_SCRIPT_LOCATION); ! if(defaultV.length() < 1){ ! File file = PydevDebugPlugin.getScriptWithinPySrc("runfiles.py"); ! defaultV = file.getAbsolutePath(); ! PydevPrefs.getPreferences().setValue(PydevPrefs.RUN_MANY_SCRIPT_LOCATION, defaultV); ! } ! textScriptLocation.setText(defaultV); ! } catch (CoreException e) { ! textScriptLocation.setText("Add script that receives dir."); ! } textScriptLocation.setLayoutData(layoutData); *************** *** 235,240 **** scriptLocation = textScriptLocation.getText(); scriptSelected = check.getSelection(); ! // TODO Auto-generated method stub ! super.okPressed(); } --- 250,264 ---- scriptLocation = textScriptLocation.getText(); scriptSelected = check.getSelection(); ! ! if(scriptSelected){ ! if (scriptLocation.length() > 0){ ! PydevPrefs.getPreferences().setValue(PydevPrefs.RUN_MANY_SCRIPT_LOCATION, scriptLocation); ! super.okPressed(); ! }else{ ! MessageDialog.openInformation(this.getShell(), "ERROR: Script not selected", "A script must be specified."); ! } ! }else{ ! super.okPressed(); ! } } |