From d44cc1f8caca33a2b78b01d38bf6b99d9f5b2fbc Mon Sep 17 00:00:00 2001 From: Denis Zhdanov Date: Wed, 11 May 2011 19:39:18 +0400 Subject: [PATCH 1/4] IDEA-69153 Editor: Improve performance of caret movement via arrow keys Explicitly added 'sun.java2d.d3d=false' property as our Windows users reported that editor sometimes performs rather bad even with 'sun.java2d.noddraw=true' (see comments to the ticket) --- python/build/idea.properties | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/build/idea.properties b/python/build/idea.properties index 60d25822ce71..5c76204e9b5a 100644 --- a/python/build/idea.properties +++ b/python/build/idea.properties @@ -53,6 +53,11 @@ idea.popup.weight=heavy #---------------------------------------------------------------------- sun.java2d.noddraw=true +#---------------------------------------------------------------------- +# Removing this property may lead to editor performance degradation under Windows. +#---------------------------------------------------------------------- +sun.java2d.d3d=false + #----------------------------------------------------------------------- # PyCharm copies library jars to prevent their locking. If copying is not desirable, specify "true" #----------------------------------------------------------------------- From 19c166d8e075784c586d094a9f9c47fb4721fe47 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Wed, 11 May 2011 18:28:24 +0400 Subject: [PATCH 2/4] Fixed condition. --- python/helpers/pydev/pydevd_frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/helpers/pydev/pydevd_frame.py b/python/helpers/pydev/pydevd_frame.py index fc224500464a..6c7168d88f45 100644 --- a/python/helpers/pydev/pydevd_frame.py +++ b/python/helpers/pydev/pydevd_frame.py @@ -38,7 +38,7 @@ class PyDBFrame: can_skip = False - if len(always_exception_set): + if not always_exception_set: if info.pydev_state == STATE_RUN: #we can skip if: #- we have no stop marked From 8a36e3d7bab260c91f44c4262ede3f28dfbda772 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Wed, 11 May 2011 19:21:00 +0400 Subject: [PATCH 3/4] Version inquire shouldn't raise errors even if it fails (PY-3522). --- .../com/jetbrains/python/sdk/PythonSdkFlavor.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java b/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java index 96e7b28db1ab..cd5417fdefbe 100644 --- a/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java +++ b/python/src/com/jetbrains/python/sdk/PythonSdkFlavor.java @@ -2,6 +2,7 @@ package com.jetbrains.python.sdk; import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.execution.process.ProcessOutput; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; @@ -16,6 +17,8 @@ import java.util.regex.Pattern; * @author yole */ public abstract class PythonSdkFlavor { + private static final Logger LOG = Logger.getInstance(PythonSdkFlavor.class); + public static String appendSystemPythonPath(String pythonPath) { String syspath = systemPythonPath(); if (syspath != null) { @@ -73,16 +76,24 @@ public abstract class PythonSdkFlavor { return file.isFile() && FileUtil.getNameWithoutExtension(file).toLowerCase().startsWith("python"); } + @Nullable public String getVersionString(String sdkHome) { return getVersionFromOutput(sdkHome, "-V", "(Python \\S+).*", false); } + @Nullable protected static String getVersionFromOutput(String sdkHome, String version_opt, String version_regexp, boolean stdout) { Pattern pattern = Pattern.compile(version_regexp); String run_dir = new File(sdkHome).getParent(); final ProcessOutput process_output = SdkUtil.getProcessOutput(run_dir, new String[]{sdkHome, version_opt}); if (process_output.getExitCode() != 0) { - throw new RuntimeException(process_output.getStderr() + " (exit code " + process_output.getExitCode() + ")"); + String err = process_output.getStderr(); + if (StringUtil.isEmpty(err)) { + err = process_output.getStdout(); + } + LOG.warn("Couldn't get interpreter version: process exited with code " + process_output.getExitCode() + "\n" + err + ); + return null; } final List lines = stdout ? process_output.getStdoutLines() : process_output.getStderrLines(); return SdkUtil.getFirstMatch(lines, pattern); From 7611cba18cd51a99bb29c6ab831854f69f1e9a7e Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Fri, 13 May 2011 11:50:49 +0400 Subject: [PATCH 4/4] changed role annotator for not defined roles to role inspection --- python/src/META-INF/python-plugin-common.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/python/src/META-INF/python-plugin-common.xml b/python/src/META-INF/python-plugin-common.xml index 91c4bbbc2f32..ba0b3bab0b6d 100644 --- a/python/src/META-INF/python-plugin-common.xml +++ b/python/src/META-INF/python-plugin-common.xml @@ -480,6 +480,7 @@ +