mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote branch 'origin/master'
This commit is contained in:
@@ -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%
|
||||
|
||||
|
||||
@@ -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=$?
|
||||
|
||||
@@ -308,6 +308,7 @@
|
||||
<completion.contributor language="Python"
|
||||
implementationClass="com.jetbrains.python.codeInsight.completion.PyClassNameCompletionContributor"/>
|
||||
<weigher key="completion" implementationClass="com.jetbrains.python.codeInsight.completion.PythonCompletionWeigher" order="first"/>
|
||||
<completion.confidence language="Python" implementationClass="com.jetbrains.python.codeInsight.completion.PyCompletionConfidence"/>
|
||||
<typedHandler implementation="com.jetbrains.python.console.completion.PythonConsoleAutopopupBlockingHandler" id="pydevBlockAutoPopup"
|
||||
order="first, before completionAutoPopup"/>
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class PyCodeStyleSettingsProvider extends CodeStyleSettingsProvider {
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
return null;
|
||||
return "reference.settingsdialog.codestyle.python";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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<IntroduceHandler.InitPlace> 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);
|
||||
|
||||
Reference in New Issue
Block a user