GitOrigin-RevId: 39ae2c7c2957c9a30335fc42ebe24612e1d3853d
This commit is contained in:
Semyon Proshev
2020-04-01 13:40:30 +03:00
committed by intellij-monorepo-bot
parent 089a8f5055
commit 00c4904e84
10 changed files with 54 additions and 51 deletions

View File

@@ -6,7 +6,6 @@ import com.intellij.facet.ui.ValidationResult;
import com.intellij.icons.AllIcons;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.impl.ProjectUtil;
import com.intellij.idea.ActionsBundle;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;

View File

@@ -4,6 +4,7 @@ package com.intellij.ui;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.util.IconLoader;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -29,11 +30,14 @@ public class HideableDecorator {
private JComponent myContent;
private Dimension myPreviousContentSize;
public HideableDecorator(JPanel panel, String title, boolean adjustWindow) {
public HideableDecorator(JPanel panel, @Nls(capitalization = Nls.Capitalization.Title) String title, boolean adjustWindow) {
this(panel, title, adjustWindow, null);
}
public HideableDecorator(JPanel panel, String title, boolean adjustWindow, @Nullable JComponent northEastComponent) {
public HideableDecorator(JPanel panel,
@Nls(capitalization = Nls.Capitalization.Title) String title,
boolean adjustWindow,
@Nullable JComponent northEastComponent) {
myPanel = panel;
myAdjustWindow = adjustWindow;
myTitledSeparator = new TitledSeparator(title, null) {

View File

@@ -17,6 +17,7 @@ import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.*;
import com.intellij.util.xmlb.XmlSerializer;
import org.jdom.Element;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -33,7 +34,9 @@ public class TableModelEditor<T> extends CollectionModelEditor<T, CollectionItem
private final MyListTableModel model;
public TableModelEditor(ColumnInfo @NotNull [] columns, @NotNull CollectionItemEditor<T> itemEditor, @NotNull String emptyText) {
public TableModelEditor(ColumnInfo @NotNull [] columns,
@NotNull CollectionItemEditor<T> itemEditor,
@NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String emptyText) {
this(Collections.emptyList(), columns, itemEditor, emptyText);
}

View File

@@ -9,8 +9,6 @@ import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurableEP;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.jetbrains.python.codeInsight.PyCodeInsightSettings;
@@ -60,11 +58,5 @@ final class PyCharmCorePluginConfigurator implements ApplicationInitializedListe
}
ActionManager.getInstance().unregisterAction("RunAnything");
for (ConfigurableEP<Configurable> ep : Configurable.APPLICATION_CONFIGURABLE.getExtensionList()) {
if ("com.jetbrains.python.documentation.PythonDocumentationConfigurable".equals(ep.id)) {
ep.displayName = "External Documentation";
}
}
}
}

View File

@@ -115,23 +115,24 @@ public class PyIdeCommonOptionsForm implements AbstractPyCommonOptionsForm {
updateRemoteInterpreterMode();
final HideableDecorator decorator = new HideableDecorator(myHideablePanel, "Environment", false) {
@Override
protected void on() {
super.on();
storeState();
}
final HideableDecorator decorator =
new HideableDecorator(myHideablePanel, PyBundle.message("python.sdk.common.options.environment"), false) {
@Override
protected void on() {
super.on();
storeState();
}
@Override
protected void off() {
super.off();
storeState();
}
@Override
protected void off() {
super.off();
storeState();
}
private void storeState() {
PropertiesComponent.getInstance().setValue(EXPAND_PROPERTY_KEY, String.valueOf(isExpanded()), "true");
}
};
private void storeState() {
PropertiesComponent.getInstance().setValue(EXPAND_PROPERTY_KEY, String.valueOf(isExpanded()), "true");
}
};
decorator.setOn(PropertiesComponent.getInstance().getBoolean(EXPAND_PROPERTY_KEY, true));
decorator.setContentComponent(myMainPanel);
@@ -220,7 +221,9 @@ public class PyIdeCommonOptionsForm implements AbstractPyCommonOptionsForm {
private void updateDefaultInterpreter(Module module) {
final Sdk sdk = module == null ? null : ModuleRootManager.getInstance(module).getSdk();
myInterpreterComboBox.setRenderer(
sdk == null ? new PySdkListCellRenderer(null) : new PySdkListCellRenderer(null, "Project Default (" + sdk.getName() + ")", sdk)
sdk == null
? new PySdkListCellRenderer(null)
: new PySdkListCellRenderer(null, PyBundle.message("python.sdk.rendering.project.default.0", sdk.getName()), sdk)
);
}

View File

@@ -70,7 +70,8 @@ public class PyPluginCommonOptionsForm implements AbstractPyCommonOptionsForm {
myModuleComboBox.setSelectedModule(selection);
myInterpreterComboBox.setMinimumAndPreferredWidth(100);
myInterpreterComboBox.setRenderer(new PySdkListCellRenderer(null,"<Project Default>"));
myInterpreterComboBox
.setRenderer(new PySdkListCellRenderer(null, "<" + PyBundle.message("python.sdk.rendering.project.default") + ">"));
myWorkingDirectoryTextField.addBrowseFolderListener(PyBundle.message("configurable.select.working.directory"), "", data.getProject(),
FileChooserDescriptorFactory.createSingleFolderDescriptor());
@@ -88,23 +89,24 @@ public class PyPluginCommonOptionsForm implements AbstractPyCommonOptionsForm {
setAnchor(myEnvsComponent.getLabel());
final HideableDecorator decorator = new HideableDecorator(myHideablePanel, "Environment", false) {
@Override
protected void on() {
super.on();
storeState();
}
final HideableDecorator decorator =
new HideableDecorator(myHideablePanel, PyBundle.message("python.sdk.common.options.environment"), false) {
@Override
protected void on() {
super.on();
storeState();
}
@Override
protected void off() {
super.off();
storeState();
}
@Override
protected void off() {
super.off();
storeState();
}
private void storeState() {
PropertiesComponent.getInstance().setValue(EXPAND_PROPERTY_KEY, String.valueOf(isExpanded()), "true");
}
};
private void storeState() {
PropertiesComponent.getInstance().setValue(EXPAND_PROPERTY_KEY, String.valueOf(isExpanded()), "true");
}
};
decorator.setOn(PropertiesComponent.getInstance().getBoolean(EXPAND_PROPERTY_KEY, true));
decorator.setContentComponent(myMainPanel);
myPathMappingsComponent.setAnchor(myEnvsComponent.getLabel());

View File

@@ -530,6 +530,9 @@ python.sdk.no.interpreter.configured.warning=No Python interpreter configured fo
python.sdk.no.interpreter.configured.owner=No Python interpreter configured for the {0}
python.sdk.no.interpreter.selection=No Python interpreter selected
python.sdk.choose.valid.interpreter=Choose valid Python interpreter
python.sdk.common.options.environment=Environment
python.sdk.rendering.project.default=Project Default
python.sdk.rendering.project.default.0=Project Default ({0})
# SDK / skeletons
sdk.some.skeletons.failed=Some skeletons failed to generate
@@ -835,6 +838,7 @@ debugger.numeric.view.as.dataframe=View as DataFrame
debugger.numeric.view.as.array=View as Array
debugger.stepping.filter=Stepping Filter
debugger.stepping.filter.specify.pattern=Specify glob pattern ('*', '?' and '[seq]' allowed, semicolon ';' as name separator):
debugger.stepping.no.script.filters=No script filters configured
debugger.sending.close.message=Sending close message to Python Console...
debugger.waiting.to.finish=Waiting for Python Console process to finish...
debugger.variables.loading.policy=Variables Loading Policy

View File

@@ -425,8 +425,7 @@
<psi.referenceContributor implementation="com.jetbrains.python.testing.pyTestFixtures.PyTestFixtureReferenceContributor" language="Python"/>
<applicationConfigurable groupId="tools" instance="com.jetbrains.python.documentation.PythonDocumentationConfigurable"
id="com.jetbrains.python.documentation.PythonDocumentationConfigurable"
displayName="Python External Documentation"/>
id="com.jetbrains.python.documentation.PythonDocumentationConfigurable"/>
<projectConfigurable groupId="tools" instance="com.jetbrains.python.configuration.PyIntegratedToolsModulesConfigurable"
id="com.jetbrains.python.configuration.PyIntegratedToolsModulesConfigurable"
bundle="messages.PyBundle"

View File

@@ -16,7 +16,6 @@
package com.jetbrains.python.debugger.settings;
import com.intellij.openapi.options.ConfigurableUi;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.ui.NonEmptyInputValidator;
import com.intellij.ui.components.JBCheckBox;
@@ -54,7 +53,7 @@ public class PyDebuggerSteppingConfigurableUi implements ConfigurableUi<PyDebugg
private void createUIComponents() {
TableModelEditor.DialogItemEditor<PySteppingFilter> itemEditor = new DialogEditor();
myPySteppingFilterEditor = new TableModelEditor<>(COLUMNS, itemEditor, "No script filters configured");
myPySteppingFilterEditor = new TableModelEditor<>(COLUMNS, itemEditor, PyBundle.message("debugger.stepping.no.script.filters"));
mySteppingPanel = new JPanel(new BorderLayout());
mySteppingPanel.add(myPySteppingFilterEditor.createComponent());
}
@@ -77,7 +76,7 @@ public class PyDebuggerSteppingConfigurableUi implements ConfigurableUi<PyDebugg
}
@Override
public void apply(@NotNull PyDebuggerSettings settings) throws ConfigurationException {
public void apply(@NotNull PyDebuggerSettings settings) {
settings.setLibrariesFilterEnabled(myLibrariesFilterCheckBox.isSelected());
settings.setSteppingFiltersEnabled(myStepFilterEnabledCheckBox.isSelected());
settings.setAlwaysDoSmartStepIntoEnabled(myAlwaysDoSmartStepIntoCheckBox.isSelected());

View File

@@ -24,13 +24,11 @@ import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.ContentEntry;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.ui.configuration.actions.ContentEntryEditingAction;
import com.intellij.openapi.util.NlsActions;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.pointers.VirtualFilePointer;
import com.intellij.openapi.vfs.pointers.VirtualFilePointerListener;
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
import com.intellij.util.containers.MultiMap;
import com.jetbrains.python.PyBundle;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;