pydev-cvs Mailing List for PyDev for Eclipse (Page 297)
Brought to you by:
fabioz
You can subscribe to this list here.
2004 |
Jan
|
Feb
(4) |
Mar
(48) |
Apr
(56) |
May
(64) |
Jun
(27) |
Jul
(66) |
Aug
(81) |
Sep
(148) |
Oct
(194) |
Nov
(78) |
Dec
(46) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(125) |
Feb
(126) |
Mar
(163) |
Apr
(133) |
May
(115) |
Jun
(307) |
Jul
(387) |
Aug
(417) |
Sep
(283) |
Oct
(148) |
Nov
(45) |
Dec
(53) |
2006 |
Jan
(240) |
Feb
(200) |
Mar
(267) |
Apr
(231) |
May
(245) |
Jun
(361) |
Jul
(142) |
Aug
(12) |
Sep
(210) |
Oct
(99) |
Nov
(7) |
Dec
(30) |
2007 |
Jan
(161) |
Feb
(511) |
Mar
(265) |
Apr
(74) |
May
(147) |
Jun
(151) |
Jul
(94) |
Aug
(68) |
Sep
(98) |
Oct
(144) |
Nov
(26) |
Dec
(36) |
2008 |
Jan
(98) |
Feb
(107) |
Mar
(199) |
Apr
(113) |
May
(119) |
Jun
(112) |
Jul
(92) |
Aug
(71) |
Sep
(101) |
Oct
(16) |
Nov
|
Dec
|
From: Fabio Z. <fa...@us...> - 2004-10-18 19:14:29
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5407 Modified Files: plugin.xml Log Message: Index: plugin.xml =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/plugin.xml,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** plugin.xml 8 Oct 2004 16:36:21 -0000 1.47 --- plugin.xml 18 Oct 2004 19:14:20 -0000 1.48 *************** *** 4,8 **** id="org.python.pydev" name="Pydev - Python Development Environment" ! version="0.6.1.1c" provider-name="AleksTotic" class="org.python.pydev.plugin.PydevPlugin"> --- 4,8 ---- id="org.python.pydev" name="Pydev - Python Development Environment" ! version="0.6.2" provider-name="AleksTotic" class="org.python.pydev.plugin.PydevPlugin"> |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:14:29
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/tree In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5407/src/org/python/pydev/tree Modified Files: FileTreeContentProvider.java Log Message: Index: FileTreeContentProvider.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/tree/FileTreeContentProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileTreeContentProvider.java 13 Oct 2004 19:52:53 -0000 1.1 --- FileTreeContentProvider.java 18 Oct 2004 19:14:19 -0000 1.2 *************** *** 26,33 **** if (element instanceof File) { ! ((File) element).getParent(); ! } ! System.out.println("element not instance of File: " + element.getClass().getName() + " " + element.toString()); return null; --- 26,34 ---- if (element instanceof File) { ! return ((File) element).getParent(); ! }else if(element instanceof String){ ! return new File((String) element).getParent(); } ! System.out.println("element not instance of File of String: " + element.getClass().getName() + " " + element.toString()); return null; |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:14:27
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5407/src/org/python/pydev/utils Added Files: ProgressOperation.java ProgressAction.java Log Message: --- NEW FILE: ProgressOperation.java --- /* * Created on Oct 18, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.utils; import java.lang.reflect.InvocationTargetException; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.actions.WorkspaceModifyOperation; /** * Helper class for executing an action and showing its progress. * * @author Fabio Zadrozny */ public class ProgressOperation extends WorkspaceModifyOperation { private final ProgressAction action; public IProgressMonitor monitor; public int estimatedTaskUnits = 10000; public ProgressOperation(ProgressAction action) { super(); this.action = action; } protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException { try { this.monitor = monitor; action.monitor = monitor; monitor.beginTask("Action being executed...", estimatedTaskUnits); action.run(); monitor.done(); } catch (Exception e) { e.printStackTrace(); } } /** * @param shell * */ public static void startAction(Shell shell, ProgressAction action) { ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog( shell); monitorDialog.setBlockOnOpen(false); try { IRunnableWithProgress operation = new ProgressOperation(action); monitorDialog.run(false, false, operation); // Perform the action } catch (InvocationTargetException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } } } --- NEW FILE: ProgressAction.java --- /* * Created on Oct 18, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.utils; import org.eclipse.core.runtime.IProgressMonitor; /** * @author Fabio Zadrozny */ public class ProgressAction extends org.eclipse.jface.action.Action { public IProgressMonitor monitor; //this monitor should be set before executing the action. } |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:14:19
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5364/src/org/python/pydev/utils Log Message: Directory /cvsroot/pydev/org.python.pydev/src/org/python/pydev/utils added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:13:52
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/launching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079/src/org/python/pydev/debug/ui/launching Modified Files: PythonRunner.java PythonRunnerConfig.java PythonLaunchConfigurationDelegate.java Log Message: Index: PythonRunner.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/launching/PythonRunner.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PythonRunner.java 13 Oct 2004 19:49:37 -0000 1.10 --- PythonRunner.java 18 Oct 2004 19:13:12 -0000 1.11 *************** *** 39,43 **** * The code is modeled after Ant launching example. */ ! public void run(PythonRunnerConfig config, ILaunch launch, IProgressMonitor monitor) throws CoreException, IOException { if (config.isDebug) { runDebug(config, launch, monitor); --- 39,43 ---- * The code is modeled after Ant launching example. */ ! public static void run(PythonRunnerConfig config, ILaunch launch, IProgressMonitor monitor) throws CoreException, IOException { if (config.isDebug) { runDebug(config, launch, monitor); *************** *** 58,62 **** * Loosely modeled upon Ant launcher. */ ! public void runDebug(PythonRunnerConfig config, ILaunch launch, IProgressMonitor monitor) throws CoreException, IOException { if (monitor == null) monitor = new NullProgressMonitor(); --- 58,62 ---- * Loosely modeled upon Ant launcher. */ ! public static void runDebug(PythonRunnerConfig config, ILaunch launch, IProgressMonitor monitor) throws CoreException, IOException { if (monitor == null) monitor = new NullProgressMonitor(); Index: PythonRunnerConfig.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/launching/PythonRunnerConfig.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PythonRunnerConfig.java 13 Oct 2004 19:49:37 -0000 1.11 --- PythonRunnerConfig.java 18 Oct 2004 19:13:12 -0000 1.12 *************** *** 57,60 **** --- 57,61 ---- workingDirectory = workingPath == null ? null : workingPath.toFile(); acceptTimeout = PydevPrefs.getPreferences().getInt(PydevPrefs.CONNECT_TIMEOUT); + if (isDebug) { debugScript = getDebugScript(); Index: PythonLaunchConfigurationDelegate.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/launching/PythonLaunchConfigurationDelegate.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PythonLaunchConfigurationDelegate.java 2 Jul 2004 02:26:01 -0000 1.7 --- PythonLaunchConfigurationDelegate.java 18 Oct 2004 19:13:12 -0000 1.8 *************** *** 45,53 **** PythonRunnerConfig runConfig = new PythonRunnerConfig(conf, mode); - PythonRunner runner = new PythonRunner(); monitor.worked(1); try { ! runner.run(runConfig, launch, monitor); } catch (IOException e) { e.printStackTrace(); --- 45,52 ---- PythonRunnerConfig runConfig = new PythonRunnerConfig(conf, mode); monitor.worked(1); try { ! PythonRunner.run(runConfig, launch, monitor); } catch (IOException e) { e.printStackTrace(); |
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079/src/org/python/pydev/debug/codecoverage Modified Files: RunManyDialog.java CoverageCache.java PyCodeCoverageView.java PyCoverage.java Added Files: NodeNotFoudException.java Log Message: Index: PyCodeCoverageView.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/PyCodeCoverageView.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyCodeCoverageView.java 15 Oct 2004 19:53:28 -0000 1.3 --- PyCodeCoverageView.java 18 Oct 2004 19:13:13 -0000 1.4 *************** *** 40,43 **** --- 40,45 ---- import org.python.pydev.tree.FileTreeLabelProvider; import org.python.pydev.tree.FileTreePyFilesProvider; + import org.python.pydev.utils.ProgressAction; + import org.python.pydev.utils.ProgressOperation; /** *************** *** 60,64 **** //layout stuff ! private Composite rComposite; //actions --- 62,66 ---- //layout stuff ! private Composite leftComposite; //actions *************** *** 76,90 **** * choose new dir */ ! private Action chooseAction = new ChooseAction(); /** * clear the results (and erase .coverage file) */ ! protected Action clearAction = new ClearAction();; /** * get the new results from the .coverage file */ ! protected Action refreshAction = new RefreshAction();; //buttons --- 78,92 ---- * choose new dir */ ! private ProgressAction chooseAction = new ChooseAction(); /** * clear the results (and erase .coverage file) */ ! protected ProgressAction clearAction = new ClearAction(); /** * get the new results from the .coverage file */ ! protected RefreshAction refreshAction = new RefreshAction(); //buttons *************** *** 107,111 **** private SashForm s; ! //Actions ------------------------------ /** --- 109,114 ---- private SashForm s; ! ! //Actions ------------------------------ /** *************** *** 115,121 **** * @author Fabio Zadrozny */ ! private final class RefreshAction extends Action { public void run() { ! PyCoverage.getPyCoverage().refreshCoverageInfo(lastChosenFile); viewer.setInput(lastChosenFile); //new files may have been added. text.setText("Refreshed info."); --- 118,125 ---- * @author Fabio Zadrozny */ ! private final class RefreshAction extends ProgressAction { public void run() { ! PyCoverage.getPyCoverage().refreshCoverageInfo(lastChosenFile, this.monitor); ! viewer.setInput(lastChosenFile); //new files may have been added. text.setText("Refreshed info."); *************** *** 127,131 **** * @author Fabio Zadrozny */ ! private final class ClearAction extends Action { public void run() { --- 131,135 ---- * @author Fabio Zadrozny */ ! private final class ClearAction extends ProgressAction { public void run() { *************** *** 173,177 **** * @author Fabio Zadrozny */ ! private final class DoubleClickTreeAction extends Action { public void run() { --- 177,181 ---- * @author Fabio Zadrozny */ ! private final class DoubleClickTreeAction extends ProgressAction { public void run() { *************** *** 192,196 **** File realFile = new File(obj.toString()); if (realFile.exists() && !realFile.isDirectory()) { - System.out.println("opening file:" + obj.toString()); ItemPointer p = new ItemPointer(realFile, new Location(-1, -1), null); PyOpenAction act = new PyOpenAction(); --- 196,199 ---- *************** *** 217,221 **** MarkerAttributeMap map = new MarkerAttributeMap(); int errorLine = ((Integer)it.next()).intValue()-1; - // System.out.println("adding at:"+errorLine); IRegion region = document.getLineInformation(errorLine); --- 220,223 ---- *************** *** 247,251 **** * @author Fabio Zadrozny */ ! private final class ChooseAction extends Action { public void run() { DirectoryDialog dialog = new DirectoryDialog(getSite().getShell()); --- 249,253 ---- * @author Fabio Zadrozny */ ! private final class ChooseAction extends ProgressAction { public void run() { DirectoryDialog dialog = new DirectoryDialog(getSite().getShell()); *************** *** 257,260 **** --- 259,263 ---- File file = new File(string); lastChosenFile = file; + refreshAction.monitor = this.monitor; refreshAction.run(); } *************** *** 298,302 **** parent = s; ! rComposite = new Composite(parent, SWT.MULTI); layout = new GridLayout(); layout.numColumns = 1; --- 301,305 ---- parent = s; ! leftComposite = new Composite(parent, SWT.MULTI); layout = new GridLayout(); layout.numColumns = 1; *************** *** 309,316 **** layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; ! rComposite.setLayoutData(layoutData); ! rComposite.setLayout(layout); ! text = new Text(parent, SWT.MULTI); try { text.setFont(new Font(null, "Courier new", 10, 0)); --- 312,320 ---- layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; ! leftComposite.setLayoutData(layoutData); ! leftComposite.setLayout(layout); ! ! text = new Text(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); try { text.setFont(new Font(null, "Courier new", 10, 0)); *************** *** 325,329 **** text.setLayoutData(layoutData); ! parent = rComposite; //choose button --- 329,336 ---- text.setLayoutData(layoutData); ! ! ! ! parent = leftComposite; //choose button *************** *** 367,371 **** * @param string */ ! private void createButton(Composite parent, Button button, String txt, final Action action) { GridData layoutData; button.setText(txt); --- 374,378 ---- * @param string */ ! private void createButton(Composite parent, Button button, String txt, final ProgressAction action) { GridData layoutData; button.setText(txt); *************** *** 373,377 **** public void widgetSelected(SelectionEvent e) { ! action.run(); } --- 380,384 ---- public void widgetSelected(SelectionEvent e) { ! ProgressOperation.startAction(getSite().getShell(),action ); } Index: CoverageCache.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/CoverageCache.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CoverageCache.java 15 Oct 2004 19:53:28 -0000 1.2 --- CoverageCache.java 18 Oct 2004 19:13:13 -0000 1.3 *************** *** 94,98 **** if (folderNode == null){ ! throw new RuntimeException("A file node MUST have a related folder node."); } --- 94,98 ---- if (folderNode == null){ ! throw new RuntimeException("A file node ("+node.toString()+")MUST have a related folder node."); } *************** *** 107,116 **** } ! public List getFiles(Object node){ FolderNode folderNode = (FolderNode) getFolder(node); if (folderNode == null){ FileNode fileNode = (FileNode) getFile(node); if (fileNode == null){ ! throw new RuntimeException("The node has not been found: "+node.toString()); } ArrayList list = new ArrayList(); --- 107,116 ---- } ! public List getFiles(Object node) throws NodeNotFoudException{ FolderNode folderNode = (FolderNode) getFolder(node); if (folderNode == null){ FileNode fileNode = (FileNode) getFile(node); if (fileNode == null){ ! throw new NodeNotFoudException("The node has not been found: "+node.toString()); } ArrayList list = new ArrayList(); *************** *** 160,183 **** - List list = getFiles(node); //array of FileNode - StringBuffer buffer = new StringBuffer(); ! //40 chars for name. ! buffer.append("Name Stmts Exec Cover Missing\n"); ! buffer.append("-----------------------------------------------------------------------------\n"); ! ! int totalExecuted = 0; ! int totalStmts = 0; ! ! for (Iterator it = list.iterator(); it.hasNext();) { ! FileNode element = (FileNode) it.next(); ! buffer.append(element.toString()+"\n"); ! totalExecuted += element.exec; ! totalStmts += element.stmts; } - - buffer.append("-----------------------------------------------------------------------------\n"); - buffer.append(FileNode.toString("TOTAL",totalStmts, totalExecuted, "")+"\n"); - return buffer.toString(); } --- 160,187 ---- StringBuffer buffer = new StringBuffer(); ! try { ! List list = getFiles(node); //array of FileNode ! ! //40 chars for name. ! buffer.append("Name Stmts Exec Cover Missing\n"); ! buffer.append("-----------------------------------------------------------------------------\n"); ! ! int totalExecuted = 0; ! int totalStmts = 0; ! ! for (Iterator it = list.iterator(); it.hasNext();) { ! FileNode element = (FileNode) it.next(); ! buffer.append(element.toString()+"\n"); ! totalExecuted += element.exec; ! totalStmts += element.stmts; ! } ! ! buffer.append("-----------------------------------------------------------------------------\n"); ! buffer.append(FileNode.toString("TOTAL",totalStmts, totalExecuted, "")+"\n"); ! ! } catch (NodeNotFoudException e) { ! buffer.append("File has no statistics."); } return buffer.toString(); } --- NEW FILE: NodeNotFoudException.java --- /* * Created on Oct 18, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; /** * @author Fabio Zadrozny */ public class NodeNotFoudException extends Exception { /** * @param string */ public NodeNotFoudException(String string) { super(string); } } Index: PyCoverage.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/PyCoverage.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyCoverage.java 15 Oct 2004 19:53:28 -0000 1.3 --- PyCoverage.java 18 Oct 2004 19:13:13 -0000 1.4 *************** *** 20,23 **** --- 20,25 ---- import org.eclipse.core.runtime.CoreException; + import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.core.runtime.NullProgressMonitor; import org.python.pydev.debug.core.PydevDebugPlugin; import org.python.pydev.debug.ui.launching.PythonRunnerConfig; *************** *** 48,53 **** * @param file should be the root folder from where we want cache info. */ ! public void refreshCoverageInfo(File file) { cache.clear(); try { if(file.isDirectory() == false){ --- 50,58 ---- * @param file should be the root folder from where we want cache info. */ ! public void refreshCoverageInfo(File file, IProgressMonitor monitor) { cache.clear(); + if(file == null){ + return; + } try { if(file.isDirectory() == false){ *************** *** 58,62 **** if (file.exists()) { ! pyFilesBelow = getPyFilesBelow(file); } --- 63,67 ---- if (file.exists()) { ! pyFilesBelow = getPyFilesBelow(file, monitor, true); } *************** *** 99,103 **** cmdLine[2] = "-waitfor"; ! Process p=null; --- 104,109 ---- cmdLine[2] = "-waitfor"; ! monitor.setTaskName("Starting shell to get info..."); ! monitor.worked(1); Process p=null; *************** *** 106,131 **** p = execute(cmdLine); //we have the process... ! int bufsize = 64; // small bufsize so that we can see the progress BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()), bufsize); - BufferedReader eIn = new BufferedReader(new InputStreamReader(p.getErrorStream()), bufsize); String files = ""; for (Iterator iter = pyFilesBelow[0].iterator(); iter.hasNext();) { ! files += iter.next().toString()+" "; } files += "\r"; p.getOutputStream().write(files.getBytes()); p.getOutputStream().close(); String str = ""; ! while ((str = eIn.readLine()) != null) { ! // System.out.println("STDERR: " + str); //ignore this... ! } ! eIn.close(); while ((str = in.readLine()) != null) { // System.out.println("STDOUT: " + str);//get the data... StringTokenizer tokenizer = new StringTokenizer(str); ! if(tokenizer.countTokens() ==5){ String []strings = new String[5]; --- 112,138 ---- p = execute(cmdLine); //we have the process... ! int bufsize = 32; // small bufsize so that we can see the progress BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()), bufsize); String files = ""; for (Iterator iter = pyFilesBelow[0].iterator(); iter.hasNext();) { ! String fStr = iter.next().toString(); ! files += fStr+"|"; } files += "\r"; + monitor.setTaskName("Writing to shell..."); + monitor.worked(1); p.getOutputStream().write(files.getBytes()); p.getOutputStream().close(); String str = ""; ! monitor.setTaskName("Getting coverage info...(please wait, this could take a while)"); ! monitor.worked(1); while ((str = in.readLine()) != null) { // System.out.println("STDOUT: " + str);//get the data... StringTokenizer tokenizer = new StringTokenizer(str); ! int nTokens = tokenizer.countTokens(); ! if(nTokens == 5 || nTokens == 4){ String []strings = new String[5]; *************** *** 136,151 **** } ! if(strings[1].equals("Stmts") == false){ //information in the format: D:\dev_programs\test\test1.py 11 0 0% 1,2,4-23 // System.out.println("VALID: " + str);//get the data... File f = new File(strings[0]); ! cache.addFile(f, f.getParentFile(), Integer.parseInt(strings[1]), Integer.parseInt(strings[2]), strings[4]); } } } in.close(); ! System.out.println("waiting"); p.waitFor(); ! System.out.println("finished"); } catch (Exception e) { if(p!=null){ --- 143,170 ---- } ! if(strings[1].equals("Stmts") == false && strings[0].equals("TOTAL") == false){ //information in the format: D:\dev_programs\test\test1.py 11 0 0% 1,2,4-23 // System.out.println("VALID: " + str);//get the data... File f = new File(strings[0]); ! if(nTokens == 4){ ! cache.addFile(f, f.getParentFile(), Integer.parseInt(strings[1]), Integer.parseInt(strings[2]), ""); ! }else{ ! cache.addFile(f, f.getParentFile(), Integer.parseInt(strings[1]), Integer.parseInt(strings[2]), strings[4]); ! } ! String[] strs = f.toString().replaceAll("/", " ").replaceAll("\\\\"," ").split(" "); ! if (strs.length > 1){ ! monitor.setTaskName("Getting coverage info..."+strs[strs.length -1]); ! }else{ ! monitor.setTaskName("Getting coverage info..."+f.toString()); ! } ! monitor.worked(1); } } } in.close(); ! monitor.setTaskName("Waiting for process to finish..."); ! monitor.worked(1); p.waitFor(); ! monitor.setTaskName("Finished"); } catch (Exception e) { if(p!=null){ *************** *** 205,209 **** * @return tuple with files in pos 0 and folders in pos 1 */ ! public static List[] getPyFilesBelow(File file , FileFilter filter) { List filesToReturn = new ArrayList(); List folders = new ArrayList(); --- 224,231 ---- * @return tuple with files in pos 0 and folders in pos 1 */ ! public static List[] getPyFilesBelow(File file , FileFilter filter, IProgressMonitor monitor) { ! if(monitor == null){ ! monitor = new NullProgressMonitor(); ! } List filesToReturn = new ArrayList(); List folders = new ArrayList(); *************** *** 222,231 **** for (int i = 0; i < files.length; i++) { ! List[] below = getPyFilesBelow(files[i]); filesToReturn.addAll(below[0]); folders.addAll(below[1]); } } else if (file.isFile()) { filesToReturn.add(file); } } --- 244,256 ---- for (int i = 0; i < files.length; i++) { ! List[] below = getPyFilesBelow(files[i], filter, monitor); filesToReturn.addAll(below[0]); folders.addAll(below[1]); + monitor.worked(1); } } else if (file.isFile()) { filesToReturn.add(file); + monitor.worked(1); + monitor.setTaskName("Found:"+file.toString()); } } *************** *** 240,252 **** * @return tuple with files in pos 0 and folders in pos 1 */ ! public static List[] getPyFilesBelow(File file) { FileFilter filter = new FileFilter() { public boolean accept(File pathname) { ! return pathname.isDirectory() || pathname.toString().endsWith(".py"); } }; ! return getPyFilesBelow(file, filter); } --- 265,280 ---- * @return tuple with files in pos 0 and folders in pos 1 */ ! public static List[] getPyFilesBelow(File file, IProgressMonitor monitor, final boolean includeDirs) { FileFilter filter = new FileFilter() { public boolean accept(File pathname) { ! if(includeDirs) ! return pathname.isDirectory() || pathname.toString().endsWith(".py"); ! else ! return pathname.isDirectory() == false || pathname.toString().endsWith(".py"); } }; ! return getPyFilesBelow(file, filter, monitor); } Index: RunManyDialog.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/RunManyDialog.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RunManyDialog.java 15 Oct 2004 19:53:28 -0000 1.1 --- RunManyDialog.java 18 Oct 2004 19:13:12 -0000 1.2 *************** *** 9,33 **** import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; /** * @author Fabio Zadrozny */ ! public class RunManyDialog extends Dialog{ private String root; ! public Text textRootFolder; ! public Text textFilesThatMatch; ! public Text textWorkingDir; ! public Text textInterpreter; public String rootFolder; public String files; public String interpreter; public String working; /** * @param parentShell --- 9,65 ---- import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; + import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; + import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; + import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; + import org.eclipse.swt.widgets.Widget; + import org.python.pydev.plugin.PydevPrefs; /** * @author Fabio Zadrozny */ ! public class RunManyDialog extends Dialog implements Listener { private String root; ! ! private Text textRootFolder; ! ! private Text textFilesThatMatch; ! ! private Text textWorkingDir; ! ! private Text textInterpreter; ! ! private Button check; ! ! private Text textScriptLocation; ! ! private Text textScriptArgs; ! ! //output gotten here. public String rootFolder; + public String files; + public String interpreter; + public String working; + public String scriptArgs; + + public String scriptLocation; + + public boolean scriptSelected; + + private Label labelScript0; + + private Label labelScript1; + + private Label labelFilesThatMatch; + /** * @param parentShell *************** *** 41,47 **** protected Control createDialogArea(Composite parent) { ! // create a composite with standard margins and spacing ! Composite composite = (Composite) super.createDialogArea(parent); ! GridData layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; --- 73,79 ---- protected Control createDialogArea(Composite parent) { ! // create a composite with standard margins and spacing ! Composite composite = (Composite) super.createDialogArea(parent); ! GridData layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; *************** *** 50,53 **** --- 82,101 ---- layoutData.verticalAlignment = GridData.FILL; + Label label0 = new Label(composite, 0); + label0 + .setText("Two runs can be specified now...\n" + + "If a script is not specified, each file to be executed will have its own shell and output.\n" + + "If a script is specified, it should receive the root folder and the args as parameters,\n" + + "and it should take the responsibility for selecting the files and executing each one.\n" + + "This can be very useful if many tests should be run with a single output (and for instance,\n" + + "you want to execute only unit-tests and see the output in a formated way)."); + label0.setLayoutData(layoutData); + + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + Label label = new Label(composite, 0); label.setText("Root folder:"); *************** *** 69,75 **** layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; ! Label label2 = new Label(composite, 0); ! label2.setText("Files that match:"); ! label2.setLayoutData(layoutData); layoutData = new GridData(); --- 117,123 ---- layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; ! labelFilesThatMatch = new Label(composite, 0); ! labelFilesThatMatch.setText("Files that match (see JAVA regular expression):"); ! labelFilesThatMatch.setLayoutData(layoutData); layoutData = new GridData(); *************** *** 79,83 **** layoutData.verticalAlignment = GridData.FILL; textFilesThatMatch = new Text(composite, SWT.SINGLE); ! textFilesThatMatch.setText("test*.py"); textFilesThatMatch.setLayoutData(layoutData); --- 127,131 ---- layoutData.verticalAlignment = GridData.FILL; textFilesThatMatch = new Text(composite, SWT.SINGLE); ! textFilesThatMatch.setText("test.*\\.py"); textFilesThatMatch.setLayoutData(layoutData); *************** *** 117,137 **** layoutData.verticalAlignment = GridData.FILL; textInterpreter = new Text(composite, SWT.SINGLE); ! textInterpreter.setText("python"); textInterpreter.setLayoutData(layoutData); return composite; ! } ! ! /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ protected void okPressed() { ! rootFolder = textRootFolder.getText(); ! files = textFilesThatMatch.getText(); ! interpreter = textInterpreter.getText(); ! working = textWorkingDir.getText(); // TODO Auto-generated method stub super.okPressed(); } ! } --- 165,265 ---- layoutData.verticalAlignment = GridData.FILL; textInterpreter = new Text(composite, SWT.SINGLE); ! textInterpreter.setText(PydevPrefs.getDefaultInterpreter()); textInterpreter.setLayoutData(layoutData); + //------- + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + check = new Button(composite, SWT.CHECK); + check.setText("Use script that receives: RootFolder args"); + check.setLayoutData(layoutData); + + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + labelScript0 = new Label(composite, 0); + labelScript0.setText("Script location (absolute)"); + labelScript0.setLayoutData(layoutData); + + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + textScriptLocation = new Text(composite, SWT.SINGLE); + textScriptLocation.setText("X:\\coilib30\\tools\\runtests.py"); + textScriptLocation.setLayoutData(layoutData); + + //------- + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + labelScript1 = new Label(composite, 0); + labelScript1.setText("Aditional args for script."); + labelScript1.setLayoutData(layoutData); + + layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + textScriptArgs = new Text(composite, SWT.SINGLE); + textScriptArgs.setLayoutData(layoutData); + + check.addListener(SWT.Selection, this); + check.setSelection(true); + this.showDependingOnCheck(true); + return composite; ! } ! /* ! * (non-Javadoc) ! * * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ protected void okPressed() { ! rootFolder = textRootFolder.getText(); ! files = textFilesThatMatch.getText(); ! interpreter = textInterpreter.getText(); ! working = textWorkingDir.getText(); ! ! scriptArgs = textScriptArgs.getText(); ! scriptLocation = textScriptLocation.getText(); ! scriptSelected = check.getSelection(); // TODO Auto-generated method stub super.okPressed(); } ! ! /* ! * (non-Javadoc) ! * ! * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) ! */ ! public void handleEvent(Event e) { ! Widget source = e.widget; ! if (source == check) { ! boolean sel = check.getSelection(); ! showDependingOnCheck(sel); ! } ! } ! ! /** ! * @param sel ! */ ! private void showDependingOnCheck(boolean sel) { ! textScriptLocation.setVisible(sel); ! textScriptArgs.setVisible(sel); ! labelScript0.setVisible(sel); ! labelScript1.setVisible(sel); ! labelFilesThatMatch.setVisible(!sel); ! textFilesThatMatch.setVisible(!sel); ! } ! } \ No newline at end of file |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:13:28
|
Update of /cvsroot/pydev/org.python.pydev.debug/pysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079/pysrc Modified Files: coverage.py Log Message: Index: coverage.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/pysrc/coverage.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** coverage.py 15 Oct 2004 19:53:27 -0000 1.3 --- coverage.py 18 Oct 2004 19:13:13 -0000 1.4 *************** *** 549,555 **** s = s.replace('\r', '') s = s.replace('\n', '') ! files = s.split(' ') sys.argv += files ! the_coverage.command_line() --- 549,556 ---- s = s.replace('\r', '') s = s.replace('\n', '') ! files = s.split('|') ! files = [v for v in files if len(v) > 0] sys.argv += files ! the_coverage.command_line() |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:13:26
|
Update of /cvsroot/pydev/org.python.pydev.debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079 Modified Files: plugin.xml Log Message: Index: plugin.xml =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/plugin.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** plugin.xml 15 Oct 2004 19:53:28 -0000 1.19 --- plugin.xml 18 Oct 2004 19:13:15 -0000 1.20 *************** *** 4,8 **** id="org.python.pydev.debug" name="Pydev debug" ! version="0.6" provider-name="Aleks Totic" class="org.python.pydev.debug.core.PydevDebugPlugin"> --- 4,8 ---- id="org.python.pydev.debug" name="Pydev debug" ! version="0.6.2" provider-name="Aleks Totic" class="org.python.pydev.debug.core.PydevDebugPlugin"> *************** *** 134,138 **** </menu> <action ! label="Coverage many..." icon="icons/python.gif" tooltip="Make code coverage for many python files at once." --- 134,138 ---- </menu> <action ! label="Coverage subset..." icon="icons/python.gif" tooltip="Make code coverage for many python files at once." *************** *** 140,144 **** menubarPath="org.python.pydev.debug.WorkspaceMenu/group2" enablesFor="1" ! id="org.python.pydev.debug.PythonRunSubsetActionDelegate"> </action> </objectContribution> --- 140,153 ---- menubarPath="org.python.pydev.debug.WorkspaceMenu/group2" enablesFor="1" ! id="org.python.pydev.debug.PythonCoverageSubset"> ! </action> ! <action ! label="Run subset..." ! icon="icons/python.gif" ! tooltip="Run many python files at once." ! class="org.python.pydev.debug.ui.actions.PythonRunSubsetActionDelegate" ! menubarPath="org.python.pydev.debug.WorkspaceMenu/group2" ! enablesFor="1" ! id="org.python.pydev.debug.PythonRunSubset"> </action> </objectContribution> |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:13:25
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079/src/org/python/pydev/debug/ui/actions Modified Files: PythonRunSubsetActionDelegate.java Log Message: Index: PythonRunSubsetActionDelegate.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/actions/PythonRunSubsetActionDelegate.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PythonRunSubsetActionDelegate.java 15 Oct 2004 19:53:28 -0000 1.1 --- PythonRunSubsetActionDelegate.java 18 Oct 2004 19:13:14 -0000 1.2 *************** *** 13,17 **** --- 13,29 ---- import org.eclipse.core.resources.IFolder; + import org.eclipse.core.runtime.CoreException; + import org.eclipse.core.runtime.IStatus; + import org.eclipse.core.runtime.Status; + import org.eclipse.debug.core.ILaunchConfiguration; + import org.eclipse.debug.core.ILaunchConfigurationType; + import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; + import org.eclipse.debug.core.ILaunchManager; + import org.eclipse.debug.core.Launch; + import org.eclipse.debug.ui.CommonTab; + import org.eclipse.debug.ui.DebugUITools; + import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.IAction; + import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; *************** *** 22,25 **** --- 34,40 ---- import org.python.pydev.debug.codecoverage.PyCoverage; import org.python.pydev.debug.codecoverage.RunManyDialog; + import org.python.pydev.debug.core.Constants; + import org.python.pydev.debug.core.PydevDebugPlugin; + import org.python.pydev.debug.ui.launching.PythonRunnerConfig; /** *************** *** 32,54 **** public void run(IAction action) { ! if (part != null && selectedFolder != null) { ! // figure out run or debug mode ! ! RunManyDialog dialog = new RunManyDialog(part.getSite().getShell(), selectedFolder.getLocation().toString()); ! if(dialog.open() == Window.OK){ ! String root = dialog.rootFolder; ! String files = dialog.files; ! ! String interpreter = dialog.interpreter; ! String workingDir = dialog.working; ! ! List list = listFilesThatMatch(root, files); ! for (Iterator iter = list.iterator(); iter.hasNext();) { ! System.out.println(iter.next()); ! //TODO: execute those files with the coverage script. ! //we have to get the output for the user.. ! } ! } ! } } --- 47,110 ---- public void run(IAction action) { ! try { ! if (part != null && selectedFolder != null) { ! ! String runMode = ""; ! if(action.getId().endsWith("PythonRunSubset")){ ! runMode = ILaunchManager.RUN_MODE; ! ! } else if(action.getId().endsWith("PythonCoverageSubset")){ ! runMode = ILaunchManager.PROFILE_MODE; ! ! } else{ ! throw new RuntimeException("Unknown "); ! } ! ! ! ! RunManyDialog dialog = new RunManyDialog(part.getSite().getShell(), selectedFolder.getLocation().toString()); ! if(dialog.open() == Window.OK){ ! String root = dialog.rootFolder; ! String files = dialog.files; ! ! String interpreter = dialog.interpreter; ! String workingDir = dialog.working; ! String scriptArgs = dialog.scriptArgs; ! String scriptLocation = dialog.scriptLocation; ! boolean scriptSelected = dialog.scriptSelected; ! ! String arguments= ""; //no arguments for multiple run... ! if(scriptSelected){ ! arguments += root+" "; ! arguments += scriptArgs; ! ILaunchConfiguration configuration = createDefaultLaunchConfiguration(selectedFolder, scriptLocation, workingDir, arguments, interpreter); ! Launch launch = new Launch(configuration,runMode, null ); ! ! PythonRunnerConfig config = new PythonRunnerConfig(configuration, runMode); ! ! DebugUITools.launch(configuration, runMode); ! ! }else{ ! List list = listFilesThatMatch(root, files); ! ! for (Iterator iter = list.iterator(); iter.hasNext();) { ! Object n = iter.next(); ! System.out.println("Executing:"+n); ! ILaunchConfiguration configuration = createDefaultLaunchConfiguration(selectedFolder, n.toString(), workingDir, arguments, interpreter); ! Launch launch = new Launch(configuration,runMode, null ); ! ! PythonRunnerConfig config = new PythonRunnerConfig(configuration, runMode); ! ! DebugUITools.launch(configuration, runMode); ! ! } ! } ! } ! } ! } catch (Exception e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! throw new RuntimeException(e); ! } } *************** *** 70,74 **** }; ! l = PyCoverage.getPyFilesBelow(file, filter)[0]; } --- 126,130 ---- }; ! l = PyCoverage.getPyFilesBelow(file, filter, null)[0]; } *************** *** 97,100 **** --- 153,214 ---- } } + + + /** + * COPIED/MODIFIED from AntLaunchShortcut + */ + public static ILaunchConfiguration createDefaultLaunchConfiguration(IFolder folder, String location, String baseDirectory, String arguments, String interpreter) { + ILaunchManager manager = org.eclipse.debug.core.DebugPlugin.getDefault().getLaunchManager(); + ILaunchConfigurationType type = manager.getLaunchConfigurationType(Constants.ID_PYTHON_LAUNCH_CONFIGURATION_TYPE); + if (type == null) { + reportError("Python launch configuration not found", null); + return null; + } + StringBuffer buffer = new StringBuffer(folder.getProject().getName()); + buffer.append(" "); + buffer.append(folder.getName()); + String name = buffer.toString().trim(); + // name= manager.generateUniqueLaunchConfigurationNameFrom(name); + try { + + ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, name); + workingCopy.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, false); + workingCopy.setAttribute(Constants.ATTR_LOCATION,location); + workingCopy.setAttribute(Constants.ATTR_WORKING_DIRECTORY,baseDirectory); + workingCopy.setAttribute(Constants.ATTR_PROGRAM_ARGUMENTS,arguments); + workingCopy.setAttribute(Constants.ATTR_INTERPRETER,interpreter); + + // Common Tab Arguments + CommonTab tab = new CommonTab(); + tab.setDefaults(workingCopy); + tab.dispose(); + return workingCopy.doSave(); + } catch (CoreException e) { + reportError(null, e); + return null; + } + } + + /** + * + * @param folder + * @return + */ + static String getDefaultLocation (IFolder folder) { + return folder.getRawLocation().toString(); + } + + protected static void reportError(String message, Throwable throwable) { + if (message == null) + message = "Unexpected error"; + IStatus status = null; + if (throwable instanceof CoreException) { + status = ((CoreException)throwable).getStatus(); + } else { + status = new Status(IStatus.ERROR, "org.python.pydev.debug", 0, message, throwable); + } + ErrorDialog.openError(PydevDebugPlugin.getActiveWorkbenchWindow().getShell(), + "Python pydev.debug error", "Python launch subset failed", status); + } } \ No newline at end of file |
From: Fabio Z. <fa...@us...> - 2004-10-18 19:13:23
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5079/tests/org/python/pydev/debug/codecoverage Modified Files: CoverageCacheTest.java Log Message: Index: CoverageCacheTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug/codecoverage/CoverageCacheTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CoverageCacheTest.java 15 Oct 2004 12:09:54 -0000 1.1 --- CoverageCacheTest.java 18 Oct 2004 19:13:14 -0000 1.2 *************** *** 36,40 **** } ! public void testAddRoot(){ String folder1 = "a"; //all files String folder2 = "a.b"; //no files --- 36,40 ---- } ! public void testAddRoot() throws NodeNotFoudException{ String folder1 = "a"; //all files String folder2 = "a.b"; //no files |
From: Fabio Z. <fa...@us...> - 2004-10-15 19:54:42
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13832/src/org/python/pydev/editor/actions Modified Files: PyOpenAction.java Log Message: making code coverage. Index: PyOpenAction.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions/PyOpenAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyOpenAction.java 24 Sep 2004 00:27:00 -0000 1.7 --- PyOpenAction.java 15 Oct 2004 19:54:32 -0000 1.8 *************** *** 30,34 **** public class PyOpenAction extends Action { ! public PyOpenAction() { } --- 30,37 ---- public class PyOpenAction extends Action { ! public IEditorPart editor; ! ! ! public PyOpenAction() { } *************** *** 53,57 **** public void run(ItemPointer p) { ! IEditorPart editor = null; if (p.file instanceof IFile) editor = PydevPlugin.doOpenEditor(((IFile)p.file).getFullPath(), true); --- 56,60 ---- public void run(ItemPointer p) { ! editor = null; if (p.file instanceof IFile) editor = PydevPlugin.doOpenEditor(((IFile)p.file).getFullPath(), true); |
From: Fabio Z. <fa...@us...> - 2004-10-15 19:53:49
|
Update of /cvsroot/pydev/org.python.pydev.debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13540 Modified Files: plugin.xml Log Message: making code coverage. Index: plugin.xml =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/plugin.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** plugin.xml 8 Oct 2004 16:42:36 -0000 1.18 --- plugin.xml 15 Oct 2004 19:53:28 -0000 1.19 *************** *** 110,114 **** id="org.python.pydev.debug.CoveragePythonAction"> </action> ! <action enablesFor="1" label="pyUnit Test..." --- 110,115 ---- id="org.python.pydev.debug.CoveragePythonAction"> </action> ! <!-- Disabled until it works better... ! <action enablesFor="1" label="pyUnit Test..." *************** *** 118,121 **** --- 119,145 ---- menubarPath="org.python.pydev.debug.WorkspaceMenu/group1" id="org.python.pydev.debug.TestPythonAction"/> + --> + </objectContribution> + + <objectContribution + adaptable="true" + objectClass="org.eclipse.core.resources.IFolder" + nameFilter="*" + id="org.python.pydev.debug.RunPythonFolder"> + <menu + label="Python (many)" + path="additions2" + id="org.python.pydev.debug.WorkspaceMenu"> + <separator name="group2"/> + </menu> + <action + label="Coverage many..." + icon="icons/python.gif" + tooltip="Make code coverage for many python files at once." + class="org.python.pydev.debug.ui.actions.PythonRunSubsetActionDelegate" + menubarPath="org.python.pydev.debug.WorkspaceMenu/group2" + enablesFor="1" + id="org.python.pydev.debug.PythonRunSubsetActionDelegate"> + </action> </objectContribution> </extension> *************** *** 211,214 **** --- 235,239 ---- <persistent value="true"/> <attribute name="org.eclipse.cdt.debug.core.condition"/> + <super type="org.python.pydev.debug.notexecuted"/> </extension> <extension *************** *** 224,227 **** --- 249,256 ---- markertype="org.python.pydev.debug.pyStopBreakpointMarker" icon="icons/breakmarker.gif"/> + <imageprovider + markertype="org.python.pydev.debug.notexecuted" + icon="icons/reddot.gif" + id="pyCodeCoverageImageProvider"/> </extension> <extension point = "org.eclipse.debug.ui.debugModelPresentations"> |
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13540/src/org/python/pydev/debug/codecoverage Modified Files: CoverageCache.java PyCodeCoverageView.java PyCoverage.java FileNode.java Added Files: RunManyDialog.java Log Message: making code coverage. Index: PyCodeCoverageView.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/PyCodeCoverageView.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyCodeCoverageView.java 13 Oct 2004 19:49:38 -0000 1.2 --- PyCodeCoverageView.java 15 Oct 2004 19:53:28 -0000 1.3 *************** *** 2,23 **** import java.io.File; ! import java.util.ArrayList; ! import java.util.Collection; ! import java.util.List; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; - import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TreeViewer; - import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; --- 2,26 ---- import java.io.File; ! import java.util.Iterator; + import org.eclipse.core.internal.resources.MarkerAttributeMap; + import org.eclipse.core.resources.IFile; + import org.eclipse.core.resources.IMarker; import org.eclipse.jface.action.Action; import org.eclipse.jface.dialogs.MessageDialog; + import org.eclipse.jface.text.IDocument; + import org.eclipse.jface.text.IRegion; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.SWT; + import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; + import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; *************** *** 26,32 **** import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.Text; ! import org.eclipse.ui.IPropertyListener; import org.eclipse.ui.part.ViewPart; ! import org.python.pydev.editor.refactoring.PyRefactoring; import org.python.pydev.tree.AllowValidPathsFilter; import org.python.pydev.tree.FileTreeLabelProvider; --- 29,40 ---- import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.Text; ! import org.eclipse.ui.IEditorInput; ! import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.part.ViewPart; ! import org.eclipse.ui.texteditor.MarkerUtilities; ! import org.python.pydev.editor.PyEdit; ! import org.python.pydev.editor.actions.PyOpenAction; ! import org.python.pydev.editor.model.ItemPointer; ! import org.python.pydev.editor.model.Location; import org.python.pydev.tree.AllowValidPathsFilter; import org.python.pydev.tree.FileTreeLabelProvider; *************** *** 48,72 **** */ ! public class PyCodeCoverageView extends ViewPart implements IPropertyListener, IStructuredContentProvider { ! private TreeViewer viewer; ! private Action doubleClickAction; ! private Action chooseAction; ! protected Action clearAction; private Button clearButton; ! private List elements = new ArrayList(); private Button chooseButton; ! private Composite rComposite; ! private Text text; ! protected String currentDir; /** --- 56,266 ---- */ ! public class PyCodeCoverageView extends ViewPart { ! private static final String NOT_EXECUTED_MARKER = "org.python.pydev.debug.notexecuted"; ! //layout stuff ! private Composite rComposite; ! //actions ! /** ! * double click the tree ! */ ! private DoubleClickTreeAction doubleClickAction = new DoubleClickTreeAction(); ! /** ! * changed selected element ! */ ! private SelectionChangedTreeAction selectionChangedAction = new SelectionChangedTreeAction(); ! /** ! * choose new dir ! */ ! private Action chooseAction = new ChooseAction(); + /** + * clear the results (and erase .coverage file) + */ + protected Action clearAction = new ClearAction();; + + /** + * get the new results from the .coverage file + */ + protected Action refreshAction = new RefreshAction();; + + //buttons private Button clearButton; ! private Button refreshButton; private Button chooseButton; ! //write the results here private Text text; ! //tree som that user can browse results. ! private TreeViewer viewer; ! ! /** ! * ! */ ! private File lastChosenFile; ! ! private SashForm s; ! ! //Actions ------------------------------ ! /** ! * In this action we have to go and refresh all the info based on the chosen ! * dir. ! * ! * @author Fabio Zadrozny ! */ ! private final class RefreshAction extends Action { ! public void run() { ! PyCoverage.getPyCoverage().refreshCoverageInfo(lastChosenFile); ! viewer.setInput(lastChosenFile); //new files may have been added. ! text.setText("Refreshed info."); ! } ! } ! ! /** ! * ! * @author Fabio Zadrozny ! */ ! private final class ClearAction extends Action { ! public void run() { ! ! PyCoverage.getPyCoverage().clearInfo(); ! ! MessageDialog.openInformation(getSite().getShell(), "Cleared", ! "All the coverage data has been cleared!"); ! ! text.setText("Data cleared (NOT REFRESHED)."); ! } ! } ! ! /** ! * ! * @author Fabio Zadrozny ! */ ! private final class SelectionChangedTreeAction extends Action { ! public void run() { ! run((IStructuredSelection) viewer.getSelection()); ! } ! ! /** ! * @param event ! */ ! public void runWithEvent(SelectionChangedEvent event) { ! run((IStructuredSelection) event.getSelection()); ! } ! ! public void run(IStructuredSelection selection) { ! Object obj = selection.getFirstElement(); ! ! if (obj == null) ! return; ! ! File realFile = new File(obj.toString()); ! if (realFile.exists()) { ! text.setText(PyCoverage.getPyCoverage().cache.getStatistics(realFile)); ! } ! } ! ! } ! ! /** ! * ! * @author Fabio Zadrozny ! */ ! private final class DoubleClickTreeAction extends Action { ! ! public void run() { ! run(viewer.getSelection()); ! } ! ! /** ! * @param event ! */ ! public void runWithEvent(DoubleClickEvent event) { ! run(event.getSelection()); ! } ! ! public void run(ISelection selection) { ! try { ! Object obj = ((IStructuredSelection) selection).getFirstElement(); ! ! File realFile = new File(obj.toString()); ! if (realFile.exists() && !realFile.isDirectory()) { ! System.out.println("opening file:" + obj.toString()); ! ItemPointer p = new ItemPointer(realFile, new Location(-1, -1), null); ! PyOpenAction act = new PyOpenAction(); ! act.run(p); ! ! if(act.editor instanceof PyEdit){ ! PyEdit e = (PyEdit) act.editor; ! IEditorInput input = e.getEditorInput(); ! IFile original = (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null; ! if (original == null) ! return; ! IDocument document = e.getDocumentProvider().getDocument(e.getEditorInput()); ! ! String type = NOT_EXECUTED_MARKER; ! type = IMarker.PROBLEM; ! original.deleteMarkers(type, false, 1); ! ! ! ! String message = "Not Executed"; ! ! FileNode cache = (FileNode) PyCoverage.getPyCoverage().cache.getFile(realFile); ! for(Iterator it = cache.notExecutedIterator();it.hasNext();){ ! MarkerAttributeMap map = new MarkerAttributeMap(); ! int errorLine = ((Integer)it.next()).intValue()-1; ! // System.out.println("adding at:"+errorLine); ! ! IRegion region = document.getLineInformation(errorLine); ! int errorEnd = region.getOffset(); ! int errorStart = region.getOffset()+region.getLength(); ! ! map.put(IMarker.MESSAGE, message); ! map.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR)); ! map.put(IMarker.LINE_NUMBER, new Integer(errorLine)); ! map.put(IMarker.CHAR_START, new Integer(errorStart)); ! map.put(IMarker.CHAR_END, new Integer(errorEnd)); ! map.put(IMarker.TRANSIENT, Boolean.valueOf(true)); ! map.put(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_HIGH)); ! ! MarkerUtilities.createMarker(original, map, type); ! } ! ! } ! } ! } catch (Exception e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } ! } ! } ! ! /** ! * ! * @author Fabio Zadrozny ! */ ! private final class ChooseAction extends Action { ! public void run() { ! DirectoryDialog dialog = new DirectoryDialog(getSite().getShell()); ! if (lastChosenFile != null && lastChosenFile.exists()) { ! dialog.setFilterPath(lastChosenFile.getParent()); ! } ! String string = dialog.open(); ! if (string != null) { ! File file = new File(string); ! lastChosenFile = file; ! refreshAction.run(); ! } ! } ! } ! ! // Class ------------------------------------------------------------------- /** *************** *** 86,89 **** --- 280,284 ---- */ public void createPartControl(Composite parent) { + GridLayout layout = new GridLayout(); layout.numColumns = 2; *************** *** 93,96 **** --- 288,301 ---- parent.setLayout(layout); + s = new SashForm(parent, SWT.HORIZONTAL); + GridData layoutData = new GridData(); + layoutData.grabExcessHorizontalSpace = true; + layoutData.grabExcessVerticalSpace = true; + layoutData.horizontalAlignment = GridData.FILL; + layoutData.verticalAlignment = GridData.FILL; + s.setLayoutData(layoutData); + + parent = s; + rComposite = new Composite(parent, SWT.MULTI); layout = new GridLayout(); *************** *** 99,103 **** layout.marginWidth = 0; layout.marginHeight = 2; ! GridData layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; --- 304,308 ---- layout.marginWidth = 0; layout.marginHeight = 2; ! layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; *************** *** 108,111 **** --- 313,321 ---- text = new Text(parent, SWT.MULTI); + try { + text.setFont(new Font(null, "Courier new", 10, 0)); + } catch (Exception e) { + //ok, might mot be available. + } layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; *************** *** 114,118 **** layoutData.verticalAlignment = GridData.FILL; text.setLayoutData(layoutData); - text.setEditable(false); parent = rComposite; --- 324,327 ---- *************** *** 120,133 **** //choose button chooseButton = new Button(parent, SWT.PUSH); - chooseAction = new Action() { - public void run() { - DirectoryDialog dialog = new DirectoryDialog(getSite().getShell()); - String string = dialog.open(); - if (string != null) { - text.setText("Chosen dir:" + string); - notifyDirChanged(string); - } - } - }; createButton(parent, chooseButton, "Choose dir!", chooseAction); //end choose button --- 329,332 ---- *************** *** 138,155 **** viewer.addFilter(new AllowValidPathsFilter()); - doubleClickAction = new Action() { - public void run() { - ISelection selection = viewer.getSelection(); - Object obj = ((IStructuredSelection) selection).getFirstElement(); - - File realFile = new File(obj.toString()); - if (realFile.exists()) { - System.out.println("opening file:" + obj.toString()); - // ItemPointer p = new ItemPointer(realFile, new - // Location(-1, -1), null); - // new PyOpenAction().run(p); - } - } - }; hookViewerActions(); --- 337,340 ---- *************** *** 163,195 **** //clear results button clearButton = new Button(parent, SWT.PUSH); - clearAction = new Action() { - public void run() { - - PyCoverage.getPyCoverage().clearInfo(); - - MessageDialog.openInformation(getSite().getShell(), "Cleared", - "All the coverage data has been cleared!"); - - text.setText(""); - } - }; createButton(parent, clearButton, "Clear coverage information!", clearAction); //end choose button ! this.refresh(); ! ! } ! /** ! * @param string ! */ ! protected void notifyDirChanged(String newDir) { ! File file = new File(newDir); ! PyCoverage.getPyCoverage().refreshCoverageInfo(file); ! viewer.setInput(file); } /** * @param parent * @param button --- 348,366 ---- //clear results button clearButton = new Button(parent, SWT.PUSH); createButton(parent, clearButton, "Clear coverage information!", clearAction); //end choose button ! //refresh button ! refreshButton = new Button(parent, SWT.PUSH); ! createButton(parent, refreshButton, "Refresh coverage information!", refreshAction); ! //end choose button ! this.refresh(); } /** + * Create button with hooked action. + * * @param parent * @param button *************** *** 216,223 **** } private void hookViewerActions() { viewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { ! doubleClickAction.run(); } }); --- 387,398 ---- } + /** + * + * Add the double click and selection changed action + */ private void hookViewerActions() { viewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { ! doubleClickAction.runWithEvent(event); } }); *************** *** 226,234 **** public void selectionChanged(SelectionChangedEvent event) { ! IStructuredSelection selection = (IStructuredSelection) event.getSelection(); ! ! Object selected_file = selection.getFirstElement(); ! System.out.println("Number of items selected is " + selection.size()); ! System.out.println("selected_file = " + selected_file); } --- 401,405 ---- public void selectionChanged(SelectionChangedEvent event) { ! selectionChangedAction.runWithEvent(event); } *************** *** 243,270 **** } - public void propertyChanged(Object source, int propId) { - if (source == null) { - return; - } - - Object[] sources = (Object[]) source; - - if (sources[0] == null || sources[1] == null) { - return; - } - - if (sources[0] == PyRefactoring.getPyRefactoring() && propId == PyRefactoring.REFACTOR_RESULT) { - - elements.clear(); - elements.addAll((Collection) sources[1]); - } - } - - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - - public Object[] getElements(Object parent) { - return elements.toArray(); - } - } \ No newline at end of file --- 414,416 ---- Index: FileNode.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/FileNode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileNode.java 15 Oct 2004 12:09:53 -0000 1.1 --- FileNode.java 15 Oct 2004 19:53:28 -0000 1.2 *************** *** 7,10 **** --- 7,13 ---- import java.text.DecimalFormat; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.List; /** *************** *** 79,82 **** --- 82,106 ---- } + /** + * + */ + public Iterator notExecutedIterator() { + List l = new ArrayList(); + + String[] toks = notExecuted.replaceAll(" ", "").split(","); + for (int i = 0; i < toks.length; i++) { + if(toks[i].indexOf("-") == -1){ + l.add(new Integer(toks[i])); + }else{ + String[] begEnd = toks[i].split("-"); + for (int j = Integer.parseInt(begEnd[0]) ; j <= Integer.parseInt(begEnd[1]); j++){ + l.add(new Integer(j)); + } + } + } + + return l.iterator(); + } + } Index: PyCoverage.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/PyCoverage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyCoverage.java 13 Oct 2004 19:49:38 -0000 1.2 --- PyCoverage.java 15 Oct 2004 19:53:28 -0000 1.3 *************** *** 37,60 **** */ public class PyCoverage { ! /** * This method contacts the python server so that we get the information on ! * the files that are below the directory passed as a parameter * ! * @param file2 */ public void refreshCoverageInfo(File file) { try { ! List pyFilesBelow = null; if (file.exists()) { pyFilesBelow = getPyFilesBelow(file); ! } else { ! pyFilesBelow = new ArrayList(); ! } ! if(pyFilesBelow.size() == 0){ return; } //now that we have the file information, we have to get the // coverage information on these files and --- 37,81 ---- */ public class PyCoverage { ! ! public CoverageCache cache = new CoverageCache(); ! ! /** * This method contacts the python server so that we get the information on ! * the files that are below the directory passed as a parameter and stores the information ! * needed on the cache. * ! * @param file should be the root folder from where we want cache info. */ public void refreshCoverageInfo(File file) { + cache.clear(); try { ! if(file.isDirectory() == false){ ! throw new RuntimeException("We can only get information on a dir."); ! } ! ! List pyFilesBelow[] = new List[]{new ArrayList(), new ArrayList()}; ! if (file.exists()) { pyFilesBelow = getPyFilesBelow(file); ! } ! if(pyFilesBelow[0].size() == 0){ //no files return; } + //add the folders to the cache + boolean added = false; + for (Iterator it = pyFilesBelow[1].iterator(); it.hasNext();) { + File f = (File) it.next(); + if(!added){ + cache.addFolder(f); + added = true; + }else{ + cache.addFolder(f, f.getParentFile()); + } + } + + //now that we have the file information, we have to get the // coverage information on these files and *************** *** 73,86 **** //python coverage.py -r -m files.... ! String[] cmdLine = new String[4+ pyFilesBelow.size()]; cmdLine[0] = PydevPrefs.getDefaultInterpreter(); cmdLine[1] = profileScript; ! cmdLine[2] = "-r"; ! cmdLine[3] = "-m"; ! int i = 4; ! for (Iterator iter = pyFilesBelow.iterator(); iter.hasNext();) { ! cmdLine[i] = iter.next().toString(); ! i++; ! } Process p=null; --- 94,102 ---- //python coverage.py -r -m files.... ! String[] cmdLine = new String[3]; cmdLine[0] = PydevPrefs.getDefaultInterpreter(); cmdLine[1] = profileScript; ! cmdLine[2] = "-waitfor"; ! Process p=null; *************** *** 94,106 **** BufferedReader eIn = new BufferedReader(new InputStreamReader(p.getErrorStream()), bufsize); p.getOutputStream().close(); String str = ""; while ((str = eIn.readLine()) != null) { ! System.out.println("STDERR: " + str); //ignore this... } eIn.close(); while ((str = in.readLine()) != null) { ! System.out.println("STDOUT: " + str);//get the data... StringTokenizer tokenizer = new StringTokenizer(str); if(tokenizer.countTokens() ==5){ --- 110,129 ---- BufferedReader eIn = new BufferedReader(new InputStreamReader(p.getErrorStream()), bufsize); + String files = ""; + + for (Iterator iter = pyFilesBelow[0].iterator(); iter.hasNext();) { + files += iter.next().toString()+" "; + } + files += "\r"; + p.getOutputStream().write(files.getBytes()); p.getOutputStream().close(); String str = ""; while ((str = eIn.readLine()) != null) { ! // System.out.println("STDERR: " + str); //ignore this... } eIn.close(); while ((str = in.readLine()) != null) { ! // System.out.println("STDOUT: " + str);//get the data... StringTokenizer tokenizer = new StringTokenizer(str); if(tokenizer.countTokens() ==5){ *************** *** 115,120 **** if(strings[1].equals("Stmts") == false){ //information in the format: D:\dev_programs\test\test1.py 11 0 0% 1,2,4-23 ! System.out.println("VALID: " + str);//get the data... ! } } --- 138,144 ---- if(strings[1].equals("Stmts") == false){ //information in the format: D:\dev_programs\test\test1.py 11 0 0% 1,2,4-23 ! // System.out.println("VALID: " + str);//get the data... ! File f = new File(strings[0]); ! cache.addFile(f, f.getParentFile(), Integer.parseInt(strings[1]), Integer.parseInt(strings[2]), strings[4]); } } *************** *** 123,126 **** --- 147,151 ---- System.out.println("waiting"); p.waitFor(); + System.out.println("finished"); } catch (Exception e) { if(p!=null){ *************** *** 138,141 **** --- 163,187 ---- } + + /** + * + */ + public void clearInfo() { + try { + String profileScript; + profileScript = PythonRunnerConfig.getProfileScript(); + String[] cmdLine = new String[3]; + cmdLine[0] = PydevPrefs.getDefaultInterpreter(); + cmdLine[1] = profileScript; + cmdLine[2] = "-e"; + Process p = execute(cmdLine); + p.waitFor(); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(e); + } + + } + /** * @param cmdLine *************** *** 145,159 **** private Process execute(String[] cmdLine) throws IOException { Process p; - Properties properties = System.getProperties(); - Set set = properties.keySet(); ! String []envp = new String [set.size()]; ! int j = 0; ! for (Iterator iter = set.iterator(); iter.hasNext();) { ! Object element = (Object) iter.next(); ! envp[j] = element+"="+properties.getProperty(element.toString()).toString(); ! j++; ! } ! envp = PyCoverage.setCoverageFileEnviromentVariable(envp); p = Runtime.getRuntime().exec(cmdLine, envp); --- 191,196 ---- private Process execute(String[] cmdLine) throws IOException { Process p; ! String [] envp = PyCoverage.setCoverageFileEnviromentVariable(null); p = Runtime.getRuntime().exec(cmdLine, envp); *************** *** 162,185 **** - /** * * @param file */ ! private List getPyFilesBelow(File file) { List filesToReturn = new ArrayList(); if (file.exists() == true) { if (file.isDirectory()) { ! File[] files = file.listFiles(new FileFilter() { ! ! public boolean accept(File pathname) { ! return pathname.isDirectory() || pathname.toString().endsWith(".py"); ! } ! ! }); for (int i = 0; i < files.length; i++) { ! filesToReturn.addAll(getPyFilesBelow(files[i])); } } else if (file.isFile()) { --- 199,228 ---- /** + * Returns the directories and python files in a list. * * @param file + * @return tuple with files in pos 0 and folders in pos 1 */ ! public static List[] getPyFilesBelow(File file , FileFilter filter) { List filesToReturn = new ArrayList(); + List folders = new ArrayList(); if (file.exists() == true) { if (file.isDirectory()) { ! folders.add(file); ! File[] files = null; ! ! if(filter != null){ ! files = file.listFiles(filter); ! }else{ ! files = file.listFiles(); ! } ! for (int i = 0; i < files.length; i++) { ! List[] below = getPyFilesBelow(files[i]); ! filesToReturn.addAll(below[0]); ! folders.addAll(below[1]); } } else if (file.isFile()) { *************** *** 187,191 **** } } ! return filesToReturn; } --- 230,252 ---- } } ! return new List[]{filesToReturn, folders}; ! ! } ! ! /** ! * Returns the directories and python files in a list. ! * ! * @param file ! * @return tuple with files in pos 0 and folders in pos 1 ! */ ! public static List[] getPyFilesBelow(File file) { ! FileFilter filter = new FileFilter() { ! ! public boolean accept(File pathname) { ! return pathname.isDirectory() || pathname.toString().endsWith(".py"); ! } ! ! }; ! return getPyFilesBelow(file, filter); } *************** *** 216,219 **** --- 277,294 ---- */ public static String[] setCoverageFileEnviromentVariable(String[] envp) { + if(envp == null){ + Properties properties = System.getProperties(); + Set set = properties.keySet(); + + envp = new String [set.size()]; + int j = 0; + for (Iterator iter = set.iterator(); iter.hasNext();) { + Object element = (Object) iter.next(); + envp[j] = element+"="+properties.getProperty(element.toString()).toString(); + j++; + } + + } + boolean added = false; *************** *** 234,256 **** } - /** - * - */ - public void clearInfo() { - try { - String profileScript; - profileScript = PythonRunnerConfig.getProfileScript(); - String[] cmdLine = new String[3]; - cmdLine[0] = PydevPrefs.getDefaultInterpreter(); - cmdLine[1] = profileScript; - cmdLine[2] = "-e"; - Process p = execute(cmdLine); - p.waitFor(); - } catch (Exception e) { - e.printStackTrace(); - throw new RuntimeException(e); - } - - } } \ No newline at end of file --- 309,312 ---- Index: CoverageCache.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage/CoverageCache.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CoverageCache.java 15 Oct 2004 12:09:53 -0000 1.1 --- CoverageCache.java 15 Oct 2004 19:53:28 -0000 1.2 *************** *** 45,54 **** */ public void addFolder(Object node, Object parent) { ! FolderNode parentNode = (FolderNode) folders.get(parent); FolderNode newNode = new FolderNode(); newNode.node = node; if(parentNode == null){ ! throw new RuntimeException("The folder being added didn't have its parent found."); } --- 45,54 ---- */ public void addFolder(Object node, Object parent) { ! FolderNode parentNode = (FolderNode) getFolder(parent); FolderNode newNode = new FolderNode(); newNode.node = node; if(parentNode == null){ ! throw new RuntimeException("The folder being added:"+node.toString()+" didn't have its parent found."); } *************** *** 57,60 **** --- 57,85 ---- } + public Object getFolder(Object obj){ + return getIt(obj,folders); + } + + public Object getFile(Object obj){ + return getIt(obj,files); + } + + /** + * @param obj + * @return + */ + private Object getIt(Object obj, Map m) { + Object object = m.get(obj); + if (object == null){ + for (Iterator iter = m.keySet().iterator(); iter.hasNext();) { + Object element = (Object) iter.next(); + if(element.equals(obj)){ + return m.get(element); + } + } + } + return object; + } + /** * *************** *** 66,70 **** */ public void addFile(Object node, Object parent, int stmts, int exec, String notExecuted) { ! FolderNode folderNode = (FolderNode) folders.get(parent); if (folderNode == null){ --- 91,95 ---- */ public void addFile(Object node, Object parent, int stmts, int exec, String notExecuted) { ! FolderNode folderNode = (FolderNode) getFolder(parent); if (folderNode == null){ *************** *** 83,89 **** public List getFiles(Object node){ ! FolderNode folderNode = (FolderNode) folders.get(node); if (folderNode == null){ ! FileNode fileNode = (FileNode) files.get(node); if (fileNode == null){ throw new RuntimeException("The node has not been found: "+node.toString()); --- 108,114 ---- public List getFiles(Object node){ ! FolderNode folderNode = (FolderNode) getFolder(node); if (folderNode == null){ ! FileNode fileNode = (FileNode) getFile(node); if (fileNode == null){ throw new RuntimeException("The node has not been found: "+node.toString()); *************** *** 157,160 **** --- 182,194 ---- return buffer.toString(); } + + /** + * + */ + public void clear() { + folders.clear(); + files.clear(); + + } --- NEW FILE: RunManyDialog.java --- /* * Created on Oct 15, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; /** * @author Fabio Zadrozny */ public class RunManyDialog extends Dialog{ private String root; public Text textRootFolder; public Text textFilesThatMatch; public Text textWorkingDir; public Text textInterpreter; public String rootFolder; public String files; public String interpreter; public String working; /** * @param parentShell */ public RunManyDialog(Shell parentShell, String root) { super(parentShell); setShellStyle(getShellStyle() | SWT.RESIZE); this.root = root; } protected Control createDialogArea(Composite parent) { // create a composite with standard margins and spacing Composite composite = (Composite) super.createDialogArea(parent); GridData layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; Label label = new Label(composite, 0); label.setText("Root folder:"); label.setLayoutData(layoutData); layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; textRootFolder = new Text(composite, SWT.SINGLE); textRootFolder.setText(root); textRootFolder.setLayoutData(layoutData); //------- layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; Label label2 = new Label(composite, 0); label2.setText("Files that match:"); label2.setLayoutData(layoutData); layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; textFilesThatMatch = new Text(composite, SWT.SINGLE); textFilesThatMatch.setText("test*.py"); textFilesThatMatch.setLayoutData(layoutData); //-------- layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; Label label3 = new Label(composite, 0); label3.setText("Working Dir:"); label3.setLayoutData(layoutData); layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; textWorkingDir = new Text(composite, SWT.SINGLE); textWorkingDir.setText(this.root); textWorkingDir.setLayoutData(layoutData); //------- layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; Label label4 = new Label(composite, 0); label4.setText("Interpreter"); label4.setLayoutData(layoutData); layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; textInterpreter = new Text(composite, SWT.SINGLE); textInterpreter.setText("python"); textInterpreter.setLayoutData(layoutData); return composite; } /* (non-Javadoc) * @see org.eclipse.jface.dialogs.Dialog#okPressed() */ protected void okPressed() { rootFolder = textRootFolder.getText(); files = textFilesThatMatch.getText(); interpreter = textInterpreter.getText(); working = textWorkingDir.getText(); // TODO Auto-generated method stub super.okPressed(); } } |
From: Fabio Z. <fa...@us...> - 2004-10-15 19:53:45
|
Update of /cvsroot/pydev/org.python.pydev.debug/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13540/icons Added Files: reddot.GIF Log Message: making code coverage. --- NEW FILE: reddot.GIF --- (This appears to be a binary file; contents omitted.) |
From: Fabio Z. <fa...@us...> - 2004-10-15 19:53:45
|
Update of /cvsroot/pydev/org.python.pydev.debug/pysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13540/pysrc Modified Files: coverage.py Added Files: .cvsignore Log Message: making code coverage. --- NEW FILE: .cvsignore --- .coverage Index: coverage.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/pysrc/coverage.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** coverage.py 13 Oct 2004 19:49:37 -0000 1.2 --- coverage.py 15 Oct 2004 19:53:27 -0000 1.3 *************** *** 30,33 **** --- 30,37 ---- Erase collected coverage data. + coverage.py -waitfor + it's the same as -r -m, but... + goes to a raw_input() and waits for the files that should be executed... + coverage.py -r [-m] FILE1 FILE2 ... Report on the statement coverage for the given files. With the -m *************** *** 134,138 **** '-m': 'show-missing', '-r': 'report', ! '-x': 'execute', } short_opts = string.join(map(lambda o: o[1:], optmap.keys()), '') --- 138,142 ---- '-m': 'show-missing', '-r': 'report', ! '-x': 'execute' } short_opts = string.join(map(lambda o: o[1:], optmap.keys()), '') *************** *** 534,537 **** --- 538,555 ---- # Command-line interface. if __name__ == '__main__': + # it's the same as -r -m, but... + # goes to a raw_input() and waits for the files that should be executed... + + if len(sys.argv) == 2: + if '-waitfor' == sys.argv[1]: + sys.argv.remove('-waitfor') + sys.argv.append('-r') + sys.argv.append('-m') + s = raw_input() + s = s.replace('\r', '') + s = s.replace('\n', '') + files = s.split(' ') + sys.argv += files + the_coverage.command_line() |
From: Fabio Z. <fa...@us...> - 2004-10-15 19:53:45
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/ui/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13540/src/org/python/pydev/debug/ui/actions Added Files: PythonRunSubsetActionDelegate.java Log Message: making code coverage. --- NEW FILE: PythonRunSubsetActionDelegate.java --- /* * Created on Oct 15, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.ui.actions; import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.core.resources.IFolder; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.window.Window; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.actions.ActionDelegate; import org.python.pydev.debug.codecoverage.PyCoverage; import org.python.pydev.debug.codecoverage.RunManyDialog; /** * @author Fabio Zadrozny */ public class PythonRunSubsetActionDelegate extends ActionDelegate implements IObjectActionDelegate { private IWorkbenchPart part; private IFolder selectedFolder; public void run(IAction action) { if (part != null && selectedFolder != null) { // figure out run or debug mode RunManyDialog dialog = new RunManyDialog(part.getSite().getShell(), selectedFolder.getLocation().toString()); if(dialog.open() == Window.OK){ String root = dialog.rootFolder; String files = dialog.files; String interpreter = dialog.interpreter; String workingDir = dialog.working; List list = listFilesThatMatch(root, files); for (Iterator iter = list.iterator(); iter.hasNext();) { System.out.println(iter.next()); //TODO: execute those files with the coverage script. //we have to get the output for the user.. } } } } /** * @param root * @param files */ private List listFilesThatMatch(String root, final String filesFilter) { List l = new ArrayList(); File file = new File(root); if(file.exists()){ FileFilter filter = new FileFilter() { public boolean accept(File pathname) { return pathname.isDirectory() == false && pathname.getName().matches(filesFilter); } }; l = PyCoverage.getPyFilesBelow(file, filter)[0]; } return l; } /* * (non-Javadoc) * * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, * org.eclipse.ui.IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { this.part = targetPart; } public void selectionChanged(IAction action, ISelection selection) { selectedFolder = null; if (selection instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selection; if (structuredSelection.size() == 1) { Object selectedResource = structuredSelection.getFirstElement(); if (selectedResource instanceof IFolder) selectedFolder = (IFolder) selectedResource; } } } } |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:10:04
|
Update of /cvsroot/pydev/org.python.pydev.debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1948 Modified Files: .classpath Log Message: Index: .classpath =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/.classpath,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .classpath 29 Mar 2004 17:03:25 -0000 1.3 --- .classpath 15 Oct 2004 12:09:54 -0000 1.4 *************** *** 1,7 **** <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry kind="src" path="src/"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> ! <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> ! <classpathentry kind="output" path="bin"/> </classpath> --- 1,9 ---- <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry kind="src" path="src/"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> ! <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> ! <classpathentry kind="src" path="tests"/> ! <classpathentry sourcepath="ECLIPSE_HOME/plugins/org.eclipse.jdt.source_3.0.0/src/org.junit_3.8.1/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/> ! <classpathentry kind="output" path="bin"/> </classpath> |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:10:04
|
Update of /cvsroot/pydev/org.python.pydev.debug/src/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1948/src/org/python/pydev/debug/codecoverage Added Files: CoverageCache.java FolderNode.java FileNode.java Log Message: --- NEW FILE: FolderNode.java --- /* * Created on Oct 15, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; import java.util.HashMap; import java.util.Map; /** * @author Fabio Zadrozny */ public class FolderNode { public Map subFolders = new HashMap(); public Map files = new HashMap(); public Object node; } --- NEW FILE: CoverageCache.java --- /* * Created on Oct 14, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; /** * * The structure is as follows: * * folders: contains a link to all the folder nodes. * files: contains a link to all the file nodes. * * the folder contains a structure that allows us to get folder nodes that are below it. * * @author Fabio Zadrozny */ public class CoverageCache { public Map folders = new HashMap(); public Map files = new HashMap(); /** * * @param node */ public void addFolder(Object node) { FolderNode c = new FolderNode(); c.node = node; folders.put(node, c); } /** * * @param node * @param parent */ public void addFolder(Object node, Object parent) { FolderNode parentNode = (FolderNode) folders.get(parent); FolderNode newNode = new FolderNode(); newNode.node = node; if(parentNode == null){ throw new RuntimeException("The folder being added didn't have its parent found."); } parentNode.subFolders.put(node, newNode); folders.put(node, newNode); } /** * * @param node * @param parent * @param stmts * @param exec * @param notExecuted */ public void addFile(Object node, Object parent, int stmts, int exec, String notExecuted) { FolderNode folderNode = (FolderNode) folders.get(parent); if (folderNode == null){ throw new RuntimeException("A file node MUST have a related folder node."); } FileNode fileNode = new FileNode(); fileNode.exec = exec; fileNode.node = node; fileNode.notExecuted = notExecuted; fileNode.stmts = stmts; folderNode.files.put(node, fileNode); files.put(node, fileNode); } public List getFiles(Object node){ FolderNode folderNode = (FolderNode) folders.get(node); if (folderNode == null){ FileNode fileNode = (FileNode) files.get(node); if (fileNode == null){ throw new RuntimeException("The node has not been found: "+node.toString()); } ArrayList list = new ArrayList(); list.add(fileNode); return list; } //we have a folder node. ArrayList list = new ArrayList(); recursivelyFillList(folderNode, list); return list; } /** * @param folderNode * @param list */ private void recursivelyFillList(FolderNode folderNode, ArrayList list) { //add its files for (Iterator it = folderNode.files.values().iterator(); it.hasNext();) { list.add(it.next()); } //get its sub folders for (Iterator it = folderNode.subFolders.values().iterator(); it.hasNext();) { recursivelyFillList((FolderNode) it.next(), list); } } /** * * @param node * @return an Object such that the positions contain: * 0 - string representing the data received, such as: * * Name Stmts Exec Cover Missing * --------------------------------------------- * file_to_test 7 6 85% 8 * file_to_test2 13 9 69% 12-14, 17 * --------------------------------------------- * TOTAL 20 15 75% * */ public String getStatistics(Object node) { List list = getFiles(node); //array of FileNode StringBuffer buffer = new StringBuffer(); //40 chars for name. buffer.append("Name Stmts Exec Cover Missing\n"); buffer.append("-----------------------------------------------------------------------------\n"); int totalExecuted = 0; int totalStmts = 0; for (Iterator it = list.iterator(); it.hasNext();) { FileNode element = (FileNode) it.next(); buffer.append(element.toString()+"\n"); totalExecuted += element.exec; totalStmts += element.stmts; } buffer.append("-----------------------------------------------------------------------------\n"); buffer.append(FileNode.toString("TOTAL",totalStmts, totalExecuted, "")+"\n"); return buffer.toString(); } } --- NEW FILE: FileNode.java --- /* * Created on Oct 15, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; import java.text.DecimalFormat; /** * @author Fabio Zadrozny */ public class FileNode { public Object node; public int stmts; public int exec; public String notExecuted; /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if(!(obj instanceof FileNode)){ return false; } FileNode f = (FileNode) obj; return f.node.equals(node) && f.exec == exec && f.notExecuted.equals(notExecuted) && f.stmts == stmts; } /* (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { return FileNode.toString(node.toString(), stmts, exec, notExecuted); } public static String toString(String str, int stmts, int exec, String notExecuted) { return getName(str) + " " +getStmts(stmts)+" "+exec+" "+calcCover(stmts, exec) +" "+notExecuted; } public static String getName(String str){ if(str.length() > 40){ str = str.substring(str.length()-37, str.length()); str = ".. "+str; } while (str.length() < 40){ str += " "; } return str; } public static String getStmts(int stmts){ String str = stmts+""; while (str.length() < 4){ str += " "; } return str; } public static String getExec(int exec){ String str = exec+""; while (str.length() < 4){ str += " "; } return str; } public static String calcCover( int stmts, int exec){ double v = ((double)exec) / ((double)stmts) * 100.0; DecimalFormat format = new DecimalFormat("##.#"); String str = format.format(v); str += "%"; while (str.length() < 5){ str += " "; } return str; } } |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:10:04
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1948/tests/org/python/pydev/debug/codecoverage Added Files: CoverageCacheTest.java Log Message: --- NEW FILE: CoverageCacheTest.java --- /* * Created on Oct 14, 2004 * * @author Fabio Zadrozny */ package org.python.pydev.debug.codecoverage; import java.util.List; import junit.framework.TestCase; /** * @author Fabio Zadrozny */ public class CoverageCacheTest extends TestCase { private CoverageCache cache; public static void main(String[] args) { junit.textui.TestRunner.run(CoverageCacheTest.class); } /* * @see TestCase#setUp() */ protected void setUp() throws Exception { super.setUp(); cache = new CoverageCache(); } /* * @see TestCase#tearDown() */ protected void tearDown() throws Exception { super.tearDown(); } public void testAddRoot(){ String folder1 = "a"; //all files String folder2 = "a.b"; //no files String folder3 = "a.c"; //file3 and file4 + file5 String folder4 = "a.c.d"; //only file5 String file1 = "b"; String file2 = "c"; String file3 = "d"; String file4 = "e"; String file5 = "fgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg"; cache.addFolder(folder1); cache.addFolder(folder2, folder1); cache.addFolder(folder3, folder1); cache.addFolder(folder4, folder3); cache.addFile(file1, folder1, 20,10, "6-10"); cache.addFile(file2, folder1, 22,10, "6-10"); cache.addFile(file3, folder3, 24,10, "6-10"); cache.addFile(file4, folder3, 26,10, "6-10"); cache.addFile(file5, folder4, 28,10, "6-10"); List folder1files = cache.getFiles(folder1); assertEquals(5, folder1files.size()); List folder2files = cache.getFiles(folder2); assertEquals(0, folder2files.size()); List folder3files = cache.getFiles(folder3); assertEquals(3, folder3files.size()); List folder4files = cache.getFiles(folder4); assertEquals(1, folder4files.size()); assertEquals(folder4files, cache.getFiles(file5)); System.out.println(cache.getStatistics(folder1)); } } |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:52
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests/org Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests/org added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:52
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests/org/python/pydev/debug Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:52
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug/codecoverage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests/org/python/pydev/debug/codecoverage Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev/debug/codecoverage added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:52
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests/org/python/pydev Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests/org/python/pydev added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:51
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests/org/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests/org/python Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests/org/python added to the repository |
From: Fabio Z. <fa...@us...> - 2004-10-15 12:09:51
|
Update of /cvsroot/pydev/org.python.pydev.debug/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1886/tests Log Message: Directory /cvsroot/pydev/org.python.pydev.debug/tests added to the repository |