Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(15) |
2
(4) |
3
(6) |
4
|
5
|
6
|
7
(38) |
8
(35) |
9
(39) |
10
(20) |
11
(7) |
12
(7) |
13
(14) |
14
(3) |
15
(4) |
16
(1) |
17
|
18
(3) |
19
(4) |
20
(2) |
21
(10) |
22
(22) |
23
(2) |
24
(28) |
25
(17) |
26
(53) |
27
(4) |
28
(18) |
29
(5) |
30
|
|
From: Fabio Zadrozny <fabioz@us...> - 2006-06-29 17:36:53
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1554 Modified Files: Changes.txt Log Message: Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** Changes.txt 27 Jun 2006 00:25:33 -0000 1.116 --- Changes.txt 29 Jun 2006 17:36:49 -0000 1.117 *************** *** 1,3 **** --- 1,10 ---- + after 1.2.1 + + Pydev: + - Getting in completions for the pattern a,b,c=range(3) inside a class + - Errors getting the tests to run are no longer suppressed + + after 1.2.0 |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-29 17:36:48
|
Update of /cvsroot/pydev/org.python.pydev.debug/pysrc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1526/pysrc Modified Files: runfiles.py Log Message: Index: runfiles.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.debug/pysrc/runfiles.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** runfiles.py 4 May 2006 15:39:24 -0000 1.6 --- runfiles.py 29 Jun 2006 17:36:43 -0000 1.7 *************** *** 176,186 **** system_path = SystemPath(sys.path) for name in names: ! try: ! module = ImportModule(ModuleName(name, system_path)) ! tests = loader.loadTestsFromModule(module) ! alltests.append(tests) ! except: ! #ok, unable to load the module (probably has not __init__.py in its folder structure) ! pass print 'done.' --- 176,182 ---- system_path = SystemPath(sys.path) for name in names: ! module = ImportModule(ModuleName(name, system_path)) ! tests = loader.loadTestsFromModule(module) ! alltests.append(tests) print 'done.' |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-29 12:15:41
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11022/tests/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionWithoutBuiltinsTest.java Log Message: Changes for getting the class completions defined in the format class A: a,b,c = range(3) Index: PythonCompletionWithoutBuiltinsTest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/editor/codecompletion/PythonCompletionWithoutBuiltinsTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PythonCompletionWithoutBuiltinsTest.java 22 Jun 2006 14:19:56 -0000 1.3 --- PythonCompletionWithoutBuiltinsTest.java 29 Jun 2006 12:15:34 -0000 1.4 *************** *** 138,141 **** --- 138,153 ---- } + public void testClassAttrs() throws CoreException, BadLocationException{ + String s; + s = ""+ + "class A:\n" + + " aa, bb, cc = range(3)\n" + //the heuristic to find the attrs (class HeuristicFindAttrs) was not getting this + " dd = 1\n" + + " def m1(self):\n" + + " self."; + requestCompl(s, s.length(), -1, new String[] { "aa", "bb", "cc", "dd"}); + } + + public void testInnerImport() throws CoreException, BadLocationException{ String s; |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-29 12:15:38
|
Update of /cvsroot/pydev/org.python.pydev/tests/pysrc2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11022/tests/pysrc2 Added Files: .cvsignore Log Message: Changes for getting the class completions defined in the format class A: a,b,c = range(3) --- NEW FILE: .cvsignore --- *.astdelta |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-29 12:15:38
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/visitors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11022/src/org/python/pydev/editor/codecompletion/revisited/visitors Modified Files: HeuristicFindAttrs.java Log Message: Changes for getting the class completions defined in the format class A: a,b,c = range(3) Index: HeuristicFindAttrs.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/visitors/HeuristicFindAttrs.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HeuristicFindAttrs.java 7 Jun 2006 16:54:40 -0000 1.8 --- HeuristicFindAttrs.java 29 Jun 2006 12:15:34 -0000 1.9 *************** *** 15,18 **** --- 15,20 ---- import org.python.pydev.parser.jython.ast.Name; import org.python.pydev.parser.jython.ast.NameTok; + import org.python.pydev.parser.jython.ast.Tuple; + import org.python.pydev.parser.jython.ast.exprType; /** *************** *** 148,153 **** visitAttribute((Attribute)node.targets[i]); ! } ! else if(node.targets[i] instanceof Name && inFuncDef == false){ String id = ((Name)node.targets[i]).id; if(id != null){ --- 150,154 ---- visitAttribute((Attribute)node.targets[i]); ! }else if(node.targets[i] instanceof Name && inFuncDef == false){ String id = ((Name)node.targets[i]).id; if(id != null){ *************** *** 155,158 **** --- 156,171 ---- } + }else if(node.targets[i] instanceof Tuple && inFuncDef == false){ + //that's for finding the definition: a,b,c = range(3) inside a class definition + Tuple tuple = (Tuple) node.targets[i]; + for(exprType t :tuple.elts){ + if(t instanceof Name){ + String id = ((Name)t).id; + if(id != null){ + addToken(t); + } + } + } + } } |
From: Sean Handley <seanlh@us...> - 2006-06-28 20:30:50
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23747/src/org/python/pydev/core/docutils Modified Files: Tag: SoC_2006 WordUtils.java Log Message: |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 20:00:38
|
Update of /cvsroot/pydev/org.python.pydev.site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9512 Modified Files: site.xml Log Message: Index: site.xml =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.site/site.xml,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** site.xml 19 Jun 2006 15:38:51 -0000 1.46 --- site.xml 28 Jun 2006 20:00:33 -0000 1.47 *************** *** 5,9 **** --- 5,12 ---- </description> + <feature url="features/org.python.pydev.feature_1.2.1.jar" id="org.python.pydev.feature" version="1.2.1"/> + <!-- Removed because it did not put Eclipse 3.2 as a pre-condition. <feature url="features/org.python.pydev.feature_1.2.0.jar" id="org.python.pydev.feature" version="1.2.0"/> + --> <feature url="features/org.python.pydev.feature_1.1.0.jar" id="org.python.pydev.feature" version="1.1.0"/> <feature url="features/org.python.pydev.feature_1.0.8.jar" id="org.python.pydev.feature" version="1.0.8"/> |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:35
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873 Modified Files: Tag: SoC_2006 Changes.txt Log Message: Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.100.2.9 retrieving revision 1.100.2.10 diff -C2 -d -r1.100.2.9 -r1.100.2.10 *** Changes.txt 26 Jun 2006 20:02:44 -0000 1.100.2.9 --- Changes.txt 28 Jun 2006 19:30:29 -0000 1.100.2.10 *************** *** 3,15 **** Pydev: - Go to previous method now works with decorators ! - Stack-trace did not open in correct line when external files were opened ! - The user is asked for which paths should be added to the system pythonpath (this has to be added to the manual. ! It references http://fabioz.com/pydev/manual_101_interpreter.html) - Variables now show in the variables view while debugging ! - If an invalid interpreter is selected to run a file (old interpreter or wrong project type), a warning is given. ! - Ctrl+w is removed as the default for select word (the action is still there, but there is no keybinding for it, so, users ! have to configure themselves which keybinding they want for it) - Assign to local or field variable now enters in linked mode after 1.1.0 --- 3,17 ---- Pydev: + - The user is asked for which paths should be added to the system pythonpath - Go to previous method now works with decorators ! - Stack-trace link now opens in correct line for external files - Variables now show in the variables view while debugging ! - If an invalid interpreter is selected to run a file (old interpreter or wrong project type), a warning is given to the user ! - Ctrl+w is removed as the default for select word (the action is still there, but its keybinding is removed, so, users have to configure themselves which keybinding they want for it) - Assign to local or field variable now enters in linked mode + - Added dependency to Eclipse 3.2 features, as version 1.2.0 of pydev and newer are only Eclipse 3.2 compatible. + + Pydev Extensions: + - Bug-Fixes after 1.1.0 |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:33
|
Update of /cvsroot/pydev/org.python.pydev/tests/org/python/pydev/runners In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/tests/org/python/pydev/runners Added Files: Tag: SoC_2006 SimpleExeRunnerTest.java Log Message: --- NEW FILE: SimpleExeRunnerTest.java --- /* * Created on Jun 25, 2006 * @author Fabio */ package org.python.pydev.runners; import java.util.ArrayList; import java.util.List; import org.python.pydev.core.TestDependent; import org.python.pydev.core.Tuple; import org.python.pydev.editor.codecompletion.revisited.CodeCompletionTestsBase; /** * Extends CodeCompletionTestsBase so that we have the bundle set for getting the environment. */ public class SimpleExeRunnerTest extends CodeCompletionTestsBase{ protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testIt() throws Exception { if(TestDependent.HAS_CYGWIN){ SimpleExeRunner runner = new SimpleExeRunner(); Tuple<String, String> tup = runner.runAndGetOutput(TestDependent.CYGWIN_CYGPATH_LOCATION, new String[]{TestDependent.CYGWIN_CYGPATH_LOCATION}, null); assertEquals(TestDependent.CYGWIN_UNIX_CYGPATH_LOCATION, tup.o1.trim()); assertEquals("", tup.o2); } } public void testIt2() throws Exception { SimpleExeRunner runner = new SimpleExeRunner(); List<String> ret = runner.convertToCygwinPath(TestDependent.CYGWIN_CYGPATH_LOCATION, TestDependent.CYGWIN_CYGPATH_LOCATION, "c:\\foo"); assertEquals(2, ret.size()); ArrayList<String> expected = new ArrayList<String>(); expected.add(TestDependent.CYGWIN_UNIX_CYGPATH_LOCATION); expected.add("/cygdrive/c/foo"); assertEquals(expected, ret); } } |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:32
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/src/org/python/pydev/editor/codecompletion Modified Files: Tag: SoC_2006 CompletionRequest.java PythonCompletionProcessor.java PyCodeCompletion.java Log Message: Index: CompletionRequest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/CompletionRequest.java,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -C2 -d -r1.10.2.1 -r1.10.2.2 *** CompletionRequest.java 24 Jun 2006 21:56:34 -0000 1.10.2.1 --- CompletionRequest.java 28 Jun 2006 19:30:29 -0000 1.10.2.2 *************** *** 92,96 **** /** ! * The lenght of the qualifier (== qualifier.length() */ public int qlen; --- 92,96 ---- /** ! * The lenght of the qualifier (== qualifier.length()) */ public int qlen; *************** *** 100,102 **** --- 100,116 ---- */ public PyCodeCompletion codeCompletion; + + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + buffer.append("CompletionRequest["); + buffer.append(" editorFile:"); + buffer.append(editorFile); + buffer.append(" activationToken:"); + buffer.append(activationToken); + buffer.append(" qualifier:"); + buffer.append(qualifier); + buffer.append("]"); + return buffer.toString(); + } } \ No newline at end of file Index: PyCodeCompletion.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletion.java,v retrieving revision 1.64.2.3 retrieving revision 1.64.2.4 diff -C2 -d -r1.64.2.3 -r1.64.2.4 *** PyCodeCompletion.java 25 Jun 2006 14:57:46 -0000 1.64.2.3 --- PyCodeCompletion.java 28 Jun 2006 19:30:29 -0000 1.64.2.4 *************** *** 31,34 **** --- 31,35 ---- import org.python.pydev.core.bundle.ImageCache; import org.python.pydev.core.docutils.DocUtils; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.codecompletion.revisited.ASTManager; import org.python.pydev.editor.codecompletion.revisited.CompletionRecursionException; *************** *** 54,57 **** --- 55,67 ---- public class PyCodeCompletion { + + /** + * This constant is used to debug the code-completion process on a production environment, + * so that we gather enough information about what's happening and the possible reasons + * for some bug (at this moment this is being specifically added because of a halting bug + * for pydev in linux: https://sourceforge.net/tracker/index.php?func=detail&aid=1509582&group_id=85796&atid=577329) + */ + public static final boolean DEBUG_CODE_COMPLETION = false; + /** * Type for unknown. *************** *** 161,166 **** * @throws BadLocationException */ public List getCodeCompletionProposals(ITextViewer viewer, CompletionRequest request) throws CoreException, BadLocationException { ! ArrayList ret = new ArrayList(); try { --- 171,181 ---- * @throws BadLocationException */ + @SuppressWarnings("unchecked") public List getCodeCompletionProposals(ITextViewer viewer, CompletionRequest request) throws CoreException, BadLocationException { ! if(DEBUG_CODE_COMPLETION){ ! Log.toLogFile(this,"Starting getCodeCompletionProposals"); ! Log.addLogLevel(); ! Log.toLogFile(this,"Request:"+request); ! } ArrayList ret = new ArrayList(); try { *************** *** 176,182 **** --- 191,203 ---- List theList = new ArrayList(); try { + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"AbstractShell.getServerShell"); + } if (CompiledModule.COMPILED_MODULES_ENABLED) { AbstractShell.getServerShell(request.nature, AbstractShell.COMPLETION_SHELL); //just start it } + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"END AbstractShell.getServerShell"); + } } catch (Exception e) { throw new RuntimeException(e); *************** *** 229,233 **** --- 250,262 ---- state.activationToken = request.activationToken; + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"astManager.getCompletionsForToken"); + Log.addLogLevel(); + } IToken[] comps = astManager.getCompletionsForToken(request.editorFile, request.doc, state); + if(DEBUG_CODE_COMPLETION){ + Log.remLogLevel(); + Log.toLogFile(this,"END astManager.getCompletionsForToken"); + } theList.addAll(Arrays.asList(comps)); *************** *** 240,247 **** --- 269,283 ---- ret.add(new CompletionProposal("",request.documentOffset,0,0,null,e.getMessage(), null,null)); } + + if(DEBUG_CODE_COMPLETION){ + Log.remLogLevel(); + Log.toLogFile(this, "Finished completion. Returned:"+ret.size()+" completions."); + Log.toLogFile(""); + } return ret; } + @SuppressWarnings("unchecked") private Collection getGlobalsFromParticipants(CompletionRequest request, ICompletionState state) { ArrayList ret = new ArrayList(); *************** *** 295,298 **** --- 331,335 ---- * Get self completions when you already have a scope */ + @SuppressWarnings("unchecked") public static IToken[] getSelfCompletions(Scope scope, CompletionRequest request, List theList, CompletionState state, boolean getOnlySupers) throws BadLocationException { IToken[] comps = new IToken[0]; *************** *** 357,361 **** * @param importsTip */ ! private void changeItokenToCompletionPropostal(ITextViewer viewer, CompletionRequest request, List convertedProposals, List iTokenList, boolean importsTip) { //TODO: check org.eclipse.jface.text.templates.TemplateCompletionProcessor to see how to do custom 'selections' in completions // int offset = request.documentOffset; --- 394,398 ---- * @param importsTip */ ! private void changeItokenToCompletionPropostal(ITextViewer viewer, CompletionRequest request, List<ICompletionProposal> convertedProposals, List iTokenList, boolean importsTip) { //TODO: check org.eclipse.jface.text.templates.TemplateCompletionProcessor to see how to do custom 'selections' in completions // int offset = request.documentOffset; *************** *** 432,436 **** }else if(obj instanceof ICompletionProposal){ //no need to convert ! convertedProposals.add(obj); } --- 469,473 ---- }else if(obj instanceof ICompletionProposal){ //no need to convert ! convertedProposals.add((ICompletionProposal) obj); } *************** *** 634,637 **** --- 671,675 ---- * @return */ + @SuppressWarnings("unchecked") public ICompletionProposal[] onlyValidSorted(List pythonAndTemplateProposals, String qualifier) { //FOURTH: Now, we have all the proposals, only thing is deciding wich ones are valid (depending on Index: PythonCompletionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonCompletionProcessor.java,v retrieving revision 1.33.2.8 retrieving revision 1.33.2.9 diff -C2 -d -r1.33.2.8 -r1.33.2.9 *** PythonCompletionProcessor.java 25 Jun 2006 14:57:45 -0000 1.33.2.8 --- PythonCompletionProcessor.java 28 Jun 2006 19:30:29 -0000 1.33.2.9 *************** *** 64,67 **** --- 64,68 ---- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int) */ + @SuppressWarnings("unchecked") public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ICompletionProposal[] proposals; *************** *** 73,77 **** //list for storing the proposals ! ArrayList pythonAndTemplateProposals = new ArrayList(); --- 74,78 ---- //list for storing the proposals ! ArrayList<ICompletionProposal> pythonAndTemplateProposals = new ArrayList<ICompletionProposal>(); |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:32
|
Update of /cvsroot/pydev/org.python.pydev/tests/pysrc2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/tests/pysrc2 Removed Files: Tag: SoC_2006 0.astdelta Log Message: --- 0.astdelta DELETED --- |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:32
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/src/org/python/pydev/runners Modified Files: Tag: SoC_2006 SimpleRunner.java SimplePythonRunner.java SimpleJythonRunner.java Added Files: Tag: SoC_2006 SimpleExeRunner.java Log Message: --- NEW FILE: SimpleExeRunner.java --- /* * Created on Jun 25, 2006 * @author Fabio */ package org.python.pydev.runners; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.eclipse.core.resources.IProject; import org.python.pydev.core.Tuple; import org.python.pydev.core.docutils.StringUtils; public class SimpleExeRunner extends SimpleRunner{ @Override public Tuple<String, String> runAndGetOutput(String script, String[] args, File workingDir, IProject project) { String executionString = getCommandLineAsString(new String[]{script}, args); return runAndGetOutput(executionString, workingDir, project); } /** * Some notes on what has to be converted for cygwin: * - cygwin will accept both formats for the script * - PYTHONPATH, the paths MUST be in cygwin format * - In python, internally, all needs to be in cygwin paths. * * below are the 'interactive' execution of python to validate what's written above. * * 1. cygwin will accept both formats for the script: * * >>c:\bin\cygwin\bin\python2.4.exe c:\temp\test.py * worked * >>c:\bin\cygwin\bin\python2.4.exe /cygdrive/c/temp/test.py * worked * * * 2. Now, for the pythonpath, the paths MUST be in cygwin format: * * >>set pythonpath="c:/temp" * * >>c:\bin\cygwin\bin\python2.4.exe /cygdrive/c/temp/test.py * /cygdrive/c/temp * /cygdrive/c/bin/4nt600/"c << yeap, here is the error. I have no idea why it happens. * /temp" * /usr/lib/python24.zip * ... * * >>set pythonpath="/cygdrive/c/temp" * * >>c:\bin\cygwin\bin\python2.4.exe /cygdrive/c/temp/test.py * /cygdrive/c/temp * /cygdrive/c/bin/"/cygdrive/c/temp" * /usr/lib/python24.zip * ... * * * In python, internally, all needs to be in cygwin paths: * print os.path.abspath(os.path.curdir) * will return /cygwin/c/bin * * @param cygpathLoc the cygpath.exe location * @param paths the windows paths to be converted to cygwin. * @return a list of changed paths converted to cygwin. */ public List<String> convertToCygwinPath(String cygpathLoc, String ... paths){ for (int i = 0; i < paths.length; i++) { paths[i] = StringUtils.replaceAllSlashes(paths[i]); } ArrayList<String> ret = new ArrayList<String>(); Tuple<String, String> output = runAndGetOutput(cygpathLoc, paths, (File)null, (IProject)null); if(output.o2 != null && output.o2.length() > 0){ throw new RuntimeException("Error converting windows paths to cygwin paths: "+output.o2+".\nCygpath location:"+cygpathLoc); } if(output.o1 == null || output.o1.length() == 0){ throw new RuntimeException("Unable to get the output.\nCygpath location:"+cygpathLoc); } StringTokenizer tokenizer = new StringTokenizer(output.o1, "\r\n"); while(tokenizer.hasMoreTokens()){ String tok = tokenizer.nextToken(); ret.add(tok.trim()); } return ret; } } Index: SimpleRunner.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimpleRunner.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** SimpleRunner.java 11 Jan 2006 10:57:39 -0000 1.12 --- SimpleRunner.java 28 Jun 2006 19:30:28 -0000 1.12.2.1 *************** *** 15,18 **** --- 15,19 ---- import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; + import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Platform; *************** *** 95,98 **** --- 96,100 ---- * @return a map with the env variables for the system */ + @SuppressWarnings("unchecked") private Map<String,String> getDefaultSystemEnv(DebugPlugin defaultPlugin) throws CoreException { if(defaultPlugin != null){ *************** *** 289,295 **** * @param monitor this is the monitor used to communicate the progress to the user * ! * @return the string that is the output of the process (stdout). */ ! public abstract Tuple<String,String> runAndGetOutput(String executionString, File workingDir, IProject project, IProgressMonitor monitor); /** --- 291,354 ---- * @param monitor this is the monitor used to communicate the progress to the user * ! * @return the string that is the output of the process (stdout) and the stderr (o2) */ ! public Tuple<String,String> runAndGetOutput(String executionString, File workingDir, IProject project, IProgressMonitor monitor) { ! monitor.setTaskName("Executing: "+executionString); ! monitor.worked(5); ! Process process = null; ! try { ! monitor.setTaskName("Making pythonpath environment..."+executionString); ! String[] envp = getEnvironment(project); ! monitor.setTaskName("Making exec..."+executionString); ! process = Runtime.getRuntime().exec(executionString, envp, workingDir); ! } catch (Exception e) { ! throw new RuntimeException(e); ! } ! ! if (process != null) { ! ! try { ! process.getOutputStream().close(); //we won't write to it... ! } catch (IOException e2) { ! } ! ! monitor.setTaskName("Reading output..."); ! monitor.worked(5); ! ThreadStreamReader std = new ThreadStreamReader(process.getInputStream()); ! ThreadStreamReader err = new ThreadStreamReader(process.getErrorStream()); ! ! std.start(); ! err.start(); ! ! ! try { ! monitor.setTaskName("Waiting for process to finish."); ! monitor.worked(5); ! process.waitFor(); //wait until the process completion. ! } catch (InterruptedException e1) { ! throw new RuntimeException(e1); ! } ! ! try { ! //just to see if we get something after the process finishes (and let the other threads run). ! synchronized (this) { ! this.wait(50); ! } ! } catch (Exception e) { ! //ignore ! } ! return new Tuple<String, String>(std.contents.toString(), err.contents.toString()); ! ! } else { ! try { ! throw new CoreException(PydevPlugin.makeStatus(IStatus.ERROR, "Error creating process - got null process(" ! + executionString + ")", new Exception("Error creating process - got null process."))); ! } catch (CoreException e) { ! PydevPlugin.log(IStatus.ERROR, e.getMessage(), e); ! } ! ! } ! return new Tuple<String, String>("","Error creating process - got null process("+ executionString + ")"); //no output ! } /** Index: SimpleJythonRunner.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimpleJythonRunner.java,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -C2 -d -r1.15.2.1 -r1.15.2.2 *** SimpleJythonRunner.java 24 Jun 2006 21:56:35 -0000 1.15.2.1 --- SimpleJythonRunner.java 28 Jun 2006 19:30:29 -0000 1.15.2.2 *************** *** 8,14 **** import org.eclipse.core.resources.IProject; - import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; - import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.python.copiedfromeclipsesrc.JavaVmLocationFinder; --- 8,12 ---- *************** *** 19,85 **** public class SimpleJythonRunner extends SimpleRunner{ - /** - * This is the method that actually does the running (all others are just 'shortcuts' to this one). - * - * @param executionString this is the string that will be executed - * @param workingDir this is the directory where the execution will happen - * @param project this is the project that is related to the run (it is used to get the environment for the shell we are going to - * execute with the correct pythonpath environment variable). - * @param monitor this is the monitor used to communicate the progress to the user - * - * @return the string that is the output of the process (stdout). - */ - public Tuple<String,String> runAndGetOutput(String executionString, File workingDir, IProject project, IProgressMonitor monitor) { - monitor.setTaskName("Executing: "+executionString); - monitor.worked(5); - Process process = null; - try { - monitor.setTaskName("Making pythonpath environment..."); - String[] envp = getEnvironment(project); - monitor.setTaskName("Making exec."); - process = Runtime.getRuntime().exec(executionString, envp, workingDir); - } catch (Exception e) { - throw new RuntimeException(e); - } - - if (process != null) { - - try { - process.getOutputStream().close(); //we won't write to it... - } catch (IOException e2) { - } - - monitor.setTaskName("Reading output..."); - monitor.worked(5); - ThreadStreamReader std = new ThreadStreamReader(process.getInputStream()); - ThreadStreamReader err = new ThreadStreamReader(process.getErrorStream()); - - std.start(); - err.start(); - - - try { - monitor.setTaskName("Waiting for process to finish."); - monitor.worked(5); - process.waitFor(); //wait until the process completion. - } catch (InterruptedException e1) { - throw new RuntimeException(e1); - } - - final String stdout = std.contents.toString(); - final String stderr = err.contents.toString(); - return new Tuple<String,String>(stdout, stderr); - - } else { - try { - throw new CoreException(PydevPlugin.makeStatus(IStatus.ERROR, "Error creating python process - got null process(" - + executionString + ")", new Exception("Error creating python process - got null process."))); - } catch (CoreException e) { - PydevPlugin.log(IStatus.ERROR, e.getMessage(), e); - } - - } - return new Tuple<String,String>("", "Error creating python process - got null process("+ executionString + ")"); //no output - } public Tuple<String,String> runAndGetOutputWithJar(String script, String jythonJar, String args, File workingDir, IProject project, IProgressMonitor monitor) { --- 17,20 ---- Index: SimplePythonRunner.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/runners/SimplePythonRunner.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** SimplePythonRunner.java 10 Mar 2006 19:26:31 -0000 1.8 --- SimplePythonRunner.java 28 Jun 2006 19:30:29 -0000 1.8.2.1 *************** *** 8,17 **** import java.io.File; - import java.io.IOException; import org.eclipse.core.resources.IProject; - import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; - import org.eclipse.core.runtime.IStatus; import org.python.pydev.core.Tuple; import org.python.pydev.plugin.PydevPlugin; --- 8,14 ---- *************** *** 97,169 **** - /** - * This is the method that actually does the running (all others are just 'shortcuts' to this one). - * - * @param executionString this is the string that will be executed - * @param workingDir this is the directory where the execution will happen - * @param project this is the project that is related to the run (it is used to get the environment for the shell we are going to - * execute with the correct pythonpath environment variable). - * @param monitor this is the monitor used to communicate the progress to the user - * - * @return the string that is the output of the process (stdout) and the stderr (o2) - */ - public Tuple<String,String> runAndGetOutput(String executionString, File workingDir, IProject project, IProgressMonitor monitor) { - monitor.setTaskName("Executing: "+executionString); - monitor.worked(5); - Process process = null; - try { - monitor.setTaskName("Making pythonpath environment..."+executionString); - String[] envp = getEnvironment(project); - monitor.setTaskName("Making exec..."+executionString); - process = Runtime.getRuntime().exec(executionString, envp, workingDir); - } catch (Exception e) { - throw new RuntimeException(e); - } - - if (process != null) { - - try { - process.getOutputStream().close(); //we won't write to it... - } catch (IOException e2) { - } - - monitor.setTaskName("Reading output..."); - monitor.worked(5); - ThreadStreamReader std = new ThreadStreamReader(process.getInputStream()); - ThreadStreamReader err = new ThreadStreamReader(process.getErrorStream()); - - std.start(); - err.start(); - - - try { - monitor.setTaskName("Waiting for process to finish."); - monitor.worked(5); - process.waitFor(); //wait until the process completion. - } catch (InterruptedException e1) { - throw new RuntimeException(e1); - } - - try { - //just to see if we get something after the process finishes (and let the other threads run). - synchronized (this) { - this.wait(50); - } - } catch (Exception e) { - //ignore - } - return new Tuple<String, String>(std.contents.toString(), err.contents.toString()); - - } else { - try { - throw new CoreException(PydevPlugin.makeStatus(IStatus.ERROR, "Error creating python process - got null process(" - + executionString + ")", new Exception("Error creating python process - got null process."))); - } catch (CoreException e) { - PydevPlugin.log(IStatus.ERROR, e.getMessage(), e); - } - - } - return new Tuple<String, String>("","Error creating python process - got null process("+ executionString + ")"); //no output - } --- 94,97 ---- |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:32
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/src/org/python/pydev/editor/codecompletion/revisited Modified Files: Tag: SoC_2006 AbstractASTManager.java Log Message: Index: AbstractASTManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/AbstractASTManager.java,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** AbstractASTManager.java 9 Jun 2006 17:14:12 -0000 1.13.2.2 --- AbstractASTManager.java 28 Jun 2006 19:30:30 -0000 1.13.2.3 *************** *** 26,29 **** --- 26,30 ---- import org.python.pydev.core.REF; import org.python.pydev.core.Tuple; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.actions.PyAction; import org.python.pydev.editor.codecompletion.CompletionRequest; *************** *** 311,314 **** --- 312,318 ---- */ public IToken[] getCompletionsForModule(IModule module, ICompletionState state, boolean searchSameLevelMods) { + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getCompletionsForModule"); + } ArrayList<IToken> importedModules = new ArrayList<IToken>(); if(state.getLocalImportsGotten() == false){ *************** *** 529,532 **** --- 533,539 ---- */ public List getGlobalCompletions(IToken[] globalTokens, IToken[] importedModules, IToken[] wildImportedModules, ICompletionState state, IModule current) { + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getGlobalCompletions"); + } List<IToken> completions = new ArrayList<IToken>(); *************** *** 550,555 **** --- 557,568 ---- if(!state.getBuiltinsGotten()){ state.setBuiltinsGotten (true) ; + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getBuiltinCompletions"); + } //last thing: get completions from module __builtin__ getBuiltinCompletions(state, completions); + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "END getBuiltinCompletions"); + } } return completions; |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:32
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/shell In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28873/src/org/python/pydev/editor/codecompletion/shell Modified Files: Tag: SoC_2006 AbstractShell.java Log Message: Index: AbstractShell.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/shell/AbstractShell.java,v retrieving revision 1.29.2.1 retrieving revision 1.29.2.2 diff -C2 -d -r1.29.2.1 -r1.29.2.2 *** AbstractShell.java 9 Jun 2006 17:14:14 -0000 1.29.2.1 --- AbstractShell.java 28 Jun 2006 19:30:29 -0000 1.29.2.2 *************** *** 23,26 **** --- 23,27 ---- import org.python.pydev.core.IPythonNature; import org.python.pydev.core.Tuple; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.actions.refactoring.PyRefactorAction.Operation; import org.python.pydev.editor.codecompletion.PyCodeCompletion; *************** *** 69,76 **** private boolean isInOperation = false; ! private void dbg(Object string, int priority) { if(priority <= DEBUG_SHELL){ System.out.println(string); } } --- 70,80 ---- private boolean isInOperation = false; ! private void dbg(String string, int priority) { if(priority <= DEBUG_SHELL){ System.out.println(string); } + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, string); + } } |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:12
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28560/src/org/python/pydev/core/log Modified Files: Tag: SoC_2006 Log.java Log Message: Index: Log.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/log/Log.java,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** Log.java 26 Jun 2006 20:08:23 -0000 1.3.2.1 --- Log.java 28 Jun 2006 19:30:07 -0000 1.3.2.2 *************** *** 4,10 **** --- 4,13 ---- package org.python.pydev.core.log; + import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.python.pydev.core.CorePlugin; + import org.python.pydev.core.FullRepIterable; + import org.python.pydev.core.REF; *************** *** 40,42 **** --- 43,90 ---- } + + //------------ Log that writes to .metadata/.plugins/org.python.pydev.core/PydevLog.log + + private final static Object lock = new Object(); + private final static StringBuffer logIndent = new StringBuffer(); + + public synchronized static void toLogFile(Object obj, String string) { + synchronized(lock){ + StringBuffer buffer = new StringBuffer(); + buffer.append(logIndent); + buffer.append(FullRepIterable.getLastPart(obj.getClass().getName())); + buffer.append(": "); + buffer.append(string); + + toLogFile(buffer.toString()); + } + } + + public synchronized static void toLogFile(String buffer) { + synchronized(lock){ + try{ + IPath stateLocation = CorePlugin.getDefault().getStateLocation().append("PydevLog.log"); + String file = stateLocation.toOSString(); + REF.appendStrToFile(buffer+"\r\n", file); + }catch(Throwable e){ + log(e); //default logging facility + } + } + } + + public synchronized static void addLogLevel() { + synchronized(lock){ + logIndent.append(" "); + } + } + + public synchronized static void remLogLevel() { + synchronized(lock){ + if(logIndent.length() > 3){ + logIndent.delete(0,4); + } + } + } + + } |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:12
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28560/src/org/python/pydev/core/docutils Modified Files: Tag: SoC_2006 PySelection.java WordUtils.java Log Message: Index: PySelection.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/docutils/PySelection.java,v retrieving revision 1.18.2.3 retrieving revision 1.18.2.4 diff -C2 -d -r1.18.2.3 -r1.18.2.4 *** PySelection.java 26 Jun 2006 20:41:48 -0000 1.18.2.3 --- PySelection.java 28 Jun 2006 19:30:07 -0000 1.18.2.4 *************** *** 1029,1035 **** --- 1029,1037 ---- activationToken = tok+"()."+activationToken; documentOffset = documentOffset-tok.length()-1; + }else if(tok.length() > 0){ activationToken = tok+"."+activationToken; documentOffset = documentOffset-tok.length()-1; + }else{ break; |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:12
|
Update of /cvsroot/pydev/org.python.pydev.core/tests/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28560/tests/org/python/pydev/core Modified Files: Tag: SoC_2006 TestDependent.template Log Message: Index: TestDependent.template =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/tests/org/python/pydev/core/TestDependent.template,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -C2 -d -r1.6.2.1 -r1.6.2.2 *** TestDependent.template 26 Jun 2006 20:08:22 -0000 1.6.2.1 --- TestDependent.template 28 Jun 2006 19:30:08 -0000 1.6.2.2 *************** *** 15,20 **** public static final String PYTHON_NUMARRAY_PACKAGES="D:/bin/Python24/Lib/site-packages/numarray/"; - public static String CYGWIN_PYTHON_EXE="E:/install/Utils.Cygwin/bin/python2.4.exe"; - public static boolean HAS_CYGWIN = true; //NOTE: this should set to the tests pysrc location, so that it can be added to the pythonpath. --- 15,18 ---- *************** *** 40,42 **** --- 38,45 ---- public static final boolean HAS_NUMARRAY_INSTALLED = true; public static final boolean HAS_MX_DATETIME = false; + + public static boolean HAS_CYGWIN = false; + public static String CYGWIN_PYTHON_EXE="E:/install/Utils.Cygwin/bin/python2.4.exe"; + public static final String CYGWIN_CYGPATH_LOCATION = "c:/bin/cygwin/bin/cygpath.exe"; + public static final String CYGWIN_UNIX_CYGPATH_LOCATION = "/usr/bin/cygpath.exe"; } |
From: Sean Handley <seanlh@us...> - 2006-06-28 19:30:12
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28560/src/org/python/pydev/core Modified Files: Tag: SoC_2006 REF.java Log Message: Index: REF.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/REF.java,v retrieving revision 1.20.2.1 retrieving revision 1.20.2.2 diff -C2 -d -r1.20.2.1 -r1.20.2.2 *** REF.java 26 Jun 2006 20:08:21 -0000 1.20.2.1 --- REF.java 28 Jun 2006 19:30:07 -0000 1.20.2.2 *************** *** 221,224 **** --- 221,239 ---- } + public static void appendStrToFile(String str, String file) { + try { + FileOutputStream stream = new FileOutputStream(file, true); + try { + stream.write(str.getBytes()); + } finally{ + stream.close(); + } + } catch (FileNotFoundException e) { + Log.log(e); + } catch (IOException e) { + Log.log(e); + } + } + public static void writeStrToFile(String str, File file) { try { *************** *** 608,611 **** --- 623,627 ---- public static boolean LOG_ENCODING_ERROR = true; + } |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 00:40:12
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14342/src/org/python/pydev/editor/codecompletion/revisited Modified Files: AbstractASTManager.java Log Message: Added possibility of adding debug on a build for code-completion (see the debug constant on PyCodeCompletion) Index: AbstractASTManager.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/AbstractASTManager.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** AbstractASTManager.java 8 Jun 2006 18:15:22 -0000 1.18 --- AbstractASTManager.java 28 Jun 2006 00:40:07 -0000 1.19 *************** *** 26,29 **** --- 26,30 ---- import org.python.pydev.core.REF; import org.python.pydev.core.Tuple; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.actions.PyAction; import org.python.pydev.editor.codecompletion.CompletionRequest; *************** *** 311,314 **** --- 312,318 ---- */ public IToken[] getCompletionsForModule(IModule module, ICompletionState state, boolean searchSameLevelMods) { + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getCompletionsForModule"); + } ArrayList<IToken> importedModules = new ArrayList<IToken>(); if(state.getLocalImportsGotten() == false){ *************** *** 529,532 **** --- 533,539 ---- */ public List getGlobalCompletions(IToken[] globalTokens, IToken[] importedModules, IToken[] wildImportedModules, ICompletionState state, IModule current) { + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getGlobalCompletions"); + } List<IToken> completions = new ArrayList<IToken>(); *************** *** 550,555 **** --- 557,568 ---- if(!state.getBuiltinsGotten()){ state.setBuiltinsGotten (true) ; + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "getBuiltinCompletions"); + } //last thing: get completions from module __builtin__ getBuiltinCompletions(state, completions); + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, "END getBuiltinCompletions"); + } } return completions; |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 00:40:10
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/shell In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14342/src/org/python/pydev/editor/codecompletion/shell Modified Files: AbstractShell.java Log Message: Added possibility of adding debug on a build for code-completion (see the debug constant on PyCodeCompletion) Index: AbstractShell.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/shell/AbstractShell.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AbstractShell.java 8 Jun 2006 00:41:50 -0000 1.31 --- AbstractShell.java 28 Jun 2006 00:40:07 -0000 1.32 *************** *** 23,26 **** --- 23,27 ---- import org.python.pydev.core.IPythonNature; import org.python.pydev.core.Tuple; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.actions.refactoring.PyRefactorAction.Operation; import org.python.pydev.editor.codecompletion.PyCodeCompletion; *************** *** 69,76 **** private boolean isInOperation = false; ! private void dbg(Object string, int priority) { if(priority <= DEBUG_SHELL){ System.out.println(string); } } --- 70,80 ---- private boolean isInOperation = false; ! private void dbg(String string, int priority) { if(priority <= DEBUG_SHELL){ System.out.println(string); } + if(PyCodeCompletion.DEBUG_CODE_COMPLETION){ + Log.toLogFile(this, string); + } } |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 00:40:09
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14342/src/org/python/pydev/editor/codecompletion Modified Files: CompletionRequest.java PythonCompletionProcessor.java PyCodeCompletion.java Log Message: Added possibility of adding debug on a build for code-completion (see the debug constant on PyCodeCompletion) Index: CompletionRequest.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/CompletionRequest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CompletionRequest.java 22 Jun 2006 14:19:56 -0000 1.11 --- CompletionRequest.java 28 Jun 2006 00:40:06 -0000 1.12 *************** *** 92,96 **** /** ! * The lenght of the qualifier (== qualifier.length() */ public int qlen; --- 92,96 ---- /** ! * The lenght of the qualifier (== qualifier.length()) */ public int qlen; *************** *** 100,102 **** --- 100,116 ---- */ public PyCodeCompletion codeCompletion; + + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + buffer.append("CompletionRequest["); + buffer.append(" editorFile:"); + buffer.append(editorFile); + buffer.append(" activationToken:"); + buffer.append(activationToken); + buffer.append(" qualifier:"); + buffer.append(qualifier); + buffer.append("]"); + return buffer.toString(); + } } \ No newline at end of file Index: PyCodeCompletion.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletion.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** PyCodeCompletion.java 1 Jun 2006 22:17:59 -0000 1.65 --- PyCodeCompletion.java 28 Jun 2006 00:40:07 -0000 1.66 *************** *** 31,34 **** --- 31,35 ---- import org.python.pydev.core.bundle.ImageCache; import org.python.pydev.core.docutils.DocUtils; + import org.python.pydev.core.log.Log; import org.python.pydev.editor.codecompletion.revisited.ASTManager; import org.python.pydev.editor.codecompletion.revisited.CompletionRecursionException; *************** *** 54,57 **** --- 55,67 ---- public class PyCodeCompletion { + + /** + * This constant is used to debug the code-completion process on a production environment, + * so that we gather enough information about what's happening and the possible reasons + * for some bug (at this moment this is being specifically added because of a halting bug + * for pydev in linux: https://sourceforge.net/tracker/index.php?func=detail&aid=1509582&group_id=85796&atid=577329) + */ + public static final boolean DEBUG_CODE_COMPLETION = false; + /** * Type for unknown. *************** *** 161,166 **** * @throws BadLocationException */ public List getCodeCompletionProposals(ITextViewer viewer, CompletionRequest request) throws CoreException, BadLocationException { ! ArrayList ret = new ArrayList(); try { --- 171,181 ---- * @throws BadLocationException */ + @SuppressWarnings("unchecked") public List getCodeCompletionProposals(ITextViewer viewer, CompletionRequest request) throws CoreException, BadLocationException { ! if(DEBUG_CODE_COMPLETION){ ! Log.toLogFile(this,"Starting getCodeCompletionProposals"); ! Log.addLogLevel(); ! Log.toLogFile(this,"Request:"+request); ! } ArrayList ret = new ArrayList(); try { *************** *** 176,182 **** --- 191,203 ---- List theList = new ArrayList(); try { + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"AbstractShell.getServerShell"); + } if (CompiledModule.COMPILED_MODULES_ENABLED) { AbstractShell.getServerShell(request.nature, AbstractShell.COMPLETION_SHELL); //just start it } + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"END AbstractShell.getServerShell"); + } } catch (Exception e) { throw new RuntimeException(e); *************** *** 229,233 **** --- 250,262 ---- state.activationToken = request.activationToken; + if(DEBUG_CODE_COMPLETION){ + Log.toLogFile(this,"astManager.getCompletionsForToken"); + Log.addLogLevel(); + } IToken[] comps = astManager.getCompletionsForToken(request.editorFile, request.doc, state); + if(DEBUG_CODE_COMPLETION){ + Log.remLogLevel(); + Log.toLogFile(this,"END astManager.getCompletionsForToken"); + } theList.addAll(Arrays.asList(comps)); *************** *** 240,247 **** --- 269,283 ---- ret.add(new CompletionProposal("",request.documentOffset,0,0,null,e.getMessage(), null,null)); } + + if(DEBUG_CODE_COMPLETION){ + Log.remLogLevel(); + Log.toLogFile(this, "Finished completion. Returned:"+ret.size()+" completions."); + Log.toLogFile(""); + } return ret; } + @SuppressWarnings("unchecked") private Collection getGlobalsFromParticipants(CompletionRequest request, ICompletionState state) { ArrayList ret = new ArrayList(); *************** *** 295,298 **** --- 331,335 ---- * Get self completions when you already have a scope */ + @SuppressWarnings("unchecked") public static IToken[] getSelfCompletions(Scope scope, CompletionRequest request, List theList, CompletionState state, boolean getOnlySupers) throws BadLocationException { IToken[] comps = new IToken[0]; *************** *** 357,361 **** * @param importsTip */ ! private void changeItokenToCompletionPropostal(ITextViewer viewer, CompletionRequest request, List convertedProposals, List iTokenList, boolean importsTip) { //TODO: check org.eclipse.jface.text.templates.TemplateCompletionProcessor to see how to do custom 'selections' in completions // int offset = request.documentOffset; --- 394,398 ---- * @param importsTip */ ! private void changeItokenToCompletionPropostal(ITextViewer viewer, CompletionRequest request, List<ICompletionProposal> convertedProposals, List iTokenList, boolean importsTip) { //TODO: check org.eclipse.jface.text.templates.TemplateCompletionProcessor to see how to do custom 'selections' in completions // int offset = request.documentOffset; *************** *** 432,436 **** }else if(obj instanceof ICompletionProposal){ //no need to convert ! convertedProposals.add(obj); } --- 469,473 ---- }else if(obj instanceof ICompletionProposal){ //no need to convert ! convertedProposals.add((ICompletionProposal) obj); } *************** *** 634,637 **** --- 671,675 ---- * @return */ + @SuppressWarnings("unchecked") public ICompletionProposal[] onlyValidSorted(List pythonAndTemplateProposals, String qualifier) { //FOURTH: Now, we have all the proposals, only thing is deciding wich ones are valid (depending on Index: PythonCompletionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonCompletionProcessor.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PythonCompletionProcessor.java 8 Jun 2006 00:41:50 -0000 1.34 --- PythonCompletionProcessor.java 28 Jun 2006 00:40:06 -0000 1.35 *************** *** 64,67 **** --- 64,68 ---- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int) */ + @SuppressWarnings("unchecked") public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) { ICompletionProposal[] proposals; *************** *** 73,77 **** //list for storing the proposals ! ArrayList pythonAndTemplateProposals = new ArrayList(); --- 74,78 ---- //list for storing the proposals ! ArrayList<ICompletionProposal> pythonAndTemplateProposals = new ArrayList<ICompletionProposal>(); |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 00:39:54
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14321/src/org/python/pydev/core Modified Files: REF.java Log Message: Added possibility of adding debug on a build for code-completion (see the debug constant on PyCodeCompletion) Index: REF.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/REF.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** REF.java 9 Jun 2006 00:34:24 -0000 1.23 --- REF.java 28 Jun 2006 00:39:51 -0000 1.24 *************** *** 221,224 **** --- 221,239 ---- } + public static void appendStrToFile(String str, String file) { + try { + FileOutputStream stream = new FileOutputStream(file, true); + try { + stream.write(str.getBytes()); + } finally{ + stream.close(); + } + } catch (FileNotFoundException e) { + Log.log(e); + } catch (IOException e) { + Log.log(e); + } + } + public static void writeStrToFile(String str, File file) { try { *************** *** 608,611 **** --- 623,627 ---- public static boolean LOG_ENCODING_ERROR = true; + } |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-28 00:39:54
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14321/src/org/python/pydev/core/log Modified Files: Log.java Log Message: Added possibility of adding debug on a build for code-completion (see the debug constant on PyCodeCompletion) Index: Log.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/log/Log.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Log.java 30 May 2006 00:21:11 -0000 1.4 --- Log.java 28 Jun 2006 00:39:51 -0000 1.5 *************** *** 4,10 **** --- 4,13 ---- package org.python.pydev.core.log; + import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.python.pydev.core.CorePlugin; + import org.python.pydev.core.FullRepIterable; + import org.python.pydev.core.REF; *************** *** 40,42 **** --- 43,90 ---- } + + //------------ Log that writes to .metadata/.plugins/org.python.pydev.core/PydevLog.log + + private final static Object lock = new Object(); + private final static StringBuffer logIndent = new StringBuffer(); + + public synchronized static void toLogFile(Object obj, String string) { + synchronized(lock){ + StringBuffer buffer = new StringBuffer(); + buffer.append(logIndent); + buffer.append(FullRepIterable.getLastPart(obj.getClass().getName())); + buffer.append(": "); + buffer.append(string); + + toLogFile(buffer.toString()); + } + } + + public synchronized static void toLogFile(String buffer) { + synchronized(lock){ + try{ + IPath stateLocation = CorePlugin.getDefault().getStateLocation().append("PydevLog.log"); + String file = stateLocation.toOSString(); + REF.appendStrToFile(buffer+"\r\n", file); + }catch(Throwable e){ + log(e); //default logging facility + } + } + } + + public synchronized static void addLogLevel() { + synchronized(lock){ + logIndent.append(" "); + } + } + + public synchronized static void remLogLevel() { + synchronized(lock){ + if(logIndent.length() > 3){ + logIndent.delete(0,4); + } + } + } + + } |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-27 11:18:57
|
Update of /cvsroot/pydev/org.python.pydev.core/tests/org/python/pydev/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17447/tests/org/python/pydev/core Modified Files: TestDependent.template Log Message: Index: TestDependent.template =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/tests/org/python/pydev/core/TestDependent.template,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestDependent.template 31 May 2006 11:58:28 -0000 1.7 --- TestDependent.template 27 Jun 2006 11:18:54 -0000 1.8 *************** *** 15,20 **** public static final String PYTHON_NUMARRAY_PACKAGES="D:/bin/Python24/Lib/site-packages/numarray/"; - public static String CYGWIN_PYTHON_EXE="E:/install/Utils.Cygwin/bin/python2.4.exe"; - public static boolean HAS_CYGWIN = true; //NOTE: this should set to the tests pysrc location, so that it can be added to the pythonpath. --- 15,18 ---- *************** *** 40,42 **** --- 38,45 ---- public static final boolean HAS_NUMARRAY_INSTALLED = true; public static final boolean HAS_MX_DATETIME = false; + + public static boolean HAS_CYGWIN = false; + public static String CYGWIN_PYTHON_EXE="E:/install/Utils.Cygwin/bin/python2.4.exe"; + public static final String CYGWIN_CYGPATH_LOCATION = "c:/bin/cygwin/bin/cygpath.exe"; + public static final String CYGWIN_UNIX_CYGPATH_LOCATION = "/usr/bin/cygpath.exe"; } |
From: Fabio Zadrozny <fabioz@us...> - 2006-06-27 00:25:36
|
Update of /cvsroot/pydev/org.python.pydev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19508 Modified Files: Changes.txt Log Message: Index: Changes.txt =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/Changes.txt,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** Changes.txt 27 Jun 2006 00:14:00 -0000 1.115 --- Changes.txt 27 Jun 2006 00:25:33 -0000 1.116 *************** *** 3,15 **** Pydev: - - Go to previous method now works with decorators - - Stack-trace did not open in correct line when external files were opened - The user is asked for which paths should be added to the system pythonpath - Variables now show in the variables view while debugging ! - If an invalid interpreter is selected to run a file (old interpreter or wrong project type), a warning is given to the user. ! - Ctrl+w is removed as the default for select word (the action is still there, but there is no keybinding for it, so, users have to configure themselves which keybinding they want for it) - Assign to local or field variable now enters in linked mode ! Extensions: - Bug-Fixes --- 3,16 ---- Pydev: - The user is asked for which paths should be added to the system pythonpath + - Go to previous method now works with decorators + - Stack-trace link now opens in correct line for external files - Variables now show in the variables view while debugging ! - If an invalid interpreter is selected to run a file (old interpreter or wrong project type), a warning is given to the user ! - Ctrl+w is removed as the default for select word (the action is still there, but its keybinding is removed, so, users have to configure themselves which keybinding they want for it) - Assign to local or field variable now enters in linked mode + - Added dependency to Eclipse 3.2 features, as version 1.2.0 of pydev and newer are only Eclipse 3.2 compatible. ! Pydev Extensions: - Bug-Fixes |