From 8551fcaabb82fe2214dd0c9c7305438eebafa783 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 7 Oct 2011 11:22:12 +0200 Subject: [PATCH 1/5] don't show a single radio button in dialog (PY-4687) --- .../python/refactoring/introduce/PyIntroduceDialog.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/src/com/jetbrains/python/refactoring/introduce/PyIntroduceDialog.java b/python/src/com/jetbrains/python/refactoring/introduce/PyIntroduceDialog.java index d8c55a5f6a7f..778c1dcb8d3a 100644 --- a/python/src/com/jetbrains/python/refactoring/introduce/PyIntroduceDialog.java +++ b/python/src/com/jetbrains/python/refactoring/introduce/PyIntroduceDialog.java @@ -55,7 +55,6 @@ public class PyIntroduceDialog extends DialogWrapper { myHelpId = helpId; setUpNameComboBox(operation.getSuggestedNames()); - setModal(true); setTitle(caption); init(); setupDialog(operation.getAvailableInitPlaces()); @@ -104,12 +103,12 @@ public class PyIntroduceDialog extends DialogWrapper { private void setupDialog(EnumSet availableInitPlaces) { myReplaceAll.setMnemonic(KeyEvent.VK_A); myNameLabel.setLabelFor(myNameComboBox); - myPlaceSelector.setVisible(availableInitPlaces.size() > 0); + myPlaceSelector.setVisible(availableInitPlaces.size() > 1); myConstructor.setVisible(availableInitPlaces.contains(IntroduceHandler.InitPlace.CONSTRUCTOR)); mySetUp.setVisible(availableInitPlaces.contains(IntroduceHandler.InitPlace.SET_UP)); mySamePlace.setSelected(true); - // Replace occurences check box setup + // Replace occurrences check box setup if (myOccurrencesCount > 1) { myReplaceAll.setSelected(false); myReplaceAll.setEnabled(true); From 92a2ec7f0eb5326924ec69078134010fbbf71834 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 7 Oct 2011 11:27:07 +0200 Subject: [PATCH 2/5] help topic (PY-4665) --- .../jetbrains/python/formatter/PyCodeStyleSettingsProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/formatter/PyCodeStyleSettingsProvider.java b/python/src/com/jetbrains/python/formatter/PyCodeStyleSettingsProvider.java index 46c80001125e..aa10645c932e 100644 --- a/python/src/com/jetbrains/python/formatter/PyCodeStyleSettingsProvider.java +++ b/python/src/com/jetbrains/python/formatter/PyCodeStyleSettingsProvider.java @@ -28,7 +28,7 @@ public class PyCodeStyleSettingsProvider extends CodeStyleSettingsProvider { } public String getHelpTopic() { - return null; + return "reference.settingsdialog.codestyle.python"; } }; } From a8ed64600c573ef6da0a61598811976a0e17f50d Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 7 Oct 2011 14:34:43 +0200 Subject: [PATCH 3/5] skip completion popup in floating point literal (PY-4316) --- python/src/META-INF/python-plugin-common.xml | 1 + .../completion/PyCompletionConfidence.java | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 python/src/com/jetbrains/python/codeInsight/completion/PyCompletionConfidence.java diff --git a/python/src/META-INF/python-plugin-common.xml b/python/src/META-INF/python-plugin-common.xml index 8a9f5d081434..ccac71b7c593 100644 --- a/python/src/META-INF/python-plugin-common.xml +++ b/python/src/META-INF/python-plugin-common.xml @@ -308,6 +308,7 @@ + diff --git a/python/src/com/jetbrains/python/codeInsight/completion/PyCompletionConfidence.java b/python/src/com/jetbrains/python/codeInsight/completion/PyCompletionConfidence.java new file mode 100644 index 000000000000..eb8a249b3341 --- /dev/null +++ b/python/src/com/jetbrains/python/codeInsight/completion/PyCompletionConfidence.java @@ -0,0 +1,37 @@ +package com.jetbrains.python.codeInsight.completion; + +import com.intellij.codeInsight.completion.CompletionConfidence; +import com.intellij.codeInsight.completion.CompletionParameters; +import com.intellij.lang.ASTNode; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; +import com.intellij.util.ThreeState; +import com.jetbrains.python.PyTokenTypes; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * @author yole + */ +public class PyCompletionConfidence extends CompletionConfidence { + @NotNull + @Override + public ThreeState shouldFocusLookup(@NotNull CompletionParameters parameters) { + return ThreeState.UNSURE; + } + + @NotNull + @Override + public ThreeState shouldSkipAutopopup(@Nullable PsiElement contextElement, @NotNull PsiFile psiFile, int offset) { + if (offset > 0) { + PsiElement element = psiFile.findElementAt(offset-1); + if (element != null) { + ASTNode node = element.getNode(); + if (node != null && node.getElementType() == PyTokenTypes.FLOAT_LITERAL) { + return ThreeState.YES; + } + } + } + return super.shouldSkipAutopopup(contextElement, psiFile, offset); + } +} From b3abc4a66ec7bd3338c04e6a20d75d929fcf47ae Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 7 Oct 2011 17:11:08 +0200 Subject: [PATCH 4/5] Same "No JRE check" policy --- python/build/pycharm.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build/pycharm.bat b/python/build/pycharm.bat index 789a02eaecba..0a8a2c15380e 100644 --- a/python/build/pycharm.bat +++ b/python/build/pycharm.bat @@ -35,7 +35,7 @@ SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\pycharm.exe.vmoptions SET ACC= FOR /F "usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i" -SET REQUIRED_JVM_ARGS="-Xbootclasspath/a:%IDE_HOME%/lib/boot.jar" -Didea.paths.selector=@@system_selector@@ %IDE_PROPERTIES_PROPERTY% +SET REQUIRED_JVM_ARGS="-Xbootclasspath/a:%IDE_HOME%/lib/boot.jar" -Didea.no.jre.check=true -Didea.paths.selector=@@system_selector@@ %IDE_PROPERTIES_PROPERTY% SET SPECIAL_JVM_ARGS=-Didea.platform.prefix=Python SET JVM_ARGS=%ACC% %REQUIRED_JVM_ARGS% %SPECIAL_JVM_ARGS% %REQUIRED_PYCHARM_JVM_ARGS% From 9ef8a1a28616bf08635bb006a39a00ffc279f734 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Fri, 7 Oct 2011 19:29:51 +0200 Subject: [PATCH 5/5] IDEA-74625 (secure temp file creation in a startup scripts) --- python/build/pycharm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/build/pycharm.sh b/python/build/pycharm.sh index 275e72cf2fe3..2636fedec522 100644 --- a/python/build/pycharm.sh +++ b/python/build/pycharm.sh @@ -52,7 +52,7 @@ if [ -z "$JDK" ]; then fi fi -VERSION_LOG='/tmp/java.version.log' +VERSION_LOG=`mktemp -t java.version.log.XXXX` $JDK/bin/java -version 2> $VERSION_LOG grep 'OpenJDK' $VERSION_LOG OPEN_JDK=$?