Update of /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4313/src_completions/org/python/pydev/editor/codecompletion/templates
Modified Files:
PyDocumentTemplateContext.java
PyTemplateCompletionProcessor.java
Log Message:
Synching to latest changes:
Pydev
<ul>
<li><strong>Editor</strong>: Cursor settings no longer overridden</li>
<li><strong>Code-completion</strong>: If __all__ is defined with runtime elements (and not only in a single assign statement), it's ignored for code-completion purposes</li>
<li><strong>Debugger</strong>: Pythonpath the same in debug and regular modes (sys.path[0] is the same directory as the file run)</li>
<li><strong>Debugger</strong>: Persist choices done in the debugger when files from the debugger are not found</li>
<li><strong>Interpreter config</strong>: "email" automatically added to the "forced builtins"</li>
<li><strong>Parser</strong>: Correctly recognizing absolute import with 3 or more levels</li>
<li><strong>Syntax check</strong>: Option to do only on active editor</li>
</ul>
Also: tabs changed for spaces
Index: PyTemplateCompletionProcessor.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates/PyTemplateCompletionProcessor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyTemplateCompletionProcessor.java 3 Apr 2008 17:48:19 -0000 1.2
--- PyTemplateCompletionProcessor.java 28 Sep 2008 12:45:52 -0000 1.3
***************
*** 54,58 ****
*/
protected Image getImage(Template template) {
! return PydevPlugin.getImageCache().get(UIConstants.COMPLETION_TEMPLATE);
}
--- 54,58 ----
*/
protected Image getImage(Template template) {
! return PydevPlugin.getImageCache().get(UIConstants.COMPLETION_TEMPLATE);
}
Index: PyDocumentTemplateContext.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/templates/PyDocumentTemplateContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PyDocumentTemplateContext.java 28 Jul 2008 15:53:31 -0000 1.3
--- PyDocumentTemplateContext.java 28 Sep 2008 12:45:52 -0000 1.4
***************
*** 123,135 ****
int size = splitted.size();
if(size > 0){
!
FastStringBuffer buffer = new FastStringBuffer("", (pattern.length()+(size*2))+((size+1)*indentToStr.length()));
for (int i=0; i<size;i++) { //we don't want to get the first line
!
! if(i != 0){
! //the 1st line is not indented (that's where the user requested the completion -- others should be indented to it)
! buffer.append(indentToStr);
! }
!
String str = splitted.get(i);
--- 123,135 ----
int size = splitted.size();
if(size > 0){
!
FastStringBuffer buffer = new FastStringBuffer("", (pattern.length()+(size*2))+((size+1)*indentToStr.length()));
for (int i=0; i<size;i++) { //we don't want to get the first line
!
! if(i != 0){
! //the 1st line is not indented (that's where the user requested the completion -- others should be indented to it)
! buffer.append(indentToStr);
! }
!
String str = splitted.get(i);
***************
*** 138,152 ****
boolean hasNewLine = false;
if(str.endsWith("\r") || str.endsWith("\n")){
! hasNewLine = true;
! if(str.endsWith("\r\n")){
! str = str.substring(0, str.length()-2);
! }else{
! str = str.substring(0, str.length()-1);
! }
}
- buffer.append(str);
- if(hasNewLine){
- buffer.append(endLineDelim);
- }
}
//just to change the pattern...
--- 138,152 ----
boolean hasNewLine = false;
if(str.endsWith("\r") || str.endsWith("\n")){
! hasNewLine = true;
! if(str.endsWith("\r\n")){
! str = str.substring(0, str.length()-2);
! }else{
! str = str.substring(0, str.length()-1);
! }
! }
! buffer.append(str);
! if(hasNewLine){
! buffer.append(endLineDelim);
}
}
//just to change the pattern...
|