diff --git a/python/src/com/jetbrains/python/PyBundle.properties b/python/src/com/jetbrains/python/PyBundle.properties index 28b0d23f837b..b6299e1ffe3f 100644 --- a/python/src/com/jetbrains/python/PyBundle.properties +++ b/python/src/com/jetbrains/python/PyBundle.properties @@ -1,4 +1,4 @@ -### Generic words ### +f### Generic words ### GNAME.function=function GNAME.class=class GNAME.var=variable diff --git a/python/src/com/jetbrains/python/PythonModuleTypeBase.java b/python/src/com/jetbrains/python/PythonModuleTypeBase.java index 4a8056c378f3..73115756b36f 100644 --- a/python/src/com/jetbrains/python/PythonModuleTypeBase.java +++ b/python/src/com/jetbrains/python/PythonModuleTypeBase.java @@ -25,7 +25,7 @@ public abstract class PythonModuleTypeBase extends Modu } public String getDescription() { - return "Provides facilities for developing Python, Django and Google App Engine applications"; + return "Python modules are used for developing Python applications. Supported technologies include Django, Google App Engine, Mako, Jinja2 and others."; } public Icon getBigIcon() { diff --git a/python/src/com/jetbrains/python/debugger/PyDebugSupportUtils.java b/python/src/com/jetbrains/python/debugger/PyDebugSupportUtils.java index 95fd723422b8..b65457a3baa6 100644 --- a/python/src/com/jetbrains/python/debugger/PyDebugSupportUtils.java +++ b/python/src/com/jetbrains/python/debugger/PyDebugSupportUtils.java @@ -84,13 +84,20 @@ public class PyDebugSupportUtils { }); } - public static boolean isContinuationLine(@NotNull Document document, int line) { + @Nullable + private static String getLineText(@NotNull Document document, int line) { if (line > 0 && line < document.getLineCount()) { - String text = document.getText(TextRange.create(document.getLineStartOffset(line), document.getLineEndOffset(line))); - if (text.trim().endsWith("\\")) { - return true; - } + return document.getText(TextRange.create(document.getLineStartOffset(line), document.getLineEndOffset(line))); } + return null; + } + + public static boolean isContinuationLine(@NotNull Document document, int line) { + String text = getLineText(document, line); + if (text != null && text.trim().endsWith("\\")) { + return true; + } + return false; } } diff --git a/python/src/com/jetbrains/python/debugger/PySmartStepIntoHandler.java b/python/src/com/jetbrains/python/debugger/PySmartStepIntoHandler.java index 7048a2ba1125..1f461264f96f 100644 --- a/python/src/com/jetbrains/python/debugger/PySmartStepIntoHandler.java +++ b/python/src/com/jetbrains/python/debugger/PySmartStepIntoHandler.java @@ -16,7 +16,6 @@ import com.jetbrains.python.PyBundle; import com.jetbrains.python.psi.PyCallExpression; import com.jetbrains.python.psi.PyElement; import com.jetbrains.python.psi.PyExpression; -import com.jetbrains.python.psi.PyFunction; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -40,14 +39,15 @@ public class PySmartStepIntoHandler extends XSmartStepIntoHandler variants = Lists.newArrayList(); final Set visitedCalls = Sets.newHashSet(); - final Set addedFunctions = Sets.newHashSet(); - XDebuggerUtil.getInstance().iterateLine(mySession.getProject(), document, position.getLine(), new Processor() { + final int line = position.getLine(); + XDebuggerUtil.getInstance().iterateLine(mySession.getProject(), document, line, new Processor() { public boolean process(PsiElement psiElement) { - addVariants(psiElement, variants, visitedCalls, addedFunctions); + addVariants(document, line, psiElement, variants, visitedCalls); return true; } }); + return variants; } @@ -60,15 +60,16 @@ public class PySmartStepIntoHandler extends XSmartStepIntoHandler variants, - Set visited, - Set addedFunctions) { + Set visited) { if (element == null) return; final PyCallExpression expression = PsiTreeUtil.getParentOfType(element, PyCallExpression.class); - if (expression != null && visited.add(expression)) { - addVariants(expression.getParent(), variants, visited, addedFunctions); + if (expression != null && + expression.getTextRange().getEndOffset() <= document.getLineEndOffset(line) && + visited.add(expression)) { + addVariants(document, line, expression.getParent(), variants, visited); PyExpression ref = expression.getCallee(); variants.add(new PySmartStepIntoVariant(ref));