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% 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=$? diff --git a/python/src/META-INF/python-plugin-common.xml b/python/src/META-INF/python-plugin-common.xml index 11d077074f83..28a1213b1eaa 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); + } +} 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"; } }; } 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);