[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor PyEditConfiguration.java,1.12,1.13
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-07-16 15:31:29
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3697/src/org/python/pydev/editor Modified Files: PyEditConfiguration.java Log Message: Changed so that we always get python indentation strategy. (even on comments). Index: PyEditConfiguration.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/PyEditConfiguration.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PyEditConfiguration.java 2 Jul 2004 02:50:38 -0000 1.12 --- PyEditConfiguration.java 16 Jul 2004 15:31:20 -0000 1.13 *************** *** 19,24 **** import org.eclipse.jface.text.TextAttribute; import org.eclipse.jface.text.TextPresentation; - import org.eclipse.jface.text.contentassist.ContentAssistant; - import org.eclipse.jface.text.contentassist.IContentAssistProcessor; import org.eclipse.jface.text.contentassist.IContentAssistant; import org.eclipse.jface.text.presentation.IPresentationReconciler; --- 19,22 ---- *************** *** 38,42 **** import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.graphics.Color; - import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; --- 36,39 ---- *************** *** 80,93 **** /** * Cache the result, because we'll get asked for it multiple times ! * * @return PyAutoIndentStrategy which deals with spaces/tabs */ public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer,String contentType) { ! if (autoIndentStrategy == null) autoIndentStrategy = new PyAutoIndentStrategy(); ! if (contentType == null || contentType.equals(IDocument.DEFAULT_CONTENT_TYPE)) ! return autoIndentStrategy; ! else ! return super.getAutoIndentStrategy(sourceViewer, contentType); } --- 77,88 ---- /** * Cache the result, because we'll get asked for it multiple times ! * Now, we always return the PyAutoIndentStrategy. (even on commented lines). * @return PyAutoIndentStrategy which deals with spaces/tabs */ public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer,String contentType) { ! if (autoIndentStrategy == null){ autoIndentStrategy = new PyAutoIndentStrategy(); ! } ! return autoIndentStrategy; } |