diff --git a/build/scripts/libLicenses.gant b/build/scripts/libLicenses.gant index eaeb82e1c4b4..d495f952b7a8 100644 --- a/build/scripts/libLicenses.gant +++ b/build/scripts/libLicenses.gant @@ -50,7 +50,8 @@ def String getLibraryName(JpsLibrary lib) { def name = lib.name if (name.startsWith("#")) { if (lib.getRoots(JpsOrderRootType.COMPILED).size() != 1) { - projectBuilder.warning("Non-single entry module library $name: $lib.classpath"); + def urls = lib.getRoots(JpsOrderRootType.COMPILED).collect {it.url} + projectBuilder.warning("Non-single entry module library $name: $urls"); } File file = lib.getFiles(JpsOrderRootType.COMPILED)[0] return file.name @@ -213,6 +214,7 @@ libraryLicense(name: "maven-core", version: "3.0.5", libraryNames: ["maven-core- libraryLicense(name: "plexus-component-annotations", version: "1.5.5", libraryNames: ["plexus-component-annotations-1.5.5.jar"], license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html") libraryLicense(name: "Maven3", libraryNames: ["Maven3", "maven-dependency-tree-1.2.jar", "archetype-catalog-2.2.jar", "archetype-common-2.2.jar"], version: "3.0.5", license: "Apache 2.0", url: "http://maven.apache.org/", licenseUrl: "http://maven.apache.org/license.html") libraryLicense(name: "Gradle", version: "1.12", license: "Apache 2.0", url: "http://gradle.org/", licenseUrl: "http://gradle.org/license") +libraryLicense(name: "gradle-tooling-api-2.0.jar", version: "2.0", license: "Apache 2.0", url: "http://gradle.org/", licenseUrl: "http://gradle.org/license") libraryLicense(name: "GradleJnaPosix", version: "1.0.3", license: "LGPL 2.1", url: "http://www.jruby.org/", licenseUrl: "http://www.gnu.org/licenses/lgpl-2.1.txt") libraryLicense(name: "Slf4j", version: "1.7.2", license: "MIT License", url: "http://slf4j.org/", licenseUrl: "http://slf4j.org/license.html") libraryLicense(name: "GradleGuava", version: "14.0.1", license: "Apache 2.0", url: "http://code.google.com/p/guava-libraries/", licenseUrl: "http://apache.org/licenses/LICENSE-2.0") diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/JavaDebuggerSupport.java b/java/debugger/impl/src/com/intellij/debugger/ui/JavaDebuggerSupport.java index 5bfbf09c7914..20d95f8fff3d 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/JavaDebuggerSupport.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/JavaDebuggerSupport.java @@ -111,13 +111,13 @@ public class JavaDebuggerSupport extends DebuggerSupport { @Override @NotNull public DebuggerActionHandler getRunToCursorHandler() { - return myRunToCursorActionHandler; + return DISABLED; } @Override @NotNull public DebuggerActionHandler getForceRunToCursorHandler() { - return myForceRunToCursorActionHandler; + return DISABLED; } @Override diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java index d78731b0a3c8..f24153739031 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectJdksConfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -161,6 +161,9 @@ public class ProjectJdksConfigurable extends MasterDetailsComponent { @Override @Nullable protected ArrayList createActions(final boolean fromPopup) { + if (myProjectJdksModel == null) { + return null; + } final ArrayList actions = new ArrayList(); DefaultActionGroup group = new DefaultActionGroup(ProjectBundle.message("add.new.jdk.text"), true); group.getTemplatePresentation().setIcon(IconUtil.getAddIcon()); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java index bf083f92c66c..a5867d66d176 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/ProjectStructureConfigurable.java @@ -44,6 +44,7 @@ import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy; import com.intellij.packaging.artifacts.Artifact; import com.intellij.ui.JBSplitter; +import com.intellij.ui.OnePixelSplitter; import com.intellij.ui.components.panels.Wrapper; import com.intellij.ui.navigation.BackAction; import com.intellij.ui.navigation.ForwardAction; @@ -174,12 +175,9 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se public JComponent createComponent() { myComponent = new MyPanel(); - mySplitter = new JBSplitter(false, .15f); + mySplitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false, .15f) : new JBSplitter(false, .15f); mySplitter.setSplitterProportionKey("ProjectStructure.TopLevelElements"); mySplitter.setHonorComponentsMinimumSize(true); - if (Registry.is("ide.new.project.settings")) { - mySplitter.setOnePixelMode(); - } initSidePanel(); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java index 39453f32db4b..618f085f00bb 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java @@ -206,7 +206,7 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { myErrorPanelPlace.add(myValidationManager.getMainErrorPanel(), BorderLayout.CENTER); - JBSplitter splitter = new JBSplitter(false); + final JBSplitter splitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false) : new JBSplitter(false); final JPanel leftPanel = new JPanel(new BorderLayout()); JPanel treePanel = myLayoutTreeComponent.getTreePanel(); if (UIUtil.isUnderDarcula()) { @@ -262,7 +262,6 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { } splitter.setSecondComponent(rightPanel); if (Registry.is("ide.new.project.settings")) { - splitter.setOnePixelMode(); splitter.getDivider().setBackground(UIUtil.getPanelBackground()); treePanel.setBorder(new EmptyBorder(0, 0, 0, 0)); rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0)); diff --git a/platform/dvcs/src/com/intellij/dvcs/ui/VcsLogAction.java b/platform/dvcs/src/com/intellij/dvcs/ui/VcsLogAction.java index d8f4012f1b0e..116f792ef93f 100644 --- a/platform/dvcs/src/com/intellij/dvcs/ui/VcsLogAction.java +++ b/platform/dvcs/src/com/intellij/dvcs/ui/VcsLogAction.java @@ -74,14 +74,17 @@ public abstract class VcsLogAction extends DumbAwareAct } private boolean isEnabled(@NotNull MultiMap grouped) { - Mode mode = getMode(); - if (mode == Mode.SINGLE_COMMIT) { - return grouped.size() == 1; + if (grouped.isEmpty()) { + return false; } - if (mode == Mode.SINGLE_PER_REPO) { - return allValuesAreSingletons(grouped); + switch (getMode()) { + case SINGLE_COMMIT: + return grouped.size() == 1; + case SINGLE_PER_REPO: + return allValuesAreSingletons(grouped); + default: + return false; } - return false; } @Nullable diff --git a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java index cb0e1a298c9c..e6b2553085a8 100644 --- a/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java +++ b/platform/editor-ui-api/src/com/intellij/ide/ui/UISettings.java @@ -72,6 +72,7 @@ public class UISettings implements PersistentStateComponent, Exporta public int RECENT_FILES_LIMIT = 50; public int CONSOLE_COMMAND_HISTORY_LIMIT = 300; public int EDITOR_TAB_LIMIT = 10; + public int EDITOR_TAB_TITLE_LIMIT = 100; public boolean ANIMATE_WINDOWS = true; public int ANIMATION_SPEED = 2000; // Pixels per second public boolean SHOW_TOOL_WINDOW_NUMBERS = true; diff --git a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemTestCase.java b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemTestCase.java index 770578ae44f5..449de84f4627 100644 --- a/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemTestCase.java +++ b/platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemTestCase.java @@ -39,6 +39,7 @@ import com.intellij.openapi.roots.ModuleRootModificationUtil; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.LocalFileSystem; +import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.packaging.artifacts.Artifact; import com.intellij.packaging.impl.compiler.ArtifactCompileScope; @@ -455,9 +456,11 @@ public abstract class ExternalSystemTestCase extends UsefulTestCase { } protected void assertArtifactOutput(String artifactName, TestFileSystemItem fs) { - final String outputPath = ArtifactsTestUtil.findArtifact(myProject, artifactName).getOutputPath(); - assert outputPath != null; - fs.assertDirectoryEqual(new File(outputPath)); + final Artifact artifact = ArtifactsTestUtil.findArtifact(myProject, artifactName); + final VirtualFile outputFile = artifact.getOutputFile(); + assert outputFile != null; + final File file = VfsUtilCore.virtualToIoFile(outputFile); + fs.assertFileEqual(file); } private static void setFileContent(final VirtualFile file, final String content, final boolean advanceStamps) throws IOException { diff --git a/platform/lang-api/src/com/intellij/find/FindModel.java b/platform/lang-api/src/com/intellij/find/FindModel.java index b8caf760446d..5dafc2db8acf 100644 --- a/platform/lang-api/src/com/intellij/find/FindModel.java +++ b/platform/lang-api/src/com/intellij/find/FindModel.java @@ -884,10 +884,10 @@ public class FindModel extends UserDataHolderBase implements Cloneable { doApplyContextChange(inStringLiteralsOnly, SearchContext.IN_STRING_LITERALS); } - public void doApplyContextChange(boolean inCommentsOnly, SearchContext option) { + private void doApplyContextChange(boolean newOptionValue, SearchContext option) { boolean changed = false; - if (inCommentsOnly) { - changed = searchContext == option; + if (newOptionValue) { + changed = searchContext != option; searchContext = option; } else if (searchContext == option) { // do not reset unrelated value changed = true; diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form index 9872c7c624aa..db23ce17b2c3 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form +++ b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.form @@ -3,7 +3,7 @@ - + @@ -108,7 +108,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -129,7 +129,9 @@ - + + + @@ -138,19 +140,38 @@ - + + + + + + + + + + + + + + + + + + + + - + @@ -184,7 +205,7 @@ - + diff --git a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java index 4e1de817255a..8db2a882bfc7 100644 --- a/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java +++ b/platform/lang-impl/src/com/intellij/application/options/editor/EditorTabsConfigurable.java @@ -45,6 +45,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { private JCheckBox myShowCloseButtonOnCheckBox; private JCheckBox myShowDirectoryInTabCheckBox; private JRadioButton myActivateRightNeighbouringTabRadioButton; + private JTextField myTabTitleLimitField; public EditorTabsConfigurable() { myEditorTabPlacement.setModel(new DefaultComboBoxModel(new Object[]{ @@ -119,6 +120,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { myHideKnownExtensions.setSelected(uiSettings.HIDE_KNOWN_EXTENSION_IN_TABS); myShowDirectoryInTabCheckBox.setSelected(uiSettings.SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES); myEditorTabLimitField.setText(Integer.toString(uiSettings.EDITOR_TAB_LIMIT)); + myTabTitleLimitField.setText(Integer.toString(uiSettings.EDITOR_TAB_TITLE_LIMIT)); myShowCloseButtonOnCheckBox.setSelected(uiSettings.SHOW_CLOSE_BUTTON); if (uiSettings.CLOSE_NON_MODIFIED_FILES_FIRST) { @@ -171,14 +173,29 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { uiSettings.ACTIVATE_RIGHT_EDITOR_ON_CLOSE = myActivateRightNeighbouringTabRadioButton.isSelected(); String temp = myEditorTabLimitField.getText(); - if(temp.trim().length() > 0){ + if (temp.trim().length() > 0) { try { int newEditorTabLimit = Integer.parseInt(temp); - if(newEditorTabLimit>0&&newEditorTabLimit!=uiSettings.EDITOR_TAB_LIMIT){ - uiSettings.EDITOR_TAB_LIMIT=newEditorTabLimit; + if (newEditorTabLimit > 0 && newEditorTabLimit != uiSettings.EDITOR_TAB_LIMIT) { + uiSettings.EDITOR_TAB_LIMIT = newEditorTabLimit; uiSettingsChanged = true; } - }catch (NumberFormatException ignored){} + } + catch (NumberFormatException ignored) { + } + } + temp = myTabTitleLimitField.getText(); + if (temp.trim().length() > 0) { + try { + int newTabTitleLimit = Integer.parseInt(temp); + newTabTitleLimit = Math.max(10, Math.min(100, newTabTitleLimit)); + if (newTabTitleLimit != uiSettings.EDITOR_TAB_TITLE_LIMIT){ + uiSettings.EDITOR_TAB_TITLE_LIMIT = newTabTitleLimit; + uiSettingsChanged = true; + } + } + catch (NumberFormatException ignored) { + } } if(uiSettingsChanged){ uiSettings.fireUISettingsChanged(); @@ -191,6 +208,7 @@ public class EditorTabsConfigurable implements EditorOptionsProvider { boolean isModified = isModified(myCbModifiedTabsMarkedWithAsterisk, uiSettings.MARK_MODIFIED_TABS_WITH_ASTERISK); isModified |= isModified(myShowTabsTooltipsCheckBox, uiSettings.SHOW_TABS_TOOLTIPS); isModified |= isModified(myEditorTabLimitField, uiSettings.EDITOR_TAB_LIMIT); + isModified |= isModified(myTabTitleLimitField, uiSettings.EDITOR_TAB_TITLE_LIMIT); int tabPlacement = ((Integer)myEditorTabPlacement.getSelectedItem()).intValue(); isModified |= tabPlacement != uiSettings.EDITOR_TAB_PLACEMENT; isModified |= myHideKnownExtensions.isSelected() != uiSettings.HIDE_KNOWN_EXTENSION_IN_TABS; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/IndentingBackspaceHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/IndentingBackspaceHandler.java index cd49d111950b..17916e008501 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/IndentingBackspaceHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/IndentingBackspaceHandler.java @@ -29,6 +29,7 @@ import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleSettings; import com.intellij.psi.codeStyle.CodeStyleSettingsManager; @@ -42,20 +43,41 @@ import org.jetbrains.annotations.NotNull; public class IndentingBackspaceHandler extends BackspaceHandlerDelegate { private static final Logger LOG = Logger.getInstance(IndentingBackspaceHandler.class); + private boolean isApplicable; private boolean caretWasAtLineStart; + private String precalculatedSpacing; @Override public void beforeCharDeleted(char c, PsiFile file, Editor editor) { - caretWasAtLineStart = editor.getCaretModel().getLogicalPosition().column == 0; + if (CodeInsightSettings.getInstance().SMART_BACKSPACE != CodeInsightSettings.AUTOINDENT || !StringUtil.isWhiteSpace(c)) { + isApplicable = false; + return; + } + LanguageCodeStyleSettingsProvider codeStyleSettingsProvider = LanguageCodeStyleSettingsProvider.forLanguage(file.getLanguage()); + if (codeStyleSettingsProvider != null && codeStyleSettingsProvider.isIndentBasedLanguageSemantics()) { + isApplicable = false; + return; + } + Document document = editor.getDocument(); + CharSequence charSequence = document.getCharsSequence(); + CaretModel caretModel = editor.getCaretModel(); + int caretOffset = caretModel.getOffset(); + LogicalPosition pos = caretModel.getLogicalPosition(); + isApplicable = true; + caretWasAtLineStart = pos.column == 0; + precalculatedSpacing = null; + if (caretWasAtLineStart && pos.line > 0 && caretOffset < charSequence.length() && !StringUtil.isWhiteSpace(charSequence.charAt(caretOffset))) { + int prevLineEnd = document.getLineEndOffset(pos.line - 1); + if (prevLineEnd > 0 && !StringUtil.isWhiteSpace(charSequence.charAt(prevLineEnd - 1))) { + PsiDocumentManager.getInstance(file.getProject()).commitDocument(document); + precalculatedSpacing = getSpacing(file, caretOffset); + } + } } @Override public boolean charDeleted(char c, PsiFile file, Editor editor) { - if (CodeInsightSettings.getInstance().SMART_BACKSPACE != CodeInsightSettings.AUTOINDENT || !StringUtil.isWhiteSpace(c)) { - return false; - } - LanguageCodeStyleSettingsProvider codeStyleSettingsProvider = LanguageCodeStyleSettingsProvider.forLanguage(file.getLanguage()); - if (codeStyleSettingsProvider != null && codeStyleSettingsProvider.isIndentBasedLanguageSemantics()) { + if (!isApplicable) { return false; } @@ -65,13 +87,19 @@ public class IndentingBackspaceHandler extends BackspaceHandlerDelegate { int caretOffset = caretModel.getOffset(); int offset = CharArrayUtil.shiftForward(document.getCharsSequence(), caretOffset, " \t"); - int offsetInPsi = getOffsetInPsi(document, file, offset); int beforeWhitespaceOffset = CharArrayUtil.shiftBackward(document.getCharsSequence(), offset - 1, " \t") + 1; LogicalPosition logicalPosition = caretOffset < offset ? editor.offsetToLogicalPosition(offset) : caretModel.getLogicalPosition(); int lineStartOffset = document.getLineStartOffset(logicalPosition.line); if (lineStartOffset < beforeWhitespaceOffset) { if (caretWasAtLineStart && beforeWhitespaceOffset <= offset) { - String spacing = getSpacing(file, offsetInPsi); + String spacing; + if (precalculatedSpacing == null) { + PsiDocumentManager.getInstance(project).commitDocument(document); + spacing = getSpacing(file, offset); + } + else { + spacing = precalculatedSpacing; + } if (beforeWhitespaceOffset < offset || !spacing.isEmpty()) { document.replaceString(beforeWhitespaceOffset, offset, spacing); caretModel.moveToOffset(beforeWhitespaceOffset + spacing.length()); @@ -81,9 +109,9 @@ public class IndentingBackspaceHandler extends BackspaceHandlerDelegate { return false; } + PsiDocumentManager.getInstance(project).commitDocument(document); CodeStyleFacade codeStyleFacade = CodeStyleFacade.getInstance(project); - // We should calculate indent at line containing the text after caret, cause that text might affect the result (e.g. closing brace in Java) - String indent = codeStyleFacade.getLineIndent(document, offsetInPsi); + String indent = codeStyleFacade.getLineIndent(document, offset); if (indent == null) { return false; } @@ -114,7 +142,7 @@ public class IndentingBackspaceHandler extends BackspaceHandlerDelegate { int targetOffset = CharArrayUtil.shiftBackward(document.getCharsSequence(), prevLineEndOffset - 1, " \t") + 1; if (prevLineStartOffset < targetOffset) { - String spacing = getSpacing(file, offsetInPsi); + String spacing = getSpacing(file, offset); document.replaceString(targetOffset, offset, spacing); caretModel.moveToOffset(targetOffset + spacing.length()); } @@ -125,11 +153,6 @@ public class IndentingBackspaceHandler extends BackspaceHandlerDelegate { return true; } - private static int getOffsetInPsi(Document document, PsiFile file, int offset) { - int psiLength = file.getTextLength(); - return Math.max(0, Math.min(psiLength, offset + psiLength - document.getTextLength())); - } - private static int getTabSize(@NotNull CodeStyleFacade codeStyleFacade, @NotNull Document document) { VirtualFile file = FileDocumentManager.getInstance().getFile(document); FileType fileType = file == null ? null : file.getFileType(); diff --git a/platform/lang-impl/src/com/intellij/execution/console/DuplexConsoleView.java b/platform/lang-impl/src/com/intellij/execution/console/DuplexConsoleView.java index c760310cd391..87e1323fe607 100644 --- a/platform/lang-impl/src/com/intellij/execution/console/DuplexConsoleView.java +++ b/platform/lang-impl/src/com/intellij/execution/console/DuplexConsoleView.java @@ -9,6 +9,7 @@ import com.intellij.execution.ui.ConsoleView; import com.intellij.execution.ui.ConsoleViewContentType; import com.intellij.execution.ui.ObservableConsoleView; import com.intellij.icons.AllIcons; +import com.intellij.ide.util.PropertiesComponent; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -34,6 +35,8 @@ public class DuplexConsoleView ext private final S myPrimaryConsoleView; @NotNull private final T mySecondaryConsoleView; + @Nullable + private final String myStateStorageKey; private boolean myPrimary; @Nullable @@ -41,25 +44,46 @@ public class DuplexConsoleView ext @NotNull private final SwitchDuplexConsoleViewAction mySwitchConsoleAction; + public DuplexConsoleView(@NotNull S primaryConsoleView, @NotNull T secondaryConsoleView) { + this(primaryConsoleView, secondaryConsoleView, null); + } + + public DuplexConsoleView(@NotNull S primaryConsoleView, @NotNull T secondaryConsoleView, @Nullable String stateStorageKey) { super(new CardLayout()); myPrimaryConsoleView = primaryConsoleView; mySecondaryConsoleView = secondaryConsoleView; + myStateStorageKey = stateStorageKey; add(myPrimaryConsoleView.getComponent(), PRIMARY_CONSOLE_PANEL); add(mySecondaryConsoleView.getComponent(), SECONDARY_CONSOLE_PANEL); - mySwitchConsoleAction = new SwitchDuplexConsoleViewAction(this); + mySwitchConsoleAction = new SwitchDuplexConsoleViewAction(); myPrimary = true; - enableConsole(false); + enableConsole(getStoredState()); Disposer.register(this, myPrimaryConsoleView); Disposer.register(this, mySecondaryConsoleView); } - public static DuplexConsoleView create(S primary, T secondary) { - return new DuplexConsoleView(primary, secondary); + public static DuplexConsoleView create(@NotNull S primary, + @NotNull T secondary, + @Nullable String stateStorageKey) { + return new DuplexConsoleView(primary, secondary, stateStorageKey); + } + + private void setStoredState(boolean primary) { + if (myStateStorageKey != null) { + PropertiesComponent.getInstance().setValue(myStateStorageKey, String.valueOf(primary)); + } + } + + private boolean getStoredState() { + if (myStateStorageKey == null) { + return false; + } + return PropertiesComponent.getInstance().getBoolean(myStateStorageKey, false); } public void enableConsole(boolean primary) { @@ -215,23 +239,22 @@ public class DuplexConsoleView ext return mySwitchConsoleAction.getTemplatePresentation(); } - private static class SwitchDuplexConsoleViewAction extends ToggleAction implements DumbAware { - private final DuplexConsoleView myConsole; + private class SwitchDuplexConsoleViewAction extends ToggleAction implements DumbAware { - public SwitchDuplexConsoleViewAction(final DuplexConsoleView console) { + public SwitchDuplexConsoleViewAction() { super(ExecutionBundle.message("run.configuration.show.command.line.action.name"), null, AllIcons.Debugger.ToolConsole); - myConsole = console; } @Override public boolean isSelected(final AnActionEvent event) { - return !myConsole.isPrimaryConsoleEnabled(); + return !isPrimaryConsoleEnabled(); } @Override public void setSelected(final AnActionEvent event, final boolean flag) { - myConsole.enableConsole(!flag); + enableConsole(!flag); + setStoredState(!flag); ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { @@ -244,12 +267,12 @@ public class DuplexConsoleView ext public void update(final AnActionEvent event) { super.update(event); final Presentation presentation = event.getPresentation(); - final boolean isRunning = myConsole.myProcessHandler != null && !myConsole.myProcessHandler.isProcessTerminated(); + final boolean isRunning = myProcessHandler != null && !myProcessHandler.isProcessTerminated(); if (isRunning) { presentation.setEnabled(true); } else { - myConsole.enableConsole(true); + enableConsole(true); presentation.putClientProperty(SELECTED_PROPERTY, false); presentation.setEnabled(false); } diff --git a/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java b/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java index 4c21ddbefeb4..83d0131565b7 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java +++ b/platform/lang-impl/src/com/intellij/find/impl/FindDialog.java @@ -1084,7 +1084,7 @@ public class FindDialog extends DialogWrapper { if (myModel.isInCommentsOnly()) searchContext = FindBundle.message("find.context.in.comments.scope.label"); else if (myModel.isInStringLiteralsOnly()) searchContext = FindBundle.message("find.context.in.literals.scope.label"); else if (myModel.isExceptStringLiterals()) searchContext = FindBundle.message("find.context.except.literals.scope.label"); - else if (myModel.isExceptComments()) searchContext = FindBundle.message("find.context.except.literals.scope.label"); + else if (myModel.isExceptComments()) searchContext = FindBundle.message("find.context.except.comments.scope.label"); else if (myModel.isExceptCommentsAndStringLiterals()) searchContext = FindBundle.message("find.context.except.comments.and.literals.scope.label"); mySearchContext.setSelectedItem(searchContext); diff --git a/platform/lang-impl/src/com/intellij/find/impl/RegExHelpPopup.java b/platform/lang-impl/src/com/intellij/find/impl/RegExHelpPopup.java index d93795419fb0..0aace901a409 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/RegExHelpPopup.java +++ b/platform/lang-impl/src/com/intellij/find/impl/RegExHelpPopup.java @@ -17,11 +17,13 @@ package com.intellij.find.impl; import com.intellij.codeInsight.hint.HintUtil; import com.intellij.ide.BrowserUtil; +import com.intellij.openapi.Disposable; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ui.popup.ComponentPopupBuilder; import com.intellij.openapi.ui.popup.JBPopup; import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.ui.popup.util.MinimizeButton; +import com.intellij.openapi.util.Disposer; import com.intellij.ui.ScrollPaneFactory; import com.intellij.ui.components.labels.LinkLabel; import com.intellij.ui.components.labels.LinkListener; @@ -339,16 +341,30 @@ public class RegExHelpPopup extends JPanel { @NotNull public static LinkLabel createRegExLink(@NotNull String title, @Nullable final Component owner, @Nullable final Logger logger) { return new LinkLabel(title, null, new LinkListener() { + JBPopup helpPopup; @Override public void linkSelected(LinkLabel aSource, Object aLinkData) { try { - final JBPopup helpPopup = createRegExHelpPopup(); + if (helpPopup != null && !helpPopup.isDisposed() && helpPopup.isVisible()) { + return; + } + helpPopup = createRegExHelpPopup(); + Disposer.register(helpPopup, new Disposable() { + @Override + public void dispose() { + destroyPopup(); + } + }); helpPopup.showInCenterOf(owner); } catch (BadLocationException e) { if (logger != null) logger.info(e); } } + + private void destroyPopup() { + helpPopup = null; + } }); } diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/DetectedRootsChooserDialog.java b/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/DetectedRootsChooserDialog.java index ee44bdf2f08b..bf3d383aeebb 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/DetectedRootsChooserDialog.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/DetectedRootsChooserDialog.java @@ -26,11 +26,13 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.*; import com.intellij.ui.treeStructure.treetable.TreeColumnInfo; import com.intellij.util.PlatformIcons; +import com.intellij.util.containers.Convertor; import com.intellij.util.ui.ColumnInfo; import com.intellij.util.ui.ComboBoxCellEditor; import com.intellij.util.ui.tree.TreeUtil; import com.intellij.xml.util.XmlStringUtil; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -38,12 +40,11 @@ import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; +import javax.swing.tree.TreePath; import java.awt.*; import java.io.File; -import java.util.Arrays; -import java.util.HashMap; +import java.util.*; import java.util.List; -import java.util.Map; /** * This dialog allows selecting paths inside selected archives or directories. @@ -108,17 +109,17 @@ public class DetectedRootsChooserDialog extends DialogWrapper { private JScrollPane myPane; private String myDescription; - public DetectedRootsChooserDialog(Component component, List suggestedRoots) { + public DetectedRootsChooserDialog(Component component, Collection suggestedRoots) { super(component, true); init(suggestedRoots); } - public DetectedRootsChooserDialog(Project project, List suggestedRoots) { + public DetectedRootsChooserDialog(Project project, Collection suggestedRoots) { super(project, true); init(suggestedRoots); } - private void init(List suggestedRoots) { + private void init(Collection suggestedRoots) { myDescription = XmlStringUtil.wrapInHtml(ApplicationNamesInfo.getInstance().getFullProductName() + " just scanned files and detected the following " + StringUtil.pluralize("root", suggestedRoots.size()) + ".
" + "Select items in the tree below or press Cancel to cancel operation."); @@ -128,7 +129,7 @@ public class DetectedRootsChooserDialog extends DialogWrapper { init(); } - private static CheckboxTreeTable createTreeTable(List suggestedRoots) { + private static CheckboxTreeTable createTreeTable(Collection suggestedRoots) { final CheckedTreeNode root = createRoot(suggestedRoots); CheckboxTreeTable treeTable = new CheckboxTreeTable(root, new CheckboxTree.CheckboxTreeCellRenderer(true) { @Override @@ -189,14 +190,30 @@ public class DetectedRootsChooserDialog extends DialogWrapper { column.setPreferredWidth(width); column.setMaxWidth(width); treeTable.setRootVisible(false); + new TreeTableSpeedSearch(treeTable, new Convertor() { + @Override + public String convert(TreePath o) { + Object node = o.getLastPathComponent(); + if (!(node instanceof VirtualFileCheckedTreeNode)) return ""; + return ((VirtualFileCheckedTreeNode)node).getFile().getPresentableUrl(); + } + }); TreeUtil.expandAll(treeTable.getTree()); return treeTable; } - private static CheckedTreeNode createRoot(List suggestedRoots) { + private static CheckedTreeNode createRoot(Collection suggestedRoots) { + SuggestedChildRootInfo[] sortedRoots = suggestedRoots.toArray(new SuggestedChildRootInfo[suggestedRoots.size()]); + Arrays.sort(sortedRoots, new Comparator() { + @Override + public int compare(@NotNull SuggestedChildRootInfo o1, @NotNull SuggestedChildRootInfo o2) { + return o1.getDetectedRoot().getFile().getPresentableUrl().compareTo(o2.getDetectedRoot().getFile().getPresentableUrl()); + } + }); + CheckedTreeNode root = new CheckedTreeNode(null); Map rootCandidateNodes = new HashMap(); - for (SuggestedChildRootInfo rootInfo : suggestedRoots) { + for (SuggestedChildRootInfo rootInfo : sortedRoots) { final VirtualFile rootCandidate = rootInfo.getRootCandidate(); CheckedTreeNode parent = rootCandidateNodes.get(rootCandidate); if (parent == null) { @@ -230,6 +247,12 @@ public class DetectedRootsChooserDialog extends DialogWrapper { return "DetectedRootsChooserDialog"; } + @Nullable + @Override + public JComponent getPreferredFocusedComponent() { + return myTreeTable; + } + private static class VirtualFileCheckedTreeNode extends CheckedTreeNode { private final VirtualFile myFile; diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/SuggestedChildRootInfo.java b/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/SuggestedChildRootInfo.java index 743e408b8c97..725216600ffa 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/SuggestedChildRootInfo.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/SuggestedChildRootInfo.java @@ -19,6 +19,7 @@ import com.intellij.openapi.roots.libraries.LibraryRootType; import com.intellij.openapi.roots.libraries.ui.DetectedLibraryRoot; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.ArrayUtil; +import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.Map; @@ -32,17 +33,19 @@ class SuggestedChildRootInfo { private final Map myRootTypeNames; private LibraryRootType mySelectedRootType; - SuggestedChildRootInfo(VirtualFile rootCandidate, DetectedLibraryRoot detectedRoot, Map rootTypeNames) { + SuggestedChildRootInfo(@NotNull VirtualFile rootCandidate, @NotNull DetectedLibraryRoot detectedRoot, @NotNull Map rootTypeNames) { myRootCandidate = rootCandidate; myDetectedRoot = detectedRoot; myRootTypeNames = rootTypeNames; mySelectedRootType = detectedRoot.getTypes().get(0); } + @NotNull public VirtualFile getRootCandidate() { return myRootCandidate; } + @NotNull public DetectedLibraryRoot getDetectedRoot() { return myDetectedRoot; } @@ -51,6 +54,7 @@ class SuggestedChildRootInfo { return myRootTypeNames.get(type); } + @NotNull public LibraryRootType getSelectedRootType() { return mySelectedRootType; } @@ -64,6 +68,7 @@ class SuggestedChildRootInfo { } } + @NotNull public String[] getRootTypeNames() { final String[] types = ArrayUtil.toStringArray(myRootTypeNames.values()); Arrays.sort(types, String.CASE_INSENSITIVE_ORDER); diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/CommonContentEntriesEditor.java b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/CommonContentEntriesEditor.java index 330c084291fd..04f908a17c00 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/CommonContentEntriesEditor.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/CommonContentEntriesEditor.java @@ -39,6 +39,7 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.openapi.vfs.ex.VirtualFileManagerAdapter; import com.intellij.ui.JBSplitter; +import com.intellij.ui.OnePixelSplitter; import com.intellij.ui.ScrollPaneFactory; import com.intellij.ui.border.CustomLineBorder; import com.intellij.ui.roots.ToolbarPanel; @@ -171,10 +172,7 @@ public class CommonContentEntriesEditor extends ModuleElementsEditor { } entriesPanel.add(toolbarPanel, BorderLayout.CENTER); - final JBSplitter splitter = new JBSplitter(false); - if (Registry.is("ide.new.project.settings")) { - splitter.setOnePixelMode(); - } + final JBSplitter splitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false) : new JBSplitter(false); splitter.setProportion(0.6f); splitter.setHonorComponentsMinimumSize(true); diff --git a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java index 89c531ec4bc5..6427765295c5 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java @@ -367,7 +367,7 @@ public class MapReduceIndex implements UpdatableIndex implements UpdatableIndex, Exception>() { diff --git a/platform/lang-impl/testSources/com/intellij/codeInsight/editorActions/IndentingBackspaceHandlerUncommittedDocumentTest.java b/platform/lang-impl/testSources/com/intellij/codeInsight/editorActions/IndentingBackspaceHandlerUncommittedDocumentTest.java index c4913f888f1b..f51179dfa5d8 100644 --- a/platform/lang-impl/testSources/com/intellij/codeInsight/editorActions/IndentingBackspaceHandlerUncommittedDocumentTest.java +++ b/platform/lang-impl/testSources/com/intellij/codeInsight/editorActions/IndentingBackspaceHandlerUncommittedDocumentTest.java @@ -31,4 +31,22 @@ public class IndentingBackspaceHandlerUncommittedDocumentTest extends LightPlatf checkResultByText("class Foo {\n" + "}"); } + + public void testMulticaretSequentialBackspaceInvocation() throws IOException { + configureFromFileText(getTestName(false) + ".java", + "class Foo {\n" + + " void m1() {\n" + + " \n" + + " }\n" + + " void m2() {\n" + + " \n" + + " }\n" + + "}"); + backspace(); + backspace(); + checkResultByText("class Foo {\n" + + " void m1() {}\n" + + " void m2() {}\n" + + "}"); + } } \ No newline at end of file diff --git a/platform/lvcs-impl/src/com/intellij/history/core/Paths.java b/platform/lvcs-impl/src/com/intellij/history/core/Paths.java index 440fd699ef7d..bd98591b4cb3 100644 --- a/platform/lvcs-impl/src/com/intellij/history/core/Paths.java +++ b/platform/lvcs-impl/src/com/intellij/history/core/Paths.java @@ -67,9 +67,18 @@ public class Paths { } public static Iterable split(String path) { - Iterable result = StringUtil.tokenize(path, String.valueOf(DELIM)); - if (path.indexOf(DELIM) == 0) { - result = ContainerUtil.concat(Collections.singleton(String.valueOf(DELIM)), result); + //must be consistent with LocalFileSystemBase.extractRootPath() + int prefixLen = 0; + if (path.startsWith("//")) { + prefixLen = path.indexOf(DELIM, 2); + if (prefixLen == -1) prefixLen = path.length(); + } + else if (StringUtil.startsWithChar(path, DELIM)) { + prefixLen = 1; + } + Iterable result = StringUtil.tokenize(path.substring(prefixLen), String.valueOf(DELIM)); + if (prefixLen > 0) { + result = ContainerUtil.concat(Collections.singleton(path.substring(0, prefixLen)), result); } return result; } diff --git a/platform/platform-api/src/com/intellij/openapi/diff/FragmentContent.java b/platform/platform-api/src/com/intellij/openapi/diff/FragmentContent.java index 26537316b4e9..d630bad790df 100644 --- a/platform/platform-api/src/com/intellij/openapi/diff/FragmentContent.java +++ b/platform/platform-api/src/com/intellij/openapi/diff/FragmentContent.java @@ -41,18 +41,28 @@ public class FragmentContent extends DiffContent { private final FileType myType; private final MyDocumentsSynchronizer mySynchonizer; public static final Key ORIGINAL_DOCUMENT = new Key("ORIGINAL_DOCUMENT"); + private final boolean myForceReadOnly; public FragmentContent(@NotNull DiffContent original, @NotNull TextRange range, Project project, VirtualFile file) { - this(original, range, project, file != null ? DiffContentUtil.getContentType(file) : null); + this(original, range, project, file, false); + } + + public FragmentContent(@NotNull DiffContent original, @NotNull TextRange range, Project project, VirtualFile file, boolean forceReadOnly) { + this(original, range, project, file != null ? DiffContentUtil.getContentType(file) : null, forceReadOnly); } public FragmentContent(@NotNull DiffContent original, @NotNull TextRange range, Project project, FileType fileType) { + this(original, range, project, fileType, false); + } + + public FragmentContent(@NotNull DiffContent original, @NotNull TextRange range, Project project, FileType fileType, boolean forceReadOnly) { RangeMarker rangeMarker = original.getDocument().createRangeMarker(range.getStartOffset(), range.getEndOffset(), true); rangeMarker.setGreedyToLeft(true); rangeMarker.setGreedyToRight(true); mySynchonizer = new MyDocumentsSynchronizer(project, rangeMarker); myOriginal = original; myType = fileType; + myForceReadOnly = forceReadOnly; } public FragmentContent(DiffContent original, TextRange range, Project project) { @@ -152,7 +162,7 @@ public class FragmentContent extends DiffContent { String textInRange = originalDocument.getCharsSequence().subSequence(myRangeMarker.getStartOffset(), myRangeMarker.getEndOffset()).toString(); final Document result = EditorFactory.getInstance().createDocument(textInRange); - result.setReadOnly(!originalDocument.isWritable()); + result.setReadOnly(myForceReadOnly || !originalDocument.isWritable()); result.putUserData(ORIGINAL_DOCUMENT, originalDocument); return result; } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java index 53572a523bc0..c64439f678ba 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java @@ -131,12 +131,9 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom protected MasterDetailsComponent(MasterDetailsState state) { myState = state; - mySplitter = new JBSplitter(false, .2f); + mySplitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false, .2f) : new JBSplitter(false, .2f); mySplitter.setSplitterProportionKey("ProjectStructure.SecondLevelElements"); mySplitter.setHonorComponentsMinimumSize(true); - if (Registry.is("ide.new.project.settings")) { - mySplitter.setOnePixelMode(); - } installAutoScroll(); reInitWholePanelIfNeeded(); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/OnePixelDivider.java b/platform/platform-api/src/com/intellij/openapi/ui/OnePixelDivider.java new file mode 100644 index 000000000000..2b0097005dc1 --- /dev/null +++ b/platform/platform-api/src/com/intellij/openapi/ui/OnePixelDivider.java @@ -0,0 +1,233 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.ui; + +import com.intellij.openapi.Disposable; +import com.intellij.openapi.util.Disposer; +import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.Weighted; +import com.intellij.openapi.wm.IdeGlassPane; +import com.intellij.openapi.wm.IdeGlassPaneUtil; +import com.intellij.ui.Gray; +import com.intellij.ui.JBColor; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +/** + * @author Konstantin Bulenkov + */ +public class OnePixelDivider extends Divider { + private boolean myVertical; + private Splitter mySplitter; + private boolean myResizeEnabled; + private boolean mySwitchOrientationEnabled; + protected Point myPoint; + private IdeGlassPane myGlassPane; + private final MouseAdapter myListener = new MyMouseAdapter(); + private Disposable myDisposable; + + public OnePixelDivider(boolean vertical, Splitter splitter) { + super(new GridBagLayout()); + mySplitter = splitter; + myResizeEnabled = true; + mySwitchOrientationEnabled = false; + setFocusable(false); + enableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); + //setOpaque(false); + setOrientation(vertical); + setBackground(new JBColor(Gray._153.withAlpha(128), Gray._100.withAlpha(128))); + } + + @Override + public void addNotify() { + super.addNotify(); + init(); + } + + @Override + public void removeNotify() { + super.removeNotify(); + if (myDisposable != null && !Disposer.isDisposed(myDisposable)) { + Disposer.dispose(myDisposable); + } + } + + private boolean dragging = false; + private class MyMouseAdapter extends MouseAdapter implements Weighted { + @Override + public void mousePressed(MouseEvent e) { + dragging = isInDragZone(e); + _processMouseEvent(e); + } + + boolean isInDragZone(MouseEvent e) { + final MouseEvent event = getTargetEvent(e); + final Point p = event.getPoint(); + final int r = Math.abs(isVertical() ? p.y : p.x); + return r < 6; + } + + @Override + public void mouseReleased(MouseEvent e) { + _processMouseEvent(e); + dragging = false; + } + + @Override + public void mouseMoved(MouseEvent e) { + final OnePixelDivider divider = OnePixelDivider.this; + if (isInDragZone(e)) { + myGlassPane.setCursor(divider.getCursor(), divider); + } else { + myGlassPane.setCursor(null, divider); + } + _processMouseMotionEvent(e); + } + + @Override + public void mouseDragged(MouseEvent e) { + _processMouseMotionEvent(e); + } + @Override + public double getWeight() { + return 1; + } + private void _processMouseMotionEvent(MouseEvent e) { + MouseEvent event = getTargetEvent(e); + if (event == null) { + myGlassPane.setCursor(null, myListener); + return; + } + + processMouseMotionEvent(event); + if (event.isConsumed()) { + e.consume(); + } + } + + private void _processMouseEvent(MouseEvent e) { + MouseEvent event = getTargetEvent(e); + if (event == null) { + myGlassPane.setCursor(null, myListener); + return; + } + + processMouseEvent(event); + if (event.isConsumed()) { + e.consume(); + } + } + } + + private MouseEvent getTargetEvent(MouseEvent e) { + return SwingUtilities.convertMouseEvent(e.getComponent(), e, this); + } + + private void init() { + myGlassPane = IdeGlassPaneUtil.find(this); + myDisposable = Disposer.newDisposable(); + myGlassPane.addMouseMotionPreprocessor(myListener, myDisposable); + myGlassPane.addMousePreprocessor(myListener, myDisposable); + } + + public void setOrientation(boolean vertical) { + removeAll(); + myVertical = vertical; + final int cursorType = isVertical() ? Cursor.N_RESIZE_CURSOR : Cursor.W_RESIZE_CURSOR; + setCursor(Cursor.getPredefinedCursor(cursorType)); + } + + @Override + protected void processMouseMotionEvent(MouseEvent e) { + super.processMouseMotionEvent(e); + if (!myResizeEnabled) return; + if (MouseEvent.MOUSE_DRAGGED == e.getID() && dragging) { + myPoint = SwingUtilities.convertPoint(this, e.getPoint(), mySplitter); + float proportion; + final float firstMinProportion = getMinProportion(mySplitter.getFirstComponent()); + final float secondMinProportion = getMinProportion(mySplitter.getSecondComponent()); + if (isVertical()) { + if (getHeight() > 0) { + proportion = Math.min(1.0f, Math + .max(.0f, Math.min(Math.max(firstMinProportion, (float)myPoint.y / (float)mySplitter.getHeight()), 1 - secondMinProportion))); + mySplitter.setProportion(proportion); + } + } + else { + if (getWidth() > 0) { + proportion = Math.min(1.0f, Math.max(.0f, Math.min( + Math.max(firstMinProportion, (float)myPoint.x / (float)mySplitter.getWidth()), 1 - secondMinProportion))); + mySplitter.setProportion(proportion); + } + } + } + } + + private float getMinProportion(JComponent component) { + if (component != null && + mySplitter.getFirstComponent() != null && + mySplitter.getFirstComponent().isVisible() && + mySplitter.getSecondComponent() != null && + mySplitter.getSecondComponent().isVisible()) { + if (isVertical()) { + return (float)component.getMinimumSize().height / (float)(mySplitter.getHeight() - 1); + } else { + return (float)component.getMinimumSize().width / (float)(mySplitter.getWidth() - 1); + } + } + + return 0.0f; + } + + @Override + protected void processMouseEvent(MouseEvent e) { + super.processMouseEvent(e); + if (e.getID() == MouseEvent.MOUSE_CLICKED) { + if (mySwitchOrientationEnabled + && e.getClickCount() == 1 + && SwingUtilities.isLeftMouseButton(e) && (SystemInfo.isMac ? e.isMetaDown() : e.isControlDown())) { + mySplitter.setOrientation(!mySplitter.getOrientation()); + } + if (myResizeEnabled && e.getClickCount() == 2) { + mySplitter.setProportion(.5f); + } + } + } + + public void setResizeEnabled(boolean resizeEnabled) { + myResizeEnabled = resizeEnabled; + if (!myResizeEnabled) { + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + else { + setCursor(isVertical() ? + Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR) : + Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)); + } + } + + public void setSwitchOrientationEnabled(boolean switchOrientationEnabled) { + mySwitchOrientationEnabled = switchOrientationEnabled; + } + + + public boolean isVertical() { + return myVertical; + } +} diff --git a/platform/platform-api/src/com/intellij/ui/CheckboxTreeAdapter.java b/platform/platform-api/src/com/intellij/ui/CheckboxTreeAdapter.java new file mode 100644 index 000000000000..186904a4a843 --- /dev/null +++ b/platform/platform-api/src/com/intellij/ui/CheckboxTreeAdapter.java @@ -0,0 +1,35 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.ui; + +import org.jetbrains.annotations.NotNull; + +/** + * @author nik + */ +public abstract class CheckboxTreeAdapter implements CheckboxTreeListener { + @Override + public void mouseDoubleClicked(@NotNull CheckedTreeNode node) { + } + + @Override + public void nodeStateChanged(@NotNull CheckedTreeNode node) { + } + + @Override + public void beforeNodeStateChanged(@NotNull CheckedTreeNode node) { + } +} diff --git a/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java b/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java index d9755f342a3f..88f433f7c62a 100644 --- a/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java +++ b/platform/platform-api/src/com/intellij/ui/CheckboxTreeBase.java @@ -16,67 +16,49 @@ package com.intellij.ui; import com.intellij.ui.treeStructure.Tree; +import com.intellij.util.EventDispatcher; import com.intellij.util.ui.UIUtil; -import com.intellij.util.ui.tree.TreeUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; -import javax.swing.tree.*; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreeCellRenderer; +import javax.swing.tree.TreeNode; import java.awt.*; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.MouseEvent; -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Enumeration; public class CheckboxTreeBase extends Tree { - private final CheckPolicy myCheckPolicy; - private static final CheckPolicy DEFAULT_POLICY = new CheckPolicy(true, true, false, true); + private final CheckboxTreeHelper myHelper; + private final EventDispatcher myEventDispatcher; public CheckboxTreeBase() { this(new CheckboxTreeCellRendererBase(), null); } public CheckboxTreeBase(final CheckboxTreeCellRendererBase cellRenderer, CheckedTreeNode root) { - this(cellRenderer, root, DEFAULT_POLICY); + this(cellRenderer, root, CheckboxTreeHelper.DEFAULT_POLICY); } public CheckboxTreeBase(CheckboxTreeCellRendererBase cellRenderer, @Nullable CheckedTreeNode root, CheckPolicy checkPolicy) { - myCheckPolicy = checkPolicy; + myEventDispatcher = EventDispatcher.create(CheckboxTreeListener.class); + myEventDispatcher.addListener(new CheckboxTreeListener() { + @Override + public void mouseDoubleClicked(@NotNull CheckedTreeNode node) { + onDoubleClick(node); + } - setRootVisible(false); - setShowsRootHandles(true); - setLineStyleAngled(); - TreeUtil.installActions(this); + @Override + public void nodeStateChanged(@NotNull CheckedTreeNode node) { + CheckboxTreeBase.this.onNodeStateChanged(node); + } - installRenderer(cellRenderer); - - addKeyListener(new KeyAdapter() { - public void keyPressed(KeyEvent e) { - if (isToggleEvent(e)) { - TreePath treePath = getLeadSelectionPath(); - if (treePath == null) return; - final Object o = treePath.getLastPathComponent(); - if (!(o instanceof CheckedTreeNode)) return; - CheckedTreeNode firstNode = (CheckedTreeNode)o; - boolean checked = toggleNode(firstNode); - - TreePath[] selectionPaths = getSelectionPaths(); - for (int i = 0; selectionPaths != null && i < selectionPaths.length; i++) { - final TreePath selectionPath = selectionPaths[i]; - final Object o1 = selectionPath.getLastPathComponent(); - if (!(o1 instanceof CheckedTreeNode)) continue; - CheckedTreeNode node = (CheckedTreeNode)o1; - checkNode(node, checked); - ((DefaultTreeModel)getModel()).nodeChanged(node); - } - - e.consume(); - } + @Override + public void beforeNodeStateChanged(@NotNull CheckedTreeNode node) { + CheckboxTreeBase.this.nodeStateWillChange(node); } }); + myHelper = new CheckboxTreeHelper(checkPolicy, myEventDispatcher); + myHelper.initTree(this, this, cellRenderer); setSelectionRow(0); if (root != null) { @@ -84,57 +66,39 @@ public class CheckboxTreeBase extends Tree { } } + @Deprecated public void installRenderer(final CheckboxTreeCellRendererBase cellRenderer) { setCellRenderer(cellRenderer); - new ClickListener() { - @Override - public boolean onClick(@NotNull MouseEvent e, int clickCount) { - int row = getRowForLocation(e.getX(), e.getY()); - if (row < 0) return false; - final Object o = getPathForRow(row).getLastPathComponent(); - if (!(o instanceof CheckedTreeNode)) return false; - Rectangle rowBounds = getRowBounds(row); - cellRenderer.setBounds(rowBounds); - Rectangle checkBounds = cellRenderer.myCheckbox.getBounds(); - checkBounds.setLocation(rowBounds.getLocation()); + } - if (checkBounds.height == 0) checkBounds.height = checkBounds.width = rowBounds.height; + /** + * @deprecated use {@link #setNodeState} to change node state or subscribe to {@link #addCheckboxTreeListener} to get notifications about state changes + */ + @Deprecated + protected boolean toggleNode(CheckedTreeNode node) { + setNodeState(node, !node.isChecked()); + return node.isChecked(); + } - final CheckedTreeNode node = (CheckedTreeNode)o; - if (checkBounds.contains(e.getPoint())) { - if (node.isEnabled()) { - toggleNode(node); - setSelectionRow(row); - return true; - } - } - else if (clickCount > 1) { - onDoubleClick(node); - return true; - } - return false; - } - }.installOn(this); + /** + * @deprecated use {@link #setNodeState} to change node state or subscribe to {@link #addCheckboxTreeListener} to get notifications about state changes + */ + @Deprecated + protected void checkNode(CheckedTreeNode node, boolean checked) { + setNodeState(node, checked); + } + + public void setNodeState(@NotNull CheckedTreeNode node, boolean checked) { + myHelper.setNodeState(this, node, checked); + } + + public void addCheckboxTreeListener(@NotNull CheckboxTreeListener listener) { + myEventDispatcher.addListener(listener); } protected void onDoubleClick(final CheckedTreeNode node) { } - protected boolean isToggleEvent(KeyEvent e) { - return e.getKeyCode() == KeyEvent.VK_SPACE; - } - - protected boolean toggleNode(CheckedTreeNode node) { - boolean checked = !node.isChecked(); - checkNode(node, checked); - - // notify model listeners about model change - final TreeModel model = getModel(); - model.valueForPathChanged(new TreePath(node.getPath()), node.getUserObject()); - - return checked; - } - /** * Collect checked leaf nodes of the type {@code nodeType} and that are accepted by * {@code filter} @@ -144,38 +108,8 @@ public class CheckboxTreeBase extends Tree { * @param the type of the node * @return an array of collected nodes */ - @SuppressWarnings("unchecked") public T[] getCheckedNodes(final Class nodeType, @Nullable final NodeFilter filter) { - final ArrayList nodes = new ArrayList(); - final Object root = getModel().getRoot(); - if (!(root instanceof CheckedTreeNode)) { - throw new IllegalStateException( - "The root must be instance of the " + CheckedTreeNode.class.getName() + ": " + root.getClass().getName()); - } - new Object() { - @SuppressWarnings("unchecked") - public void collect(CheckedTreeNode node) { - if (node.isLeaf()) { - Object userObject = node.getUserObject(); - if (node.isChecked() && userObject != null && nodeType.isAssignableFrom(userObject.getClass())) { - final T value = (T)userObject; - if (filter != null && !filter.accept(value)) return; - nodes.add(value); - } - } - else { - for (int i = 0; i < node.getChildCount(); i++) { - final TreeNode child = node.getChildAt(i); - if (child instanceof CheckedTreeNode) { - collect((CheckedTreeNode)child); - } - } - } - } - }.collect((CheckedTreeNode)root); - T[] result = (T[])Array.newInstance(nodeType, nodes.size()); - nodes.toArray(result); - return result; + return CheckboxTreeHelper.getCheckedNodes(nodeType, filter, getModel()); } @@ -184,118 +118,14 @@ public class CheckboxTreeBase extends Tree { return -1; } - protected void checkNode(CheckedTreeNode node, boolean checked) { - adjustParentsAndChildren(node, checked); - repaint(); - } - protected void onNodeStateChanged(CheckedTreeNode node) { - } protected void nodeStateWillChange(CheckedTreeNode node) { - - } - - protected void adjustParentsAndChildren(final CheckedTreeNode node, final boolean checked) { - changeNodeState(node, checked); - if (!checked) { - if (myCheckPolicy.uncheckParentWithUncheckedChild) { - TreeNode parent = node.getParent(); - while (parent != null) { - if (parent instanceof CheckedTreeNode) { - changeNodeState((CheckedTreeNode)parent, false); - } - parent = parent.getParent(); - } - } - if (myCheckPolicy.uncheckChildrenWithUncheckedParent) { - uncheckChildren(node); - } - - } - else { - if (myCheckPolicy.checkChildrenWithCheckedParent) { - checkChildren(node); - } - - if (myCheckPolicy.checkParentWithCheckedChild) { - TreeNode parent = node.getParent(); - while (parent != null) { - if (parent instanceof CheckedTreeNode) { - changeNodeState((CheckedTreeNode)parent, true); - } - parent = parent.getParent(); - } - } - - } - repaint(); - } - - private void changeNodeState(final CheckedTreeNode node, final boolean checked) { - if (node.isChecked() != checked) { - nodeStateWillChange(node); - node.setChecked(checked); - onNodeStateChanged(node); - } - } - - private void uncheckChildren(final CheckedTreeNode node) { - final Enumeration children = node.children(); - while (children.hasMoreElements()) { - final Object o = children.nextElement(); - if (!(o instanceof CheckedTreeNode)) continue; - CheckedTreeNode child = (CheckedTreeNode)o; - changeNodeState(child, false); - uncheckChildren(child); - } - } - - private void checkChildren(final CheckedTreeNode node) { - final Enumeration children = node.children(); - while (children.hasMoreElements()) { - final Object o = children.nextElement(); - if (!(o instanceof CheckedTreeNode)) continue; - CheckedTreeNode child = (CheckedTreeNode)o; - changeNodeState(child, true); - checkChildren(child); - } } + @Deprecated protected void adjustParents(final CheckedTreeNode node, final boolean checked) { - TreeNode parentNode = node.getParent(); - if (!(parentNode instanceof CheckedTreeNode)) return; - CheckedTreeNode parent = (CheckedTreeNode)parentNode; - - if (!checked && isAllChildrenUnchecked(parent)) { - changeNodeState(parent, false); - adjustParents(parent, false); - } - else if (checked && isAllChildrenChecked(parent)) { - changeNodeState(parent, true); - adjustParents(parent, true); - } - } - - private static boolean isAllChildrenUnchecked(final CheckedTreeNode node) { - for (int i = 0; i < node.getChildCount(); i++) { - final TreeNode o = node.getChildAt(i); - if ((o instanceof CheckedTreeNode) && ((CheckedTreeNode)o).isChecked()) { - return false; - } - } - return true; - } - - private static boolean isAllChildrenChecked(final CheckedTreeNode node) { - for (int i = 0; i < node.getChildCount(); i++) { - final TreeNode o = node.getChildAt(i); - if ((o instanceof CheckedTreeNode) && !((CheckedTreeNode)o).isChecked()) { - return false; - } - } - return true; } public static class CheckboxTreeCellRendererBase extends JPanel implements TreeCellRenderer { @@ -395,8 +225,8 @@ public class CheckboxTreeBase extends Tree { } /** - * @deprecated * @see CheckboxTreeCellRendererBase#customizeRenderer(javax.swing.JTree, Object, boolean, boolean, boolean, int, boolean) + * @deprecated */ @Deprecated public void customizeCellRenderer(JTree tree, diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/CheckboxTreeTable.java b/platform/platform-api/src/com/intellij/ui/CheckboxTreeHelper.java similarity index 55% rename from platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/CheckboxTreeTable.java rename to platform/platform-api/src/com/intellij/ui/CheckboxTreeHelper.java index dd72da957fa2..3048d131caa7 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/CheckboxTreeTable.java +++ b/platform/platform-api/src/com/intellij/ui/CheckboxTreeHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,19 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.openapi.roots.libraries.ui.impl; +package com.intellij.ui; -import com.intellij.ui.CheckboxTree; -import com.intellij.ui.CheckedTreeNode; -import com.intellij.ui.ClickListener; -import com.intellij.ui.dualView.TreeTableView; -import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns; -import com.intellij.ui.treeStructure.treetable.TreeTableTree; -import com.intellij.util.ui.ColumnInfo; +import com.intellij.ui.speedSearch.SpeedSearchSupply; +import com.intellij.ui.treeStructure.Tree; +import com.intellij.util.EventDispatcher; import com.intellij.util.ui.tree.TreeUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -import javax.swing.tree.DefaultTreeModel; +import javax.swing.*; import javax.swing.tree.TreeModel; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; @@ -40,21 +37,135 @@ import java.util.Enumeration; /** * @author nik */ -public class CheckboxTreeTable extends TreeTableView { - public CheckboxTreeTable(CheckedTreeNode root, CheckboxTree.CheckboxTreeCellRenderer renderer, final ColumnInfo[] columns) { - super(new ListTreeTableModelOnColumns(root, columns)); - initTree(getTree(), renderer); +class CheckboxTreeHelper { + static final CheckboxTreeBase.CheckPolicy DEFAULT_POLICY = new CheckboxTreeBase.CheckPolicy(true, true, false, true); + private final CheckboxTreeBase.CheckPolicy myCheckPolicy; + private final EventDispatcher myEventDispatcher; + + CheckboxTreeHelper(CheckboxTreeBase.CheckPolicy checkPolicy, EventDispatcher dispatcher) { + myCheckPolicy = checkPolicy; + myEventDispatcher = dispatcher; } - //todo[nik] I hate to copy-paste but have to copy the code below from CheckboxTreeBase to support CheckboxTree inside TreeTable in IDEA 11.1.x branch - //todo[nik] I solemnly swear to get rid of this code in IDEA 12 branch - private void initTree(final TreeTableTree tree, final CheckboxTree.CheckboxTreeCellRenderer cellRenderer) { + public void initTree(@NotNull final Tree tree, JComponent mainComponent, CheckboxTreeBase.CheckboxTreeCellRendererBase cellRenderer) { tree.setCellRenderer(cellRenderer); tree.setRootVisible(false); tree.setShowsRootHandles(true); tree.setLineStyleAngled(); TreeUtil.installActions(tree); + setupKeyListener(tree, mainComponent); + setupMouseListener(tree, mainComponent, cellRenderer); + } + + public void setNodeState(Tree tree, CheckedTreeNode node, boolean checked) { + changeNodeState(node, checked); + adjustParentsAndChildren(node, checked); + tree.repaint(); + + // notify model listeners about model change + final TreeModel model = tree.getModel(); + model.valueForPathChanged(new TreePath(node.getPath()), node.getUserObject()); + } + + private void toggleNode(Tree tree, CheckedTreeNode node) { + setNodeState(tree, node, !node.isChecked()); + } + + private void adjustParentsAndChildren(final CheckedTreeNode node, final boolean checked) { + if (!checked) { + if (myCheckPolicy.uncheckParentWithUncheckedChild) { + TreeNode parent = node.getParent(); + while (parent != null) { + if (parent instanceof CheckedTreeNode) { + changeNodeState((CheckedTreeNode)parent, false); + } + parent = parent.getParent(); + } + } + if (myCheckPolicy.uncheckChildrenWithUncheckedParent) { + uncheckChildren(node); + } + } + else { + if (myCheckPolicy.checkChildrenWithCheckedParent) { + checkChildren(node); + } + + if (myCheckPolicy.checkParentWithCheckedChild) { + TreeNode parent = node.getParent(); + while (parent != null) { + if (parent instanceof CheckedTreeNode) { + changeNodeState((CheckedTreeNode)parent, true); + } + parent = parent.getParent(); + } + } + } + } + + private void changeNodeState(final CheckedTreeNode node, final boolean checked) { + if (node.isChecked() != checked) { + myEventDispatcher.getMulticaster().beforeNodeStateChanged(node); + node.setChecked(checked); + myEventDispatcher.getMulticaster().nodeStateChanged(node); + } + } + + private void uncheckChildren(final CheckedTreeNode node) { + final Enumeration children = node.children(); + while (children.hasMoreElements()) { + final Object o = children.nextElement(); + if (!(o instanceof CheckedTreeNode)) continue; + CheckedTreeNode child = (CheckedTreeNode)o; + changeNodeState(child, false); + uncheckChildren(child); + } + } + + private void checkChildren(final CheckedTreeNode node) { + final Enumeration children = node.children(); + while (children.hasMoreElements()) { + final Object o = children.nextElement(); + if (!(o instanceof CheckedTreeNode)) continue; + CheckedTreeNode child = (CheckedTreeNode)o; + changeNodeState(child, true); + checkChildren(child); + } + } + + private void setupKeyListener(final Tree tree, final JComponent mainComponent) { + mainComponent.addKeyListener(new KeyAdapter() { + public void keyPressed(@NotNull KeyEvent e) { + if (isToggleEvent(e, mainComponent)) { + TreePath treePath = tree.getLeadSelectionPath(); + if (treePath == null) return; + final Object o = treePath.getLastPathComponent(); + if (!(o instanceof CheckedTreeNode)) return; + CheckedTreeNode firstNode = (CheckedTreeNode)o; + toggleNode(tree, firstNode); + boolean checked = firstNode.isChecked(); + + TreePath[] selectionPaths = tree.getSelectionPaths(); + for (int i = 0; selectionPaths != null && i < selectionPaths.length; i++) { + final TreePath selectionPath = selectionPaths[i]; + final Object o1 = selectionPath.getLastPathComponent(); + if (!(o1 instanceof CheckedTreeNode)) continue; + CheckedTreeNode node = (CheckedTreeNode)o1; + setNodeState(tree, node, checked); + } + + e.consume(); + } + } + }); + } + + private static boolean isToggleEvent(KeyEvent e, JComponent mainComponent) { + return e.getKeyCode() == KeyEvent.VK_SPACE && SpeedSearchSupply.getSupply(mainComponent) == null; + } + + private void setupMouseListener(final Tree tree, JComponent mainComponent, final CheckboxTreeBase.CheckboxTreeCellRendererBase cellRenderer) { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { @@ -67,122 +178,33 @@ public class CheckboxTreeTable extends TreeTableView { Rectangle checkBounds = cellRenderer.myCheckbox.getBounds(); checkBounds.setLocation(rowBounds.getLocation()); - if (checkBounds.height == 0) checkBounds.height = rowBounds.height; + if (checkBounds.height == 0) checkBounds.height = checkBounds.width = rowBounds.height; final CheckedTreeNode node = (CheckedTreeNode)o; if (checkBounds.contains(e.getPoint())) { if (node.isEnabled()) { - toggleNode(node); + toggleNode(tree, node); tree.setSelectionRow(row); return true; } } + else if (clickCount > 1) { + myEventDispatcher.getMulticaster().mouseDoubleClicked(node); + return true; + } return false; } - }.installOn(this); - - addKeyListener(new KeyAdapter() { - @Override - public void keyPressed(KeyEvent e) { - if (isToggleEvent(e)) { - TreePath treePath = tree.getLeadSelectionPath(); - if (treePath == null) return; - final Object o = treePath.getLastPathComponent(); - if (!(o instanceof CheckedTreeNode)) return; - CheckedTreeNode firstNode = (CheckedTreeNode)o; - boolean checked = toggleNode(firstNode); - - TreePath[] selectionPaths = tree.getSelectionPaths(); - for (int i = 0; selectionPaths != null && i < selectionPaths.length; i++) { - final TreePath selectionPath = selectionPaths[i]; - final Object o1 = selectionPath.getLastPathComponent(); - if (!(o1 instanceof CheckedTreeNode)) continue; - CheckedTreeNode node = (CheckedTreeNode)o1; - checkNode(node, checked); - ((DefaultTreeModel)tree.getModel()).nodeChanged(node); - } - - e.consume(); - } - } - }); - - tree.setSelectionRow(0); - } - - private static boolean isToggleEvent(KeyEvent e) { - return e.getKeyCode() == KeyEvent.VK_SPACE; - } - - protected boolean toggleNode(CheckedTreeNode node) { - boolean checked = !node.isChecked(); - checkNode(node, checked); - - // notify model listeners about model change - final TreeModel model = getTree().getModel(); - model.valueForPathChanged(new TreePath(node.getPath()), node.getUserObject()); - - return checked; - } - - private void checkNode(CheckedTreeNode node, boolean checked) { - adjustParentsAndChildren(node, checked); - repaint(); - } - - private void adjustParentsAndChildren(final CheckedTreeNode node, final boolean checked) { - changeNodeState(node, checked); - if (!checked) { - TreeNode parent = node.getParent(); - while (parent != null) { - if (parent instanceof CheckedTreeNode) { - changeNodeState((CheckedTreeNode)parent, false); - } - parent = parent.getParent(); - } - uncheckChildren(node); - } - else { - checkChildren(node); - } - repaint(); - } - - private static void changeNodeState(final CheckedTreeNode node, final boolean checked) { - if (node.isChecked() != checked) { - node.setChecked(checked); - } - } - - private static void uncheckChildren(final CheckedTreeNode node) { - final Enumeration children = node.children(); - while (children.hasMoreElements()) { - final Object o = children.nextElement(); - if (!(o instanceof CheckedTreeNode)) continue; - CheckedTreeNode child = (CheckedTreeNode)o; - changeNodeState(child, false); - uncheckChildren(child); - } - } - - private static void checkChildren(final CheckedTreeNode node) { - final Enumeration children = node.children(); - while (children.hasMoreElements()) { - final Object o = children.nextElement(); - if (!(o instanceof CheckedTreeNode)) continue; - CheckedTreeNode child = (CheckedTreeNode)o; - changeNodeState(child, true); - checkChildren(child); - } + }.installOn(mainComponent); } @SuppressWarnings("unchecked") - public T[] getCheckedNodes(final Class nodeType) { + public static T[] getCheckedNodes(final Class nodeType, @Nullable final Tree.NodeFilter filter, final TreeModel model) { final ArrayList nodes = new ArrayList(); - final Object root = getTree().getModel().getRoot(); + final Object root = model.getRoot(); if (!(root instanceof CheckedTreeNode)) { - throw new IllegalStateException("The root must be instance of the " + CheckedTreeNode.class.getName() + ": " + root.getClass().getName()); + throw new IllegalStateException( + "The root must be instance of the " + CheckedTreeNode.class.getName() + ": " + root.getClass().getName()); } new Object() { @SuppressWarnings("unchecked") @@ -191,6 +213,7 @@ public class CheckboxTreeTable extends TreeTableView { Object userObject = node.getUserObject(); if (node.isChecked() && userObject != null && nodeType.isAssignableFrom(userObject.getClass())) { final T value = (T)userObject; + if (filter != null && !filter.accept(value)) return; nodes.add(value); } } diff --git a/platform/platform-api/src/com/intellij/ui/CheckboxTreeListener.java b/platform/platform-api/src/com/intellij/ui/CheckboxTreeListener.java new file mode 100644 index 000000000000..792c4589c85d --- /dev/null +++ b/platform/platform-api/src/com/intellij/ui/CheckboxTreeListener.java @@ -0,0 +1,31 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.ui; + +import org.jetbrains.annotations.NotNull; + +import java.util.EventListener; + +/** + * @author nik + */ +public interface CheckboxTreeListener extends EventListener { + void mouseDoubleClicked(@NotNull CheckedTreeNode node); + + void nodeStateChanged(@NotNull CheckedTreeNode node); + + void beforeNodeStateChanged(@NotNull CheckedTreeNode node); +} diff --git a/platform/platform-api/src/com/intellij/ui/JBSplitter.java b/platform/platform-api/src/com/intellij/ui/JBSplitter.java index b4000dbcfae2..5f01602d92c5 100644 --- a/platform/platform-api/src/com/intellij/ui/JBSplitter.java +++ b/platform/platform-api/src/com/intellij/ui/JBSplitter.java @@ -94,14 +94,6 @@ public class JBSplitter extends Splitter { saveProportion(); } - public void setOnePixelMode() { - setDividerWidth(1); - setShowDividerIcon(false); - getDivider().setBackground(new JBColor(Gray._153.withAlpha(128), Gray._100.withAlpha(128))); - setShowDividerControls(false); - setOrientation(getOrientation()); - } - protected void loadProportion() { if (! StringUtil.isEmpty(mySplitterProportionKey)) { setProportion(PropertiesComponent.getInstance().getFloat(mySplitterProportionKey, myProportion)); diff --git a/platform/platform-api/src/com/intellij/ui/OnePixelSplitter.java b/platform/platform-api/src/com/intellij/ui/OnePixelSplitter.java new file mode 100644 index 000000000000..15dd5fdc2abb --- /dev/null +++ b/platform/platform-api/src/com/intellij/ui/OnePixelSplitter.java @@ -0,0 +1,59 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.ui; + +import com.intellij.openapi.ui.Divider; +import com.intellij.openapi.ui.OnePixelDivider; + +/** + * @author Konstantin Bulenkov + */ +public class OnePixelSplitter extends JBSplitter { + + public OnePixelSplitter() { + super(); + init(); + } + + public OnePixelSplitter(boolean vertical) { + super(vertical); + init(); + } + + public OnePixelSplitter(boolean vertical, float proportion) { + super(vertical, proportion); + init(); + } + + public OnePixelSplitter(float proportion) { + super(proportion); + init(); + } + + public OnePixelSplitter(boolean vertical, float proportion, float minProp, float maxProp) { + super(vertical, proportion, minProp, maxProp); + init(); + } + + protected void init() { + setDividerWidth(1); + } + + @Override + protected Divider createDivider() { + return new OnePixelDivider(isVertical(), this); + } +} diff --git a/platform/platform-api/src/com/intellij/ui/tabs/TabInfo.java b/platform/platform-api/src/com/intellij/ui/tabs/TabInfo.java index d1dfa976e479..c8c944c86e4a 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/TabInfo.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/TabInfo.java @@ -92,6 +92,7 @@ public final class TabInfo implements Queryable, PlaceProvider { * out of its container. (IDEA-61536) */ private WeakReference myPreviousSelection = new WeakReference(null); + private boolean myTitleShortened; public TabInfo(final JComponent component) { myComponent = component; @@ -392,6 +393,14 @@ public final class TabInfo implements Queryable, PlaceProvider { return myPreviousSelection.get(); } + public boolean isTitleShortened() { + return myTitleShortened; + } + + public void setTitleIsShortened(boolean titleIsShortened) { + myTitleShortened = titleIsShortened; + } + public interface DragOutDelegate { void dragOutStarted(MouseEvent mouseEvent, TabInfo info); diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/JBEditorTabs.java b/platform/platform-api/src/com/intellij/ui/tabs/impl/JBEditorTabs.java index 8e5844fd4684..a842f623ac45 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/impl/JBEditorTabs.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/JBEditorTabs.java @@ -44,6 +44,7 @@ import java.util.List; */ public class JBEditorTabs extends JBTabsImpl { public static final String TABS_ALPHABETICAL_KEY = "tabs.alphabetical"; + static final String TABS_SHORTEN_TITLE_IF_NEED = "tabs.shorten.title.if.need"; private JBEditorTabsPainter myDarkPainter = new DarculaEditorTabsPainter(); private JBEditorTabsPainter myDefaultPainter = new DefaultEditorTabsPainter(); @@ -60,6 +61,13 @@ public class JBEditorTabs extends JBTabsImpl { return super.createSingleRowLayout(); } + @Override + protected TabLabel createTabLabel(TabInfo info) { + TabLabel label = super.createTabLabel(info); + label.putClientProperty(TABS_SHORTEN_TITLE_IF_NEED, Boolean.TRUE); + return label; + } + @Override public boolean isEditorTabs() { return true; diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/TabLabel.java b/platform/platform-api/src/com/intellij/ui/tabs/impl/TabLabel.java index 21c36d5dd66a..a360c4e9294f 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/impl/TabLabel.java +++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/TabLabel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import com.intellij.openapi.actionSystem.ActionPlaces; import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.openapi.util.Pass; import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.*; import com.intellij.ui.components.panels.Wrapper; import com.intellij.ui.tabs.JBTabsPosition; @@ -317,6 +318,16 @@ public class TabLabel extends JPanel { public void setText(final SimpleColoredText text) { + myInfo.setTitleIsShortened(false); + if (text != null && text.getTexts().size() == 1 && Boolean.TRUE == getClientProperty(JBEditorTabs.TABS_SHORTEN_TITLE_IF_NEED)) { + String title = text.getTexts().get(0); + if (title.length() > UISettings.getInstance().EDITOR_TAB_TITLE_LIMIT) { + SimpleTextAttributes attributes = text.getAttributes().get(0); + text.clear(); + text.append(StringUtil.getShortened(title, UISettings.getInstance().EDITOR_TAB_TITLE_LIMIT), attributes); + myInfo.setTitleIsShortened(true); + } + } myLabel.change(new Runnable() { public void run() { myLabel.clear(); diff --git a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java b/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java index a916d9e5bb34..372b14efcfe6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java +++ b/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareClipboardWithSelection.java @@ -73,8 +73,9 @@ public class CompareClipboardWithSelection extends BaseDiffAction { SelectionModel selectionModel = myEditor.getSelectionModel(); if (selectionModel.hasSelection()) { TextRange range = new TextRange(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd()); + boolean forceReadOnly = myEditor.isViewer(); myContents[1] = new FragmentContent(DiffContent.fromDocument(getProject(), getDocument()), - range, getProject(), getDocumentFile(getDocument())); + range, getProject(), getDocumentFile(getDocument()), forceReadOnly); } else { myContents [1] = DiffContent.fromDocument(getProject(), getDocument()); diff --git a/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffSplitter.java b/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffSplitter.java index 5f4507dcfad3..4b6a289d476e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffSplitter.java +++ b/platform/platform-impl/src/com/intellij/openapi/diff/impl/DiffSplitter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import com.intellij.openapi.diff.impl.highlighting.DiffPanelState; import com.intellij.openapi.diff.impl.splitter.DiffDividerPaint; import com.intellij.openapi.editor.event.VisibleAreaEvent; import com.intellij.openapi.editor.event.VisibleAreaListener; +import com.intellij.openapi.ui.Divider; import com.intellij.openapi.ui.Splitter; import javax.swing.*; @@ -43,8 +44,8 @@ class DiffSplitter extends Splitter implements DiffSplitterI { setHonorComponentsMinimumSize(false); } - protected Splitter.Divider createDivider() { - return new Divider(){ + protected Divider createDivider() { + return new DividerImpl(){ public void paint(Graphics g) { super.paint(g); myPaint.paint(g, this); diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabbedContainer.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabbedContainer.java index c2353d5db207..03b03faffe03 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabbedContainer.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabbedContainer.java @@ -277,6 +277,8 @@ public final class EditorTabbedContainer implements Disposable, CloseAction.Clos myTabs.getTabAt(index).setTooltipText(text); } + public boolean isTitleShortened(int index) { return myTabs.getTabAt(index).isTitleShortened(); } + public void setBackgroundColorAt(final int index, final Color color) { myTabs.getTabAt(index).setTabColor(color); } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java index 14b2afe16345..06a3966ade1d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorWindow.java @@ -464,6 +464,10 @@ public class EditorWindow { } } + private boolean isTitleShortenedAt(int index) { + return myTabbedPane != null && myTabbedPane.isTitleShortened(index); + } + private void setBackgroundColorAt(final int index, final Color color) { if (myTabbedPane != null) { myTabbedPane.setBackgroundColorAt(index, color); @@ -908,7 +912,9 @@ public class EditorWindow { final int index = findEditorIndex(findFileComposite(file)); if (index != -1) { setTitleAt(index, EditorTabbedContainer.calcTabTitle(getManager().getProject(), file)); - setToolTipTextAt(index, UISettings.getInstance().SHOW_TABS_TOOLTIPS ? getManager().getFileTooltipText(file) : null); + setToolTipTextAt(index, UISettings.getInstance().SHOW_TABS_TOOLTIPS || isTitleShortenedAt(index) + ? getManager().getFileTooltipText(file) + : null); } } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorProvider.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorProvider.java index 60b42f75c22c..690e7c7d2820 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorProvider.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/TextEditorProvider.java @@ -278,19 +278,22 @@ public class TextEditorProvider implements FileEditorProvider, DumbAware { } protected void setStateImpl(final Project project, final Editor editor, final TextEditorState state){ - if (editor.getCaretModel().supportsMultipleCarets()) { - CaretModel caretModel = editor.getCaretModel(); - List states = new ArrayList(state.CARETS.length); - for (TextEditorState.CaretState caretState : state.CARETS) { - states.add(new CaretState(new LogicalPosition(caretState.LINE, caretState.COLUMN), - new LogicalPosition(caretState.SELECTION_START_LINE, caretState.SELECTION_START_COLUMN), - new LogicalPosition(caretState.SELECTION_END_LINE, caretState.SELECTION_END_COLUMN))); + if (state.CARETS != null) { + if (editor.getCaretModel().supportsMultipleCarets()) { + CaretModel caretModel = editor.getCaretModel(); + List states = new ArrayList(state.CARETS.length); + for (TextEditorState.CaretState caretState : state.CARETS) { + states.add(new CaretState(new LogicalPosition(caretState.LINE, caretState.COLUMN), + new LogicalPosition(caretState.SELECTION_START_LINE, caretState.SELECTION_START_COLUMN), + new LogicalPosition(caretState.SELECTION_END_LINE, caretState.SELECTION_END_COLUMN))); + } + caretModel.setCaretsAndSelections(states); + } + else { + LogicalPosition pos = new LogicalPosition(state.CARETS[0].LINE, state.CARETS[0].COLUMN); + editor.getCaretModel().moveToLogicalPosition(pos); + editor.getSelectionModel().removeSelection(); } - caretModel.setCaretsAndSelections(states); - } else { - LogicalPosition pos = new LogicalPosition(state.CARETS[0].LINE, state.CARETS[0].COLUMN); - editor.getCaretModel().moveToLogicalPosition(pos); - editor.getSelectionModel().removeSelection(); } EditorEx editorEx = editor instanceof EditorEx ? (EditorEx)editor : null; boolean preciselyScrollVertically = diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java index d33ef5bfb3d1..71f964504102 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ import com.intellij.ide.dnd.DnDAware; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.ui.Divider; import com.intellij.openapi.ui.Painter; -import com.intellij.openapi.ui.Splitter; import com.intellij.openapi.ui.impl.GlassPaneDialogWrapperPeer; import com.intellij.openapi.ui.popup.Balloon; import com.intellij.openapi.ui.popup.JBPopupFactory; @@ -381,7 +381,7 @@ public class IdeGlassPaneImpl extends JPanel implements IdeGlassPaneEx, IdeEvent private boolean canProcessCursorFor(Component target) { if (target instanceof JMenu || target instanceof JMenuItem || - target instanceof Splitter.Divider || + target instanceof Divider || target instanceof JSeparator || (target instanceof JEditorPane && ((JEditorPane)target).getEditorKit() instanceof HTMLEditorKit)) { return false; diff --git a/platform/platform-impl/src/com/intellij/ui/CheckboxTree.java b/platform/platform-impl/src/com/intellij/ui/CheckboxTree.java index c91be65978c1..1443a9303e39 100644 --- a/platform/platform-impl/src/com/intellij/ui/CheckboxTree.java +++ b/platform/platform-impl/src/com/intellij/ui/CheckboxTree.java @@ -15,8 +15,6 @@ */ package com.intellij.ui; -import java.awt.event.KeyEvent; - /** * User: lex * Date: Sep 18, 2003 @@ -56,11 +54,4 @@ public class CheckboxTree extends CheckboxTreeBase { protected void installSpeedSearch() { new TreeSpeedSearch(this); } - - - protected boolean isToggleEvent(KeyEvent e) { - return super.isToggleEvent(e) && !SpeedSearchBase.hasActiveSpeedSearch(this); - } - - } diff --git a/platform/platform-impl/src/com/intellij/ui/CheckboxTreeTable.java b/platform/platform-impl/src/com/intellij/ui/CheckboxTreeTable.java new file mode 100644 index 000000000000..369dd0cc1803 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/ui/CheckboxTreeTable.java @@ -0,0 +1,47 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.ui; + +import com.intellij.ui.dualView.TreeTableView; +import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns; +import com.intellij.ui.treeStructure.treetable.TreeTableTree; +import com.intellij.util.EventDispatcher; +import com.intellij.util.ui.ColumnInfo; +import org.jetbrains.annotations.NotNull; + +/** + * @author nik + */ +public class CheckboxTreeTable extends TreeTableView { + private final EventDispatcher myEventDispatcher; + + public CheckboxTreeTable(CheckedTreeNode root, CheckboxTree.CheckboxTreeCellRenderer renderer, final ColumnInfo[] columns) { + super(new ListTreeTableModelOnColumns(root, columns)); + final TreeTableTree tree = getTree(); + myEventDispatcher = EventDispatcher.create(CheckboxTreeListener.class); + CheckboxTreeHelper helper = new CheckboxTreeHelper(CheckboxTreeHelper.DEFAULT_POLICY, myEventDispatcher); + helper.initTree(tree, this, renderer); + tree.setSelectionRow(0); + } + + public void addCheckboxTreeListener(@NotNull CheckboxTreeListener listener) { + myEventDispatcher.addListener(listener); + } + + public T[] getCheckedNodes(final Class nodeType) { + return CheckboxTreeHelper.getCheckedNodes(nodeType, null, getTree().getModel()); + } +} diff --git a/platform/platform-impl/src/com/intellij/ui/SplitterWithSecondHideable.java b/platform/platform-impl/src/com/intellij/ui/SplitterWithSecondHideable.java index 99c41b52cbea..e219b778f44d 100644 --- a/platform/platform-impl/src/com/intellij/ui/SplitterWithSecondHideable.java +++ b/platform/platform-impl/src/com/intellij/ui/SplitterWithSecondHideable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package com.intellij.ui; import com.intellij.icons.AllIcons; +import com.intellij.openapi.ui.Divider; import com.intellij.openapi.ui.PseudoSplitter; import com.intellij.openapi.ui.Splitter; import com.intellij.openapi.vcs.changes.RefreshablePanel; @@ -41,7 +42,7 @@ public abstract class SplitterWithSecondHideable { private final boolean myVertical; private final OnOffListener myListener; private final JPanel myFictivePanel; - private Splitter.Divider mySuperDivider; + private Splitter.DividerImpl mySuperDivider; private float myPreviousProportion; public SplitterWithSecondHideable(final boolean vertical, @@ -185,7 +186,7 @@ public abstract class SplitterWithSecondHideable { return vertical ? myTitledSeparator.getHeight() : myTitledSeparator.getWidth(); } - class MyDivider extends Divider { + class MyDivider extends DividerImpl { @Override public void processMouseMotionEvent(MouseEvent e) { super.processMouseMotionEvent(e); diff --git a/platform/platform-impl/src/org/jetbrains/io/PortUnificationServerHandler.java b/platform/platform-impl/src/org/jetbrains/io/PortUnificationServerHandler.java index 3f88327d3d28..1dbf57785dac 100644 --- a/platform/platform-impl/src/org/jetbrains/io/PortUnificationServerHandler.java +++ b/platform/platform-impl/src/org/jetbrains/io/PortUnificationServerHandler.java @@ -113,7 +113,7 @@ class PortUnificationServerHandler extends Decoder { @Override public void write(ChannelHandlerContext context, Object message, ChannelPromise promise) throws Exception { if (message instanceof HttpResponse) { -// BuiltInServer.LOG.debug("OUT HTTP:\n" + message); + //BuiltInServer.LOG.debug("OUT HTTP:\n" + message); HttpResponse response = (HttpResponse)message; BuiltInServer.LOG.debug("OUT HTTP: " + response.status().code() + " " + response.headers().get(CONTENT_TYPE)); } diff --git a/platform/platform-resources-en/src/messages/ApplicationBundle.properties b/platform/platform-resources-en/src/messages/ApplicationBundle.properties index bbd737afedf1..5d539357ca3d 100644 --- a/platform/platform-resources-en/src/messages/ApplicationBundle.properties +++ b/platform/platform-resources-en/src/messages/ApplicationBundle.properties @@ -360,6 +360,7 @@ label.collapse.by.default=Collapse by default: checkbox.show.code.folding.outline=Show code folding outline group.tab.appearance=Tab Appearance editbox.tab.limit=Tab limit: +editbox.tab.title.limit=Tab title limit: combobox.editor.tab.placement=Placement: checkbox.editor.tabs.in.single.row=Show tabs in single row checkbox.editor.tabs.show.close.button=Show "close" button on editor tabs diff --git a/platform/platform-resources/src/idea/Keymap_EclipseMac.xml b/platform/platform-resources/src/idea/Keymap_EclipseMac.xml index dc1dcb5e66ec..f35e24c776b0 100644 --- a/platform/platform-resources/src/idea/Keymap_EclipseMac.xml +++ b/platform/platform-resources/src/idea/Keymap_EclipseMac.xml @@ -312,6 +312,10 @@ + + + + diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index 9cebd282ded6..869a8a754886 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -563,7 +563,6 @@ - diff --git a/platform/platform-tests/testSrc/com/intellij/history/core/PathsTest.java b/platform/platform-tests/testSrc/com/intellij/history/core/PathsTest.java index 32f5ec2eb16e..f8bc13e05aed 100644 --- a/platform/platform-tests/testSrc/com/intellij/history/core/PathsTest.java +++ b/platform/platform-tests/testSrc/com/intellij/history/core/PathsTest.java @@ -103,6 +103,11 @@ public class PathsTest extends LocalHistoryTestCase { assertEquals(array("/", "foo"), ContainerUtil.collect(Paths.split("/foo").iterator())); assertEquals(array("/"), ContainerUtil.collect(Paths.split("/").iterator())); assertEquals(array("c:", "foo", "bar"), ContainerUtil.collect(Paths.split("c:/foo/bar").iterator())); + + assertEquals(array("//"), ContainerUtil.collect(Paths.split("//").iterator())); + assertEquals(array("//foo"), ContainerUtil.collect(Paths.split("//foo").iterator())); + assertEquals(array("//foo"), ContainerUtil.collect(Paths.split("//foo/").iterator())); + assertEquals(array("//foo", "bar"), ContainerUtil.collect(Paths.split("//foo/bar").iterator())); } @Test diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/CompiledPattern.java b/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/CompiledPattern.java index 565f80ac01ce..70c1cdccd03e 100644 --- a/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/CompiledPattern.java +++ b/platform/structuralsearch/source/com/intellij/structuralsearch/impl/matcher/CompiledPattern.java @@ -82,7 +82,7 @@ public abstract class CompiledPattern { public boolean isRealTypedVar(PsiElement element) { if (element!=null && element.getTextLength()>0) { String str = getTypedVarString(element); - if (str.length()==0) { + if (str == null || str.length()==0) { return false; } return isTypedVar( str ); diff --git a/platform/usageView/src/com/intellij/usages/ChunkExtractor.java b/platform/usageView/src/com/intellij/usages/ChunkExtractor.java index eea15c93605d..dbbaeb48b72f 100644 --- a/platform/usageView/src/com/intellij/usages/ChunkExtractor.java +++ b/platform/usageView/src/com/intellij/usages/ChunkExtractor.java @@ -204,7 +204,7 @@ public class ChunkExtractor { highlighter.restart(chars); myDocumentStamp = myDocument.getModificationStamp(); } else if(lexer.getTokenStart() > start) { - highlighter.resetPosition(0); + highlighter.resetPosition(0); // todo restart from nearest position with initial state } boolean isBeginning = true; diff --git a/platform/usageView/src/com/intellij/usages/UsageInfo2UsageAdapter.java b/platform/usageView/src/com/intellij/usages/UsageInfo2UsageAdapter.java index d6c47e658df6..418890ce17d9 100644 --- a/platform/usageView/src/com/intellij/usages/UsageInfo2UsageAdapter.java +++ b/platform/usageView/src/com/intellij/usages/UsageInfo2UsageAdapter.java @@ -40,10 +40,7 @@ import com.intellij.usageView.UsageInfo; import com.intellij.usageView.UsageViewBundle; import com.intellij.usages.impl.rules.UsageType; import com.intellij.usages.rules.*; -import com.intellij.util.ArrayUtil; -import com.intellij.util.IncorrectOperationException; -import com.intellij.util.NotNullFunction; -import com.intellij.util.Processor; +import com.intellij.util.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -80,7 +77,8 @@ public class UsageInfo2UsageAdapter implements UsageInModule, private final int myLineNumber; private final int myOffset; protected Icon myIcon; - private Reference myTextChunks; // allow to be gced and recreated on-demand because it requires a lot of memory + private volatile Reference myTextChunks; // allow to be gced and recreated on-demand because it requires a lot of memory + private volatile UsageType myUsageType; public UsageInfo2UsageAdapter(@NotNull final UsageInfo usageInfo) { myUsageInfo = usageInfo; @@ -337,7 +335,7 @@ public class UsageInfo2UsageAdapter implements UsageInModule, UsageInfo[] merged = ArrayUtil.mergeArrays(getMergedInfos(), u2.getMergedInfos()); myMergedUsageInfos = merged.length == 1 ? merged[0] : merged; Arrays.sort(getMergedInfos(), BY_NAVIGATION_OFFSET); - initChunks(); + myTextChunks = null; // chunks will be rebuilt lazily (IDEA-126048) return true; } @@ -496,13 +494,42 @@ public class UsageInfo2UsageAdapter implements UsageInModule, } public @Nullable UsageType getUsageType() { - TextChunk[] chunks = getText(); - for(TextChunk chunk:chunks) { - UsageType type = chunk.getType(); - if (type != null) { - return type; + UsageType usageType = myUsageType; + + if (usageType == null) { + usageType = UsageType.UNCLASSIFIED; + PsiFile file = getPsiFile(); + + if (file != null) { + ChunkExtractor extractor = ChunkExtractor.getExtractor(file); + Segment segment = getFirstSegment(); + + if (segment != null) { + Document document = PsiDocumentManager.getInstance(getProject()).getDocument(file); + + if (document != null) { + SmartList chunks = new SmartList(); + extractor.createTextChunks( + this, + document.getCharsSequence(), + segment.getStartOffset(), + segment.getEndOffset(), + false, + chunks + ); + + for(TextChunk chunk:chunks) { + UsageType chunkUsageType = chunk.getType(); + if (chunkUsageType != null) { + usageType = chunkUsageType; + break; + } + } + } + } } + myUsageType = usageType; } - return null; + return usageType; } } diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 99ff576c6ad6..bb8246ebc351 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -388,7 +388,7 @@ console.too.much.text.buffer.ratio.description=Used for disabling of console pro when there is too much of text to process.\n\ The ratio is used against the console cycle buffer size (idea.cycle.buffer.size/theRatio=maxTextLength). ide.file.settings.order.new=false -ide.new.project.settings=false +ide.new.project.settings=true ide.new.project.settings.description=Temporary key for new project settings dialog UI commonjs.complete.required.filename.with.extension=false diff --git a/platform/util/src/com/intellij/openapi/ui/Divider.java b/platform/util/src/com/intellij/openapi/ui/Divider.java new file mode 100644 index 000000000000..1b2b6b1a3d6a --- /dev/null +++ b/platform/util/src/com/intellij/openapi/ui/Divider.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.ui; + +import javax.swing.*; +import java.awt.*; + +/** + * @author Konstantin Bulenkov + */ +public abstract class Divider extends JPanel { + public Divider(LayoutManager layout) { + super(layout); + } + + public abstract void setResizeEnabled(boolean resizeEnabled); + + public abstract void setSwitchOrientationEnabled(boolean switchOrientationEnabled); + + public abstract void setOrientation(boolean vertical); +} diff --git a/platform/util/src/com/intellij/openapi/ui/Splitter.java b/platform/util/src/com/intellij/openapi/ui/Splitter.java index 44d2317088c6..71a026702563 100644 --- a/platform/util/src/com/intellij/openapi/ui/Splitter.java +++ b/platform/util/src/com/intellij/openapi/ui/Splitter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -177,7 +177,7 @@ public class Splitter extends JPanel { } protected Divider createDivider() { - return new Divider(); + return new DividerImpl(); } @Override @@ -481,12 +481,12 @@ public class Splitter extends JPanel { return myDivider; } - public class Divider extends JPanel { + public class DividerImpl extends Divider { private boolean myResizeEnabled; private boolean mySwitchOrientationEnabled; protected Point myPoint; - public Divider() { + public DividerImpl() { super(new GridBagLayout()); myResizeEnabled = true; mySwitchOrientationEnabled = false; @@ -496,7 +496,7 @@ public class Splitter extends JPanel { setOrientation(myVerticalSplit); } - private void setOrientation(boolean isVerticalSplit) { + public void setOrientation(boolean isVerticalSplit) { removeAll(); setCursor(isVertical() ? diff --git a/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java b/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java index 3484d0625d37..586668af3864 100644 --- a/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java +++ b/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java @@ -35,7 +35,7 @@ public class IdeaWin32 { static { IdeaWin32 instance = null; - if (SystemInfo.isWin2kOrNewer) { + if (SystemInfo.isWin2kOrNewer && Boolean.parseBoolean(System.getProperty("idea.use.native.fs.for.win", "true"))) { try { UrlClassLoader.loadPlatformLibrary("IdeaWin32"); instance = new IdeaWin32(); diff --git a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java index 3556f1cce3bd..b4201c56aa85 100644 --- a/platform/util/src/com/intellij/openapi/util/text/StringUtil.java +++ b/platform/util/src/com/intellij/openapi/util/text/StringUtil.java @@ -2658,6 +2658,56 @@ public class StringUtil extends StringUtilRt { return s.startsWith(smallPart.toLowerCase()) && bigPart.toLowerCase().startsWith(s); } + public static String getShortened(String s, int maxWidth) { + int length = s.length(); + if (isEmpty(s) || length <= maxWidth) return s; + ArrayList words = new ArrayList(); + + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < length; i++) { + char ch = s.charAt(i); + + if (i == length - 1) { + builder.append(ch); + words.add(builder.toString()); + builder.delete(0, builder.length()); + continue; + } + + if (i > 0 && (ch == '/' || ch == '.' || Character.isUpperCase(ch))) { + words.add(builder.toString()); + builder.delete(0, builder.length()); + } + builder.append(ch); + } + + int removedLength = 0; + + String toPaste = "..."; + int index; + while (true) { + index = Math.max(0, (words.size() - 1) / 2); + String aWord = words.get(index); + words.remove(index); + if (words.size() < 2) { + int toCut = length - removedLength - maxWidth + 3; + int pos = (aWord.length() - toCut) / 2; + toPaste = aWord.substring(0, pos) + "..." + aWord.substring(pos+toCut); + break; + } + removedLength += aWord.length(); + if (length - removedLength <= maxWidth - 3) { + break; + } + } + for (int i = 0; i < words.size(); i++) { + String word = words.get(i); + if (i == index || words.size() == 1) builder.append(toPaste); + builder.append(word); + } + return builder.toString().replaceAll("\\.{4,}", "..."); + } + /** * Expirable CharSequence. Very useful to control external library execution time, * i.e. when java.util.regex.Pattern match goes out of control. diff --git a/platform/util/src/com/intellij/util/Restarter.java b/platform/util/src/com/intellij/util/Restarter.java index 7f1584dc73dc..01e7fc494f5b 100644 --- a/platform/util/src/com/intellij/util/Restarter.java +++ b/platform/util/src/com/intellij/util/Restarter.java @@ -153,12 +153,11 @@ public class Restarter { } public static File createTempExecutable(File executable) throws IOException { - String ext = FileUtilRt.getExtension(executable.getName()); - File copy = FileUtilRt.createTempFile(FileUtilRt.getNameWithoutExtension(executable.getName()), - StringUtil.isEmptyOrSpaces(ext) ? ".tmp" : ("." + ext), - false); - FileUtilRt.copy(executable, copy); - if (!copy.setExecutable(executable.canExecute())) throw new IOException("Cannot make file executable: " + copy); + File copy = new File(System.getProperty("user.home") + "/." + System.getProperty("idea.paths.selector") + "/restart/" + executable.getName()); + if (FileUtilRt.ensureCanCreateFile(copy)) { + FileUtilRt.copy(executable, copy); + if (!copy.setExecutable(executable.canExecute())) throw new IOException("Cannot make file executable: " + copy); + } return copy; } diff --git a/platform/util/testSrc/com/intellij/util/text/StringUtilTest.java b/platform/util/testSrc/com/intellij/util/text/StringUtilTest.java index 2f31dc4f4e61..46b7da7c734c 100644 --- a/platform/util/testSrc/com/intellij/util/text/StringUtilTest.java +++ b/platform/util/testSrc/com/intellij/util/text/StringUtilTest.java @@ -195,4 +195,23 @@ public class StringUtilTest extends TestCase { assertEquals(Arrays.asList("\n", "\r\n", "\n", "\r\n", "\r", "\r", "aa\r", "bb\r\n", "cc\n", "\r", "dd\n", "\n", "\r\n", "\r"), Arrays.asList(StringUtil.splitByLinesKeepSeparators("\n\r\n\n\r\n\r\raa\rbb\r\ncc\n\rdd\n\n\r\n\r"))); } + + public void testShortened() { + String[] names = {"AVeryVeeryLongClassName.java", "com.test.SomeJAVAClassName.java", "strangelowercaseclassname.java", "PrefixPostfix.java"}; + for (String name : names) { + for (int i = name.length() + 1; i > 15; i--) { + String shortened = StringUtil.getShortened(name, i); + assertTrue(shortened.length() <= i); + assertTrue(!shortened.contains("....")); + int pos = shortened.indexOf("..."); + if (pos != -1) { + assertTrue(name.startsWith(shortened.substring(0, pos))); + assertTrue(name.endsWith(shortened.substring(pos + 3))); + } + else { + assertEquals(shortened, name); + } + } + } + } } diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java index 203f4fc0f539..c6b0daa0852d 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/ProjectLevelVcsManager.java @@ -272,7 +272,7 @@ public abstract class ProjectLevelVcsManager { public abstract VcsHistoryCache getVcsHistoryCache(); public abstract ContentRevisionCache getContentRevisionCache(); public abstract boolean isFileInContent(final VirtualFile vf); - public abstract boolean isIgnoredByVcs(VirtualFile vf); + public abstract boolean isIgnored(VirtualFile vf); public abstract boolean dvcsUsedInProject(); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java index ad62491e1add..1d310d5a023a 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java @@ -173,7 +173,7 @@ public class LocalChangeListImpl extends LocalChangeList { return false; } VirtualFile vFile = revision.getFile().getVirtualFile(); - return vFile != null && ProjectLevelVcsManager.getInstance(project).isIgnoredByVcs(vFile); + return vFile != null && ProjectLevelVcsManager.getInstance(project).isIgnored(vFile); } }); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdatingChangeListBuilder.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdatingChangeListBuilder.java index 76b21762cf1f..d06c8f888ad7 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdatingChangeListBuilder.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdatingChangeListBuilder.java @@ -121,7 +121,7 @@ class UpdatingChangeListBuilder implements ChangelistBuilder { @Override public Boolean compute() { checkIfDisposed(); - return myVcsManager.isIgnoredByVcs(file); + return myVcsManager.isIgnored(file); } }); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsGuess.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsGuess.java index 394f2e7f6414..112caa4a40b4 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsGuess.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsGuess.java @@ -73,7 +73,7 @@ public class VcsGuess { final boolean inContent = myVcsManager.isFileInContent(validParent); if (inContent) return true; if (filePath != null) { - return isFileInBaseDir(filePath, myProject.getBaseDir()) && !myVcsManager.isIgnoredByVcs(validParent); + return isFileInBaseDir(filePath, myProject.getBaseDir()) && !myVcsManager.isIgnored(validParent); } return false; } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java index b230d4f72a0d..e699383321ae 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java @@ -845,13 +845,13 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme return vf != null && (myExcludedIndex.isInContent(vf) || isFileInBaseDir(vf) || vf.equals(myProject.getBaseDir()) || hasExplicitMapping(vf) || isInDirectoryBasedRoot(vf) || !Registry.is("ide.hide.excluded.files") && myExcludedIndex.isExcludedFile(vf)) - && !isIgnoredByVcs(vf); + && !isIgnored(vf); } }); } @Override - public boolean isIgnoredByVcs(VirtualFile vf) { + public boolean isIgnored(VirtualFile vf) { if (Registry.is("ide.hide.excluded.files")) { return myExcludedIndex.isExcludedFile(vf); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsRootIterator.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsRootIterator.java index 074055ac87ef..cfddcaa3e65d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsRootIterator.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsRootIterator.java @@ -67,7 +67,7 @@ public class VcsRootIterator { return ApplicationManager.getApplication().runReadAction(new Computable() { @Override public Boolean compute() { - return !project.isDisposed() && vcsManager.isIgnoredByVcs(file); + return !project.isDisposed() && vcsManager.isIgnored(file); } }); } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java index 80e46c235643..5ff541ebc67d 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java @@ -234,7 +234,7 @@ public class NewMappings { @Nullable public VcsDirectoryMapping getMappingFor(final VirtualFile file, final Object parentModule) { // if parentModule is not null it means that file belongs to the module so it isn't excluded - if (parentModule == null && myVcsManager.isIgnoredByVcs(file)) { + if (parentModule == null && myVcsManager.isIgnored(file)) { return null; } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.java index 3fe8b70d1a8d..08d7012eeeea 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebugSessionImpl.java @@ -91,7 +91,7 @@ public class XDebugSessionImpl implements XDebugSession { private XDebugProcess myDebugProcess; private final Map, CustomizedBreakpointPresentation> myRegisteredBreakpoints = new THashMap, CustomizedBreakpointPresentation>(); - private final Set> myInactiveSlaveBreakpoints = new SmartHashSet>(); + private final Set> myInactiveSlaveBreakpoints = Collections.synchronizedSet(new SmartHashSet>()); private boolean myBreakpointsDisabled; private final XDebuggerManagerImpl myDebuggerManager; private MyBreakpointListener myBreakpointListener; @@ -295,12 +295,15 @@ public class XDebugSessionImpl implements XDebugSession { XBreakpointManagerImpl breakpointManager = myDebuggerManager.getBreakpointManager(); XDependentBreakpointManager dependentBreakpointManager = breakpointManager.getDependentBreakpointManager(); disableSlaveBreakpoints(dependentBreakpointManager); - processAllBreakpoints(true, false); + // listeners have to be applied before processing all existing breakpoints, + // otherwise we may not process breakpoints added during the processing myBreakpointListener = new MyBreakpointListener(); breakpointManager.addBreakpointListener(myBreakpointListener); myDependentBreakpointListener = new MyDependentBreakpointListener(); dependentBreakpointManager.addListener(myDependentBreakpointListener); + + processAllBreakpoints(true, false); } @Override diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerRunToCursorActionHandler.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerRunToCursorActionHandler.java index 66684da99205..2f38008f5c5a 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerRunToCursorActionHandler.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerRunToCursorActionHandler.java @@ -15,6 +15,7 @@ */ package com.intellij.xdebugger.impl.actions.handlers; +import com.intellij.xdebugger.XDebuggerUtil; import com.intellij.xdebugger.impl.actions.XDebuggerSuspendedActionHandler; import com.intellij.xdebugger.impl.XDebuggerUtilImpl; import com.intellij.xdebugger.XDebugSession; @@ -33,7 +34,9 @@ public class XDebuggerRunToCursorActionHandler extends XDebuggerSuspendedActionH } protected boolean isEnabled(final @NotNull XDebugSession session, final DataContext dataContext) { - return super.isEnabled(session, dataContext) && XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext) != null; + if (!super.isEnabled(session, dataContext)) return false; + XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext); + return position != null && XDebuggerUtil.getInstance().canPutBreakpointAt(session.getProject(), position.getFile(), position.getLine()); } protected void perform(@NotNull final XDebugSession session, final DataContext dataContext) { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java index be227cec1698..ebcd027c2643 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java @@ -240,14 +240,15 @@ public class XBreakpointManagerImpl implements XBreakpointManager, PersistentSta @NotNull public > Collection getBreakpoints(@NotNull final XBreakpointType type) { ApplicationManager.getApplication().assertReadAccessAllowed(); - Collection> breakpoints = myBreakpoints.get(type); - Collection regular = breakpoints != null ? Collections.unmodifiableCollection((Collection)breakpoints) : Collections.emptyList(); - - final XBreakpointBase defaultBreakpoint = myDefaultBreakpoints.get(type); - if (defaultBreakpoint == null) return regular; List result = new ArrayList(); - result.add((B)defaultBreakpoint); - result.addAll(regular); + B defaultBreakpoint = getDefaultBreakpoint(type); + if (defaultBreakpoint != null) { + result.add(defaultBreakpoint); + } + Collection> breakpoints = myBreakpoints.get(type); + if (breakpoints != null) { + result.addAll((Collection)breakpoints); + } return result; } diff --git a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java index 96f29f253e4e..1b4e43ec4df1 100644 --- a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java +++ b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java @@ -247,17 +247,17 @@ public class InjectorUtils { // make sure comment is close enough and ... int off1 = r0.getEndOffset(); int off2 = e2.getTextRange().getStartOffset(); - if (off2 - off1 > 120) return null; - if (off2 - off1 > 2) { - // ... there's nothing in between on the top level and ... - for (PsiElement e = e1; e != e2; e = e.getNextSibling()) { - if (!isWhitespaceCommentOrBlank(e)) return null; - } - // ... there's no non-empty host in the left (comment) subtree - Producer producer = prevWalker(PsiTreeUtil.getDeepestLast(e1), e1); + if (off2 - off1 > 120) { + return null; + } + else if (off2 - off1 > 2) { + // ... there's no non-empty valid host in between comment and e2 + Producer producer = prevWalker(e2, commonParent); PsiElement e; while ( (e = producer.produce()) != null && e != psiComment) { - if (e instanceof PsiLanguageInjectionHost && !StringUtil.isEmptyOrSpaces(e.getText())) { + if (e instanceof PsiLanguageInjectionHost && + ((PsiLanguageInjectionHost)e).isValidHost() && + !StringUtil.isEmptyOrSpaces(e.getText())) { return null; } } @@ -268,11 +268,6 @@ public class InjectorUtils { return new BaseInjection(supportId).copyFrom(entry.getValue()); } - protected static boolean isWhitespaceCommentOrBlank(PsiElement e) { - return e instanceof PsiWhiteSpace || e instanceof PsiComment || - e instanceof PsiLanguageInjectionHost && StringUtil.isEmptyOrSpaces(e.getText()); - } - @Nullable private static TreeMap getInjectionMap(@Nullable final PsiFile file) { if (file == null) return null; // e.g. null for synthetic groovy variables @@ -295,8 +290,6 @@ public class InjectorUtils { CharSequence contents = file.getViewProvider().getContents(); final char[] contentsArray = CharArrayUtil.fromSequenceWithoutCopying(contents); - //long time = System.currentTimeMillis(); - int s0 = 0, s1 = contents.length(); for (int idx = searcher.scan(contents, contentsArray, s0, s1); idx != -1; @@ -311,30 +304,6 @@ public class InjectorUtils { } } } - - //VirtualFile virtualFile = file.getVirtualFile(); - //Document document = FileDocumentManager.getInstance().getDocument(virtualFile); - //EditorHighlighter highlighter = EditorHighlighterCache.getEditorHighlighterForCachesBuilding(document); - // - //ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(file.getLanguage()); - //TokenSet commentTokens = definition.getCommentTokens(); - //HighlighterIterator it = highlighter != null && PlatformIdTableBuilding.checkCanUseCachedEditorHighlighter(contents, highlighter) ? - // highlighter.createIterator(0) : null; - // - //do { - // if (it != null) { - // while (!it.atEnd() && !commentTokens.contains(it.getTokenType())) it.advance(); - // if (it.atEnd()) break; - // } - // int s0 = it == null ? 0 : it.getStart(); - // int s1 = it == null ? contents.length() : it.getEnd(); - // - // for () { .. } - // - // if (it != null && !it.atEnd()) it.advance(); - //} while (it != null && !it.atEnd()); - - //System.out.println(Thread.currentThread().getName() + ": " + file.getName() + "@" + file.hashCode() + " indexed: " + (System.currentTimeMillis() - time)); return injectionMap; } @@ -375,18 +344,11 @@ public class InjectorUtils { if (e == null || e == scope) return null; PsiElement prev = e.getPrevSibling(); if (prev != null) { - e = prev; - while (true) { - PsiElement lastChild = e.getLastChild(); - if (lastChild == null) break; - e = lastChild; - } - return e; + return e = PsiTreeUtil.getDeepestLast(prev); } else { PsiElement parent = e.getParent(); - e = parent == scope || parent instanceof PsiFile ? null : parent; - return e; + return e = parent == scope || parent instanceof PsiFile ? null : parent; } } }; diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsstatuses/CvsChangeProvider.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsstatuses/CvsChangeProvider.java index 784a18d62461..a652289a59c7 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsstatuses/CvsChangeProvider.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsstatuses/CvsChangeProvider.java @@ -164,7 +164,7 @@ public class CvsChangeProvider implements ChangeProvider { for (VirtualFile file : children) { progress.checkCanceled(); if (file.isDirectory()) { - final boolean isIgnored = myVcsManager.isIgnoredByVcs(file); + final boolean isIgnored = myVcsManager.isIgnored(file); if (!isIgnored) { processEntriesIn(file, scope, builder, true, progress); } diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java index 49c2025908e0..eb30dd74752c 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java @@ -256,6 +256,6 @@ public class ImportTree extends NodeRenderer { } private boolean isIgnoredByVcs(VirtualFile vFile) { - return myProject != null && ProjectLevelVcsManager.getInstance(myProject).isIgnoredByVcs(vFile); + return myProject != null && ProjectLevelVcsManager.getInstance(myProject).isIgnored(vFile); } } diff --git a/plugins/devkit/src/build/PrepareToDeployAction.java b/plugins/devkit/src/build/PrepareToDeployAction.java index b501331596b5..37bedb4d1d3a 100644 --- a/plugins/devkit/src/build/PrepareToDeployAction.java +++ b/plugins/devkit/src/build/PrepareToDeployAction.java @@ -164,6 +164,7 @@ public class PrepareToDeployAction extends AnAction { else { FileUtil.copy(jarFile, dstFile); } + LocalFileSystem.getInstance().refreshIoFiles(Collections.singleton(dstFile), true, false, null); successMessages.add(DevKitBundle.message("saved.message", isZip ? 1 : 2, pluginName, dstPath)); } catch (final IOException e) { diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java index 3c609a91f55d..7ba292889b9f 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java @@ -354,7 +354,7 @@ public class GithubShareAction extends DumbAwareAction { return ContainerUtil.filter(files, new Condition() { @Override public boolean value(VirtualFile file) { - return !changeListManager.isIgnoredFile(file) && !vcsManager.isIgnoredByVcs(file); + return !changeListManager.isIgnoredFile(file) && !vcsManager.isIgnored(file); } }); } diff --git a/plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/model/ProjectImportAction.java b/plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/model/ProjectImportAction.java index c27a9a216c36..5b20894b318d 100644 --- a/plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/model/ProjectImportAction.java +++ b/plugins/gradle/tooling-extension-api/src/org/jetbrains/plugins/gradle/model/ProjectImportAction.java @@ -18,7 +18,6 @@ package org.jetbrains.plugins.gradle.model; import com.intellij.openapi.externalSystem.model.ExternalSystemException; import org.gradle.tooling.BuildAction; import org.gradle.tooling.BuildController; -import org.gradle.tooling.model.Model; import org.gradle.tooling.model.build.BuildEnvironment; import org.gradle.tooling.model.idea.BasicIdeaProject; import org.gradle.tooling.model.idea.IdeaModule; @@ -49,7 +48,8 @@ public class ProjectImportAction implements BuildAction - if (path instanceof String) { - def file = new File(warTask.project.projectDir, path) - addPath(webResources, relativePath, "", file) + if(sourcePaths) { + (sourcePaths.flatten() as List).each { def path -> + if (path instanceof String) { + def file = new File(warTask.project.projectDir, path) + addPath(webResources, relativePath, "", file) + } } } - resolver.source.visit(new FileVisitor() { @Override public void visitDir(FileVisitDetails dirDetails) { diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/StatusWalkerPartner.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/StatusWalkerPartner.java index a3f722bfe65d..690eb1e76ee3 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/StatusWalkerPartner.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/StatusWalkerPartner.java @@ -79,7 +79,7 @@ public class StatusWalkerPartner { @Override public Boolean compute() { if (myVcs.getProject().isDisposed()) throw new ProcessCanceledException(); - return myVcsManager.isIgnoredByVcs(vFile); + return myVcsManager.isIgnored(vFile); } }); } diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/SvnExcludingIgnoredOperation.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/SvnExcludingIgnoredOperation.java index 59c3c538aa4a..94fc2e11c96e 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/SvnExcludingIgnoredOperation.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/actions/SvnExcludingIgnoredOperation.java @@ -70,7 +70,7 @@ public class SvnExcludingIgnoredOperation { return ApplicationManager.getApplication().runReadAction(new Computable() { @Override public Boolean compute() { - return myVcsManager.isIgnoredByVcs(file); + return myVcsManager.isIgnored(file); } }); } diff --git a/plugins/terminal/lib/jediterm-pty-2.0.jar b/plugins/terminal/lib/jediterm-pty-2.0.jar index 794d97412396..e8eaa9bd7a9b 100644 Binary files a/plugins/terminal/lib/jediterm-pty-2.0.jar and b/plugins/terminal/lib/jediterm-pty-2.0.jar differ diff --git a/python/build/paths.nsi b/python/build/paths.nsi index cf4f769c5f9f..6baf09644c8b 100644 --- a/python/build/paths.nsi +++ b/python/build/paths.nsi @@ -2,5 +2,5 @@ !define IMAGES_LOCATION ${COMMUNITY_DIR}\python\build\resources ;!define LICENSE_FILE ${BASE_DIR}\python\license\PyCharm_Preview_License !define PRODUCT_PROPERTIES_FILE ${BASE_DIR}\out\pycharmCE\layout\bin\idea.properties -!define PRODUCT_VM_OPTIONS_NAME pycharm.exe.vmoptions +!define PRODUCT_VM_OPTIONS_NAME pycharm*.exe.vmoptions !define PRODUCT_VM_OPTIONS_FILE ${BASE_DIR}\out\pycharmCE\win\bin\${PRODUCT_VM_OPTIONS_NAME} diff --git a/python/build/pycharm64_community_launcher.properties b/python/build/pycharm64_community_launcher.properties new file mode 100644 index 000000000000..ff7b0ffa11c3 --- /dev/null +++ b/python/build/pycharm64_community_launcher.properties @@ -0,0 +1,3 @@ +IDS_JDK_ENV_VAR=PYCHARM_JDK_64 +IDS_JDK_ONLY=true +IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__ diff --git a/python/build/pycharm_community_build.gant b/python/build/pycharm_community_build.gant index 3b793ec4498f..1d73b83048a8 100644 --- a/python/build/pycharm_community_build.gant +++ b/python/build/pycharm_community_build.gant @@ -162,11 +162,14 @@ public layoutCommunity(String classesPath, Set usedJars) { ant.echo(message: "PC-${buildNumber}", file: "${paths.distAll}/build.txt") def launcher = "${paths.distWin}/bin/pycharm.exe" + def launcher64 = "${paths.distWin}/bin/pycharm64.exe" List resourcePaths = ["$ch/community-resources/src", "$ch/platform/icons/src", "$pythonCommunityHome/resources"] buildWinLauncher("$ch", "$ch/bin/WinLauncher/WinLauncher.exe", launcher, appInfo, "$pythonCommunityHome/build/pycharm_community_launcher.properties", system_selector, resourcePaths) + buildWinLauncher("$ch", "$ch/bin/WinLauncher/WinLauncher64.exe", launcher64, + appInfo, "$pythonCommunityHome/build/pycharm64_community_launcher.properties", system_selector, resourcePaths) buildWinZip("${paths.artifacts}/pycharmPC-${buildNumber}.zip", [paths.distAll, paths.distWin]) diff --git a/python/edu/build/DMG_background.png b/python/edu/build/DMG_background.png new file mode 100644 index 000000000000..3b5a4b2c1b26 Binary files /dev/null and b/python/edu/build/DMG_background.png differ diff --git a/python/edu/build/paths.nsi b/python/edu/build/paths.nsi new file mode 100644 index 000000000000..910f2b3555b7 --- /dev/null +++ b/python/edu/build/paths.nsi @@ -0,0 +1,6 @@ +; Installer images +!define IMAGES_LOCATION ${COMMUNITY_DIR}\python\build\resources +;!define LICENSE_FILE ${BASE_DIR}\python\license\PyCharm_Preview_License +!define PRODUCT_PROPERTIES_FILE ${BASE_DIR}\out\pycharmEDU\layout\bin\idea.properties +!define PRODUCT_VM_OPTIONS_NAME pycharm.exe.vmoptions +!define PRODUCT_VM_OPTIONS_FILE ${BASE_DIR}\out\pycharmEDU\win\bin\${PRODUCT_VM_OPTIONS_NAME} diff --git a/python/edu/build/plugin-list.txt b/python/edu/build/plugin-list.txt new file mode 100644 index 000000000000..ceaa60895918 --- /dev/null +++ b/python/edu/build/plugin-list.txt @@ -0,0 +1,11 @@ +svn4idea +git4idea +remote-servers-git +github +terminal +IntelliLang +IntelliLang-xml +IntelliLang-js +IntelliLang-python +rest +python-rest diff --git a/python/edu/build/pycharm_edu_build.gant b/python/edu/build/pycharm_edu_build.gant new file mode 100644 index 000000000000..56aa1d2dc560 --- /dev/null +++ b/python/edu/build/pycharm_edu_build.gant @@ -0,0 +1,392 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import org.jetbrains.jps.LayoutInfo + +import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome + +setProperty("home", guessHome(this as Script)) + +includeTargets << new File("${guessHome(this as Script)}/build/scripts/utils.gant") +includeTargets << new File("${guessHome(this)}/build/scripts/libLicenses.gant") + +requireProperty("buildNumber", requireProperty("build.number", snapshot)) + +setProperty("ch", home) +setProperty("pythonCommunityHome", "$home/python") +setProperty("pythonEduHome", "$home/python/edu") + +// load ApplicationInfo.xml properties +ant.xmlproperty(file: "$pythonCommunityHome/resources/idea/PyCharmEduApplicationInfo.xml", collapseAttributes: "true") + +setProperty("system_selector", "PyCharm${p("component.version.major")}0") +setProperty("dryRun", false) +setProperty("jdk16", guessJdk()) + +//modules to compile +setProperty("pluginFilter", new File("$pythonEduHome/build/plugin-list.txt").readLines()) + +private List pycharmPlatformApiModules() { + return [platformApiModules, "dom-openapi"].flatten() +} + + +private List pycharmImplementationModules() { //modules to put into pycharm.jar + return [platformImplementationModules, "dom-impl", "python-community", "python-ide-community", "python-openapi", "python-psi-api", + "platform-main", "python-educational"].flatten() +} + +private List modules() { + return [ + "python-pydev", "colorSchemes", pycharmPlatformApiModules(), pycharmImplementationModules(), pluginFilter + ].flatten() +} + +private List approvedJars() { + def normalizedHome = ch.replace('\\', '/') + def normalizedPythonHome = pythonCommunityHome.replace('\\', '/') + return ["$normalizedHome/lib/", "$normalizedPythonHome/lib/", "$normalizedHome/xml/relaxng/lib/"] +} + +class Paths { + final sandbox + final distAll + final distWin + final distMac + final distUnix + final artifacts + final ideaSystem + final ideaConfig + + def Paths(String home) { + sandbox = "$home/out/pycharmEDU" + + distAll = "$sandbox/layout" + distWin = "$sandbox/win" + distMac = "$sandbox/mac" + distUnix = "$sandbox/unix" + artifacts = "$sandbox/artifacts" + + ideaSystem = "$sandbox/system" + ideaConfig = "$sandbox/config" + } +} + +setProperty("paths", new Paths(home)) +setProperty("buildName", "PE-$buildNumber") + +target('default': "Build artifacts") { + + loadProject() + + projectBuilder.stage("Cleaning up sandbox folder") + + projectBuilder.targetFolder = "${paths.sandbox}/classes" + projectBuilder.dryRun = dryRun + + if (!dryRun) { + forceDelete(paths.sandbox) + ant.mkdir(dir: paths.sandbox) + } + + ant.tstamp() { + format(property: "todayYear", pattern: "yyyy") + } + + ant.patternset(id: "resources.included") { + include(name: "**/*.properties") + include(name: "fileTemplates/**/*") + include(name: "inspectionDescriptions/**/*") + include(name: "intentionDescriptions/**/*") + include(name: "tips/**/*") + include(name: "search/**/*") + } + + ant.patternset(id: "resources.excluded") { + exclude(name: "**/*.properties") + exclude(name: "fileTemplates/**/*") + exclude(name: "fileTemplates") + exclude(name: "inspectionDescriptions/**/*") + exclude(name: "inspectionDescriptions") + exclude(name: "intentionDescriptions/**/*") + exclude(name: "intentionDescriptions") + exclude(name: "tips/**/*") + exclude(name: "tips") + } + + zipSources(home, paths.artifacts) + + def usedJars = buildModulesAndCollectUsedJars(modules(), approvedJars(), ["/ant/"]) + + layoutEducational("${paths.sandbox}/classes/production", usedJars) + + + buildNSIS([paths.distAll, paths.distWin], + "${pythonEduHome}/build/strings.nsi", "${pythonEduHome}/build/paths.nsi", + "pycharm", false, true, system_selector) + + + + signMacZip("pycharm") + buildDmg("pycharm", "${pythonEduHome}/build/DMG_background.png") + +} + +public layoutEducational(String classesPath, Set usedJars) { + setProperty("pluginFilter", new File("$pythonEduHome/build/plugin-list.txt").readLines()) + + if (usedJars == null) { + usedJars = collectUsedJars(modules(), approvedJars(), ["/ant/"], null) + } + + def appInfo = appInfoFile(classesPath) + def paths = new Paths(home) + buildSearchableOptions("${projectBuilder.moduleOutput(findModule("platform-resources"))}/search", [], { + projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm_edu"), false).each { + ant.pathelement(location: it) + } + }, "-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true") + + if (!dryRun) { + wireBuildDate("PE-${buildNumber}", appInfo) + } + + Map args = [ + buildNumber: "PE-${buildNumber}", + system_selector: system_selector, + ide_jvm_args: "-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true"] + + LayoutInfo layoutInfo = layoutFull(args, paths.distAll, usedJars) + generateLicensesTable("$paths.artifacts/third-party-libraries.txt", layoutInfo.usedModules); + + layoutWin(args, paths.distWin) + layoutUnix(args, paths.distUnix) + layoutMac(args, paths.distMac) + + ant.echo(message: "PE-${buildNumber}", file: "${paths.distAll}/build.txt") + + def launcher = "${paths.distWin}/bin/pycharm.exe" + List resourcePaths = ["$ch/community-resources/src", + "$ch/platform/icons/src", + "$pythonEduHome/resources"] + buildWinLauncher("$ch", "$ch/bin/WinLauncher/WinLauncher.exe", launcher, + appInfo, "$pythonCommunityHome/build/pycharm_edu_launcher.properties", system_selector, resourcePaths) + + buildWinZip("${paths.artifacts}/pycharmPE-${buildNumber}.zip", [paths.distAll, paths.distWin]) + + String tarRoot = isEap() ? "pycharm-edu-$buildNumber" : "pycharm-edu-${p("component.version.major")}.${p("component.version.minor")}" + buildTarGz(tarRoot, "$paths.artifacts/pycharmPE-${buildNumber}.tar", [paths.distAll, paths.distUnix]) + + String macAppRoot = isEap() ? "PyCharm EDU ${p("component.version.major")}.${p("component.version.minor")} EAP.app/Contents" : "PyCharm EDU.app/Contents" + buildMacZip(macAppRoot, "${paths.artifacts}/pycharmEDU-${buildNumber}.sit", [paths.distAll], paths.distMac) +} + +private layoutPlugins(layouts) { + dir("plugins") { + layouts.layoutPlugin("rest") + layouts.layoutPlugin("python-rest") + } + + layouts.layoutEducationalPlugins(ch) +} + +private String appInfoFile(String classesPath) { + return "$classesPath/python-community/idea/PyCharmEduApplicationInfo.xml" +} + +private layoutFull(Map args, String target, Set usedJars) { + def openapiModules = pycharmPlatformApiModules() + def superLayouts = includeFile("$ch/build/scripts/layouts.gant") + + reassignAltClickToMultipleCarets("$ch") + + def result = layout(target) { + dir("lib") { + jar("util.jar") { + module("util") + module("util-rt") + } + + jar("openapi.jar") { + openapiModules.each { module it } + } + + jar("annotations.jar") { module("annotations") } + jar("extensions.jar") { module("extensions") } + + jar("pycharm.jar") { + pycharmImplementationModules().each { + module(it) { + exclude(name: "**/tips/**") + } + } + } + + jar("pycharm-pydev.jar") { + module("python-pydev") + } + + jar("bootstrap.jar") { module("bootstrap") } + jar("resources.jar") { + module("platform-resources") + module("colorSchemes") + } + + jar("forms_rt.jar") { + module("forms_rt") + } + + //noinspection GroovyAssignabilityCheck + jar([name: "resources_en.jar", duplicate: "preserve"]) { + // custom resources should go first + fileset(dir: "$pythonCommunityHome/resources") { + include(name: "**/tips/**") + } + module("platform-resources-en") { + ant.patternset { + exclude(name: "tips/images/switcher.png") + exclude(name: "tips/images/navigateToFilePath.gif") + } + } + } + + jar("icons.jar") { module("icons") } + jar("boot.jar") { module("boot") } + + usedJars.each { + fileset(file: it) + } + + dir("libpty") { + fileset(dir: "$ch/lib/libpty") { + exclude(name: "*.txt") + } + } + + dir("ext") { + fileset(dir: "$ch/lib") { + include(name: "cglib*.jar") + } + } + + dir("src") { + fileset(dir: "$ch/lib/src") { + include(name: "trove4j_changes.txt") + include(name: "trove4j_src.jar") + } + + jar("pycharm-pydev-src.zip") { + fileset(dir: "$pythonCommunityHome/pydevSrc") + } + jar("pycharm-openapi-src.zip") { + fileset(dir: "$pythonCommunityHome/openapi/src") + fileset(dir: "$pythonCommunityHome/psi-api/src") + } + } + } + + dir("help") { + fileset(dir: "$home/python/help") { + include(name: "*.pdf") + } + } + + dir("helpers") { + fileset(dir: "$pythonCommunityHome/helpers") + } + + dir("license") { + fileset(dir: "$ch/license") + fileset(dir: "$ch") { + include(name: "LICENSE.txt") + include(name: "NOTICE.txt") + } + } + + layoutPlugins(superLayouts) + + dir("bin") { + fileset(dir: "$ch/bin") { + exclude(name: "appletviewer.policy") + include(name: "*.*") + } + } + } + patchPropertiesFile(target, args + [appendices: ["$home/build/conf/ideaJNC.properties"]]) + return result +} + +private layoutWin(Map args, String target) { + layout(target) { + dir("bin") { + fileset(dir: "$ch/bin/win") { + exclude(name: "breakgen*") + } + } + + dir("skeletons") { + fileset(dir: "$pythonCommunityHome/skeletons") { + include(name: "skeletons-win*.zip") + } + } + } + + winScripts(target, ch, "pycharm.bat", args) + winVMOptions(target, null, "pycharm.exe") + + ant.copy(file: "$home/python/help/pycharmhelp.jar", todir: "$target/help", failonerror: false) +} + +private layoutUnix(Map args, String target) { + layout(target) { + dir("bin") { + fileset(dir: "$ch/bin/linux") { + exclude(name: "libbreakgen*") + } + } + } + + ant.copy(file: "$pythonCommunityHome/resources/PyCharmCore128.png", tofile: "$target/bin/pycharm.png") + + unixScripts(target, ch, "pycharm.sh", args) + unixVMOptions(target, "pycharm") + + ant.copy(file: "$home/python/help/pycharmhelp.jar", todir: "$target/help", failonerror: false) +} + +private layoutMac(Map _args, String target) { + layout(target) { + dir("bin") { + fileset(dir: "$home/bin") { + include(name: "*.jnilib") + } + } + + dir("skeletons") { + fileset(dir: "$pythonCommunityHome/skeletons") { + include(name: "skeletons-mac*.zip") + } + } + } + + Map args = new HashMap(_args) + args.icns = "$pythonCommunityHome/resources/PyCharmCore.icns" + args.bundleIdentifier = "com.jetbrains.pycharm" + args.platform_prefix = "PyCharmEdu" + args.help_id = "PY" + args."idea.properties.path" = "${paths.distAll}/bin/idea.properties" + args."idea.properties" = ["idea.no.jre.check": true, "ide.mac.useNativeClipboard": "false"]; + layoutMacApp(target, ch, args) +} diff --git a/python/edu/build/pycharm_edu_launcher.properties b/python/edu/build/pycharm_edu_launcher.properties new file mode 100644 index 000000000000..d3554685ce3b --- /dev/null +++ b/python/edu/build/pycharm_edu_launcher.properties @@ -0,0 +1,3 @@ +IDS_JDK_ENV_VAR=PYCHARM_JDK +IDS_JDK_ONLY=false +IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__ diff --git a/python/edu/build/python-edu-build.iml b/python/edu/build/python-edu-build.iml new file mode 100644 index 000000000000..bda177851580 --- /dev/null +++ b/python/edu/build/python-edu-build.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/python/edu/build/resources/PC_instCom.ico b/python/edu/build/resources/PC_instCom.ico new file mode 100644 index 000000000000..44ecec9c8755 Binary files /dev/null and b/python/edu/build/resources/PC_instCom.ico differ diff --git a/python/edu/build/resources/PC_uninstCom.ico b/python/edu/build/resources/PC_uninstCom.ico new file mode 100644 index 000000000000..13e9f96f9987 Binary files /dev/null and b/python/edu/build/resources/PC_uninstCom.ico differ diff --git a/python/edu/build/resources/headerlogo.bmp b/python/edu/build/resources/headerlogo.bmp new file mode 100644 index 000000000000..c06099264961 Binary files /dev/null and b/python/edu/build/resources/headerlogo.bmp differ diff --git a/python/edu/build/resources/logo.bmp b/python/edu/build/resources/logo.bmp new file mode 100644 index 000000000000..0f0f82da7b1e Binary files /dev/null and b/python/edu/build/resources/logo.bmp differ diff --git a/python/edu/build/resources/pycharm_inst.ico b/python/edu/build/resources/pycharm_inst.ico new file mode 100644 index 000000000000..6c75bcdbc441 Binary files /dev/null and b/python/edu/build/resources/pycharm_inst.ico differ diff --git a/python/edu/build/resources/pycharm_uninst.ico b/python/edu/build/resources/pycharm_uninst.ico new file mode 100644 index 000000000000..a5b9ad86ae94 Binary files /dev/null and b/python/edu/build/resources/pycharm_uninst.ico differ diff --git a/python/edu/build/strings.nsi b/python/edu/build/strings.nsi new file mode 100644 index 000000000000..fa10d421024c --- /dev/null +++ b/python/edu/build/strings.nsi @@ -0,0 +1,13 @@ +!define MANUFACTURER "JetBrains" +!define MUI_PRODUCT "PyCharm Educational Edition" +!define PRODUCT_FULL_NAME "JetBrains PyCharm Educational Edition" +!define PRODUCT_EXE_FILE "pycharm.exe" +!define PRODUCT_ICON_FILE "PC_instCom.ico" +!define PRODUCT_UNINST_ICON_FILE "PC_uninstCom.ico" +!define PRODUCT_LOGO_FILE "logo.bmp" +!define PRODUCT_HEADER_FILE "headerlogo.bmp" + +; if SHOULD_SET_DEFAULT_INSTDIR != 0 then default installation directory will be directory where highest-numbered PyCharm build has been installed +; set to 1 for release build +!define SHOULD_SET_DEFAULT_INSTDIR "0" + diff --git a/python/edu/main_pycharm_edu.iml b/python/edu/main_pycharm_edu.iml new file mode 100644 index 000000000000..18ba324a73e1 --- /dev/null +++ b/python/edu/main_pycharm_edu.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/edu/python-educational.iml b/python/edu/python-educational.iml new file mode 100644 index 000000000000..92439c421c2d --- /dev/null +++ b/python/edu/python-educational.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/edu/resources/ProductivityFeaturesRegistry.xml b/python/edu/resources/ProductivityFeaturesRegistry.xml new file mode 100644 index 000000000000..2910dc26b475 --- /dev/null +++ b/python/edu/resources/ProductivityFeaturesRegistry.xml @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/edu/resources/PyCharmCore.icns b/python/edu/resources/PyCharmCore.icns new file mode 100644 index 000000000000..65167d934ab6 Binary files /dev/null and b/python/edu/resources/PyCharmCore.icns differ diff --git a/python/edu/resources/PyCharmCore.ico b/python/edu/resources/PyCharmCore.ico new file mode 100644 index 000000000000..095e0e14293f Binary files /dev/null and b/python/edu/resources/PyCharmCore.ico differ diff --git a/python/edu/resources/PyCharmCore128.png b/python/edu/resources/PyCharmCore128.png new file mode 100644 index 000000000000..6f23e62d385d Binary files /dev/null and b/python/edu/resources/PyCharmCore128.png differ diff --git a/python/edu/resources/PyCharmCore13.png b/python/edu/resources/PyCharmCore13.png new file mode 100644 index 000000000000..de135e7f6a90 Binary files /dev/null and b/python/edu/resources/PyCharmCore13.png differ diff --git a/python/edu/resources/PyCharmCore16.png b/python/edu/resources/PyCharmCore16.png new file mode 100644 index 000000000000..3328fdb44c8b Binary files /dev/null and b/python/edu/resources/PyCharmCore16.png differ diff --git a/python/edu/resources/PyCharmCore32.png b/python/edu/resources/PyCharmCore32.png new file mode 100644 index 000000000000..0d06345e5189 Binary files /dev/null and b/python/edu/resources/PyCharmCore32.png differ diff --git a/python/edu/resources/PyCharmCoreWelcomeCaption.png b/python/edu/resources/PyCharmCoreWelcomeCaption.png new file mode 100644 index 000000000000..325f4a579de9 Binary files /dev/null and b/python/edu/resources/PyCharmCoreWelcomeCaption.png differ diff --git a/python/edu/resources/PyCharmCoreWelcomeScreen.png b/python/edu/resources/PyCharmCoreWelcomeScreen.png new file mode 100644 index 000000000000..67ad229ed928 Binary files /dev/null and b/python/edu/resources/PyCharmCoreWelcomeScreen.png differ diff --git a/python/edu/resources/PyCharmCoreWelcomeScreen@2x.png b/python/edu/resources/PyCharmCoreWelcomeScreen@2x.png new file mode 100644 index 000000000000..16aeb07b7d31 Binary files /dev/null and b/python/edu/resources/PyCharmCoreWelcomeScreen@2x.png differ diff --git a/python/edu/resources/colorSchemes/PythonDarcula.xml b/python/edu/resources/colorSchemes/PythonDarcula.xml new file mode 100644 index 000000000000..97d59dde6c58 --- /dev/null +++ b/python/edu/resources/colorSchemes/PythonDarcula.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + diff --git a/python/edu/resources/colorSchemes/PythonDefault.xml b/python/edu/resources/colorSchemes/PythonDefault.xml new file mode 100644 index 000000000000..058ac3c402f1 --- /dev/null +++ b/python/edu/resources/colorSchemes/PythonDefault.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + diff --git a/python/edu/resources/community_progress_tail.png b/python/edu/resources/community_progress_tail.png new file mode 100644 index 000000000000..b6f7661c913c Binary files /dev/null and b/python/edu/resources/community_progress_tail.png differ diff --git a/python/edu/resources/developSlogan.png b/python/edu/resources/developSlogan.png new file mode 100644 index 000000000000..4200ac2d1339 Binary files /dev/null and b/python/edu/resources/developSlogan.png differ diff --git a/python/edu/resources/fileTemplates/internal/Python Script.py.ft b/python/edu/resources/fileTemplates/internal/Python Script.py.ft new file mode 100644 index 000000000000..edba329d3074 --- /dev/null +++ b/python/edu/resources/fileTemplates/internal/Python Script.py.ft @@ -0,0 +1 @@ +__author__ = '$USER' diff --git a/python/edu/resources/fileTemplates/internal/Python Unit Test.py.ft b/python/edu/resources/fileTemplates/internal/Python Unit Test.py.ft new file mode 100644 index 000000000000..bc5c1af456cb --- /dev/null +++ b/python/edu/resources/fileTemplates/internal/Python Unit Test.py.ft @@ -0,0 +1,10 @@ +__author__ = '$USER' + +import unittest + +class MyTestCase(unittest.TestCase): + def test_something(self): + self.assertEqual(True, False) + +if __name__ == '__main__': + unittest.main() diff --git a/python/edu/resources/fileTemplates/internal/Setup Script.py.ft b/python/edu/resources/fileTemplates/internal/Setup Script.py.ft new file mode 100644 index 000000000000..cb9cb9b36e0b --- /dev/null +++ b/python/edu/resources/fileTemplates/internal/Setup Script.py.ft @@ -0,0 +1,12 @@ +from distutils.core import setup + +setup( + name='$Package_name', + version='$Version', + packages=$PackageList,$PackageDirs + url='$URL', + license='$License', + author='$Author', + author_email='$Author_Email', + description='$Description' +) diff --git a/python/edu/resources/icon-robots.txt b/python/edu/resources/icon-robots.txt new file mode 100644 index 000000000000..e9cf8c7fee89 --- /dev/null +++ b/python/edu/resources/icon-robots.txt @@ -0,0 +1,3 @@ +# Only has artwork and tips stuff +skip: *.png +skip: tips diff --git a/python/edu/resources/icons/com/jetbrains/pyqt/tsFile.png b/python/edu/resources/icons/com/jetbrains/pyqt/tsFile.png new file mode 100644 index 000000000000..b87e71b3a14f Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/pyqt/tsFile.png differ diff --git a/python/edu/resources/icons/com/jetbrains/pyqt/tsFile@2x.png b/python/edu/resources/icons/com/jetbrains/pyqt/tsFile@2x.png new file mode 100644 index 000000000000..628e5af168b1 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/pyqt/tsFile@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/pyqt/uiForm.png b/python/edu/resources/icons/com/jetbrains/pyqt/uiForm.png new file mode 100644 index 000000000000..ad5c245e8f1c Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/pyqt/uiForm.png differ diff --git a/python/edu/resources/icons/com/jetbrains/pyqt/uiForm@2x.png b/python/edu/resources/icons/com/jetbrains/pyqt/uiForm@2x.png new file mode 100644 index 000000000000..a4b359a8a4fa Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/pyqt/uiForm@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/buildout/buildout.png b/python/edu/resources/icons/com/jetbrains/python/buildout/buildout.png new file mode 100644 index 000000000000..21710ea36466 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/buildout/buildout.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/buildout/buildout@2x.png b/python/edu/resources/icons/com/jetbrains/python/buildout/buildout@2x.png new file mode 100644 index 000000000000..e0bcb6e65933 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/buildout/buildout@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/debug/commandLine.png b/python/edu/resources/icons/com/jetbrains/python/debug/commandLine.png new file mode 100644 index 000000000000..3d2333b0e7e8 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/debug/commandLine.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/debug/commandLine@2x.png b/python/edu/resources/icons/com/jetbrains/python/debug/commandLine@2x.png new file mode 100644 index 000000000000..a70992337f1e Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/debug/commandLine@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/dotnet.png b/python/edu/resources/icons/com/jetbrains/python/dotnet.png new file mode 100644 index 000000000000..b7ff8dbb0cbe Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/dotnet.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/dotnet@2x.png b/python/edu/resources/icons/com/jetbrains/python/dotnet@2x.png new file mode 100644 index 000000000000..1c08889f8a00 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/dotnet@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/interpreterGear.png b/python/edu/resources/icons/com/jetbrains/python/interpreterGear.png new file mode 100644 index 000000000000..ea7f94761fdb Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/interpreterGear.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x.png b/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x.png new file mode 100644 index 000000000000..fe190f2412aa Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x_dark.png b/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x_dark.png new file mode 100644 index 000000000000..2d77aac65fa5 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/interpreterGear@2x_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/interpreterGear_dark.png b/python/edu/resources/icons/com/jetbrains/python/interpreterGear_dark.png new file mode 100644 index 000000000000..44e79af9551d Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/interpreterGear_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/jython.png b/python/edu/resources/icons/com/jetbrains/python/jython.png new file mode 100644 index 000000000000..ed5d76a9fcd3 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/jython.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/jython@2x.png b/python/edu/resources/icons/com/jetbrains/python/jython@2x.png new file mode 100644 index 000000000000..ff092c1449e6 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/jython@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot.png b/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot.png new file mode 100644 index 000000000000..9118f7dfe9a8 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot@2x.png b/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot@2x.png new file mode 100644 index 000000000000..6b4f5766e5ce Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/cyan-dot@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/lock.png b/python/edu/resources/icons/com/jetbrains/python/nodes/lock.png new file mode 100644 index 000000000000..be02730a235a Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/lock.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/lock@2x.png b/python/edu/resources/icons/com/jetbrains/python/nodes/lock@2x.png new file mode 100644 index 000000000000..84c278689df8 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/lock@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle.png b/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle.png new file mode 100644 index 000000000000..c078c76171b6 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle@2x.png b/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle@2x.png new file mode 100644 index 000000000000..1c7c45e60332 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/nodes/red-inv-triangle@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyDeleter.png b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter.png new file mode 100644 index 000000000000..908454736bed Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x.png b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x.png new file mode 100644 index 000000000000..5e022744fb00 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x_dark.png new file mode 100644 index 000000000000..fc0705981518 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter@2x_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyDeleter_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter_dark.png new file mode 100644 index 000000000000..65dd90b3a066 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyDeleter_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyGetter.png b/python/edu/resources/icons/com/jetbrains/python/propertyGetter.png new file mode 100644 index 000000000000..d3069a8d2650 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyGetter.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x.png b/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x.png new file mode 100644 index 000000000000..bbb02025b6f2 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x_dark.png new file mode 100644 index 000000000000..69e1fe4d52c6 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyGetter@2x_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertyGetter_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertyGetter_dark.png new file mode 100644 index 000000000000..cf114e38c516 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertyGetter_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertySetter.png b/python/edu/resources/icons/com/jetbrains/python/propertySetter.png new file mode 100644 index 000000000000..0154c387fd74 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertySetter.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x.png b/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x.png new file mode 100644 index 000000000000..f9dbee7c1905 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x_dark.png new file mode 100644 index 000000000000..072bd5e4e8b7 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertySetter@2x_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/propertySetter_dark.png b/python/edu/resources/icons/com/jetbrains/python/propertySetter_dark.png new file mode 100644 index 000000000000..75f0423c8103 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/propertySetter_dark.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pypy.png b/python/edu/resources/icons/com/jetbrains/python/pypy.png new file mode 100644 index 000000000000..1649f3a6b6b8 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pypy.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pypy@2x.png b/python/edu/resources/icons/com/jetbrains/python/pypy@2x.png new file mode 100644 index 000000000000..a55a1a20c38d Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pypy@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/python-logo.png b/python/edu/resources/icons/com/jetbrains/python/python-logo.png new file mode 100644 index 000000000000..87fff4d6dbfb Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/python-logo.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/python.png b/python/edu/resources/icons/com/jetbrains/python/python.png new file mode 100644 index 000000000000..02f66b7fabd4 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/python.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/python@2x.png b/python/edu/resources/icons/com/jetbrains/python/python@2x.png new file mode 100644 index 000000000000..87fff4d6dbfb Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/python@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pythonClosed.png b/python/edu/resources/icons/com/jetbrains/python/pythonClosed.png new file mode 100644 index 000000000000..d3d3257cf83e Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pythonClosed.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pythonClosed@2x.png b/python/edu/resources/icons/com/jetbrains/python/pythonClosed@2x.png new file mode 100644 index 000000000000..68d99e2eeb8d Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pythonClosed@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pythonTests.png b/python/edu/resources/icons/com/jetbrains/python/pythonTests.png new file mode 100644 index 000000000000..5bcf60420dc9 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pythonTests.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/pythonTests@2x.png b/python/edu/resources/icons/com/jetbrains/python/pythonTests@2x.png new file mode 100644 index 000000000000..2bbbec6755ca Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/pythonTests@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/python_24.png b/python/edu/resources/icons/com/jetbrains/python/python_24.png new file mode 100644 index 000000000000..fbdfc6ab02c9 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/python_24.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/python_24@2x.png b/python/edu/resources/icons/com/jetbrains/python/python_24@2x.png new file mode 100644 index 000000000000..5cef65bcb381 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/python_24@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/templateRoot.png b/python/edu/resources/icons/com/jetbrains/python/templateRoot.png new file mode 100644 index 000000000000..32d4880ec454 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/templateRoot.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/templateRoot@2x.png b/python/edu/resources/icons/com/jetbrains/python/templateRoot@2x.png new file mode 100644 index 000000000000..bc475d5c0771 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/templateRoot@2x.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/virtualenv.png b/python/edu/resources/icons/com/jetbrains/python/virtualenv.png new file mode 100644 index 000000000000..2c0f94f19608 Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/virtualenv.png differ diff --git a/python/edu/resources/icons/com/jetbrains/python/virtualenv@2x.png b/python/edu/resources/icons/com/jetbrains/python/virtualenv@2x.png new file mode 100644 index 000000000000..721a63b883bd Binary files /dev/null and b/python/edu/resources/icons/com/jetbrains/python/virtualenv@2x.png differ diff --git a/python/edu/resources/idea/PyCharmEduApplicationInfo.xml b/python/edu/resources/idea/PyCharmEduApplicationInfo.xml new file mode 100644 index 000000000000..46695ef29ed4 --- /dev/null +++ b/python/edu/resources/idea/PyCharmEduApplicationInfo.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/python/edu/resources/inspectionDescriptions/BuildoutUnresolvedPartInspection.html b/python/edu/resources/inspectionDescriptions/BuildoutUnresolvedPartInspection.html new file mode 100644 index 000000000000..b5b36c654afe --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/BuildoutUnresolvedPartInspection.html @@ -0,0 +1,5 @@ + + +This inspection highlights unresolved buildout parts. + + diff --git a/python/edu/resources/inspectionDescriptions/PyAbstractClassInspection.html b/python/edu/resources/inspectionDescriptions/PyAbstractClassInspection.html new file mode 100644 index 000000000000..41d83f7dcb9c --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyAbstractClassInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects when there aren't all abstract properties/methods are defined in subclass + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyArgumentEqualDefaultInspection.html b/python/edu/resources/inspectionDescriptions/PyArgumentEqualDefaultInspection.html new file mode 100644 index 000000000000..16d894ec131c --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyArgumentEqualDefaultInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights situations, where argument passed to function is equal to default parameter value + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyArgumentListInspection.html b/python/edu/resources/inspectionDescriptions/PyArgumentListInspection.html new file mode 100644 index 000000000000..97d74c0f04ed --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyArgumentListInspection.html @@ -0,0 +1,8 @@ + + + +This inspection reports discrepancies between declared parameters and actual arguments, as well as +incorrect arguments (e.g. duplicate named arguments) and incorrect argument order. Decorators are analyzed, too. + + + diff --git a/python/edu/resources/inspectionDescriptions/PyAssignmentToLoopOrWithParameterInspection.html b/python/edu/resources/inspectionDescriptions/PyAssignmentToLoopOrWithParameterInspection.html new file mode 100644 index 000000000000..4fc3dcd20164 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyAssignmentToLoopOrWithParameterInspection.html @@ -0,0 +1,21 @@ + + + + Checks for cases when you rewrite loop variable with inner loop + +
+    for i in xrange(5):
+      for i in xrange(20, 25):
+          print("Inner", i)
+      print("Outer", i)
+  
+ + It also warns you if variable declared in with statement is redeclared inside of statement body: + +
+    with open("file") as f:
+      f.read()
+      with open("file") as f:
+  
+ + diff --git a/python/edu/resources/inspectionDescriptions/PyAttributeOutsideInitInspection.html b/python/edu/resources/inspectionDescriptions/PyAttributeOutsideInitInspection.html new file mode 100644 index 000000000000..4e0fee15aac0 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyAttributeOutsideInitInspection.html @@ -0,0 +1,7 @@ + + + +This inspection detects instance attribute definition outside __init__ method + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyAugmentAssignmentInspection.html b/python/edu/resources/inspectionDescriptions/PyAugmentAssignmentInspection.html new file mode 100644 index 000000000000..f9684908d722 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyAugmentAssignmentInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights assignment that can be replaced with augmented assignment. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyBroadExceptionInspection.html b/python/edu/resources/inspectionDescriptions/PyBroadExceptionInspection.html new file mode 100644 index 000000000000..67c31a550156 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyBroadExceptionInspection.html @@ -0,0 +1,8 @@ + + + +This inspection highlights too broad exception clauses such as +no exception class specified, or specified as 'Exception'. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyByteLiteralInspection.html b/python/edu/resources/inspectionDescriptions/PyByteLiteralInspection.html new file mode 100644 index 000000000000..e26cb4c5f6ed --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyByteLiteralInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects characters > 255 in byte literals. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyCallByClassInspection.html b/python/edu/resources/inspectionDescriptions/PyCallByClassInspection.html new file mode 100644 index 000000000000..7bc9775f3135 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyCallByClassInspection.html @@ -0,0 +1,15 @@ + + +

+This inspection checks for calls of a method by class while passing an instance of a different class +as self parameter:

+
+  foo = Foo()
+  Bar.baz(foo, *more)
+
+

+Sometimes this may be intentional and correct. +But when unintentional, this leads to subtle bugs. +

+ + diff --git a/python/edu/resources/inspectionDescriptions/PyCallingNonCallableInspection.html b/python/edu/resources/inspectionDescriptions/PyCallingNonCallableInspection.html new file mode 100644 index 000000000000..fdc8ed156416 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyCallingNonCallableInspection.html @@ -0,0 +1,7 @@ + + + + This inspection highlights attempts to call objects which are not callable, like, for example, tuples. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyChainedComparisonsInspection.html b/python/edu/resources/inspectionDescriptions/PyChainedComparisonsInspection.html new file mode 100644 index 000000000000..657c918d0c8f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyChainedComparisonsInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights chained comparisons that can be simplified. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyClassHasNoInitInspection.html b/python/edu/resources/inspectionDescriptions/PyClassHasNoInitInspection.html new file mode 100644 index 000000000000..c31c8f8bf788 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyClassHasNoInitInspection.html @@ -0,0 +1,7 @@ + + + +This inspection used when a class has no __init__ method, neither its parent classes. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyClassicStyleClassInspection.html b/python/edu/resources/inspectionDescriptions/PyClassicStyleClassInspection.html new file mode 100644 index 000000000000..3894d7fe87c3 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyClassicStyleClassInspection.html @@ -0,0 +1,5 @@ + + +This inspection detects classic style classes usage. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyComparisonWithNoneInspection.html b/python/edu/resources/inspectionDescriptions/PyComparisonWithNoneInspection.html new file mode 100644 index 000000000000..37a8c54b1627 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyComparisonWithNoneInspection.html @@ -0,0 +1,8 @@ + + + + This inspection highlights comparisons with None. That type of comparisons + should always be done with 'is' or 'is not', never the equality operators. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyCompatibilityInspection.html b/python/edu/resources/inspectionDescriptions/PyCompatibilityInspection.html new file mode 100644 index 000000000000..7bb11b11976d --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyCompatibilityInspection.html @@ -0,0 +1,8 @@ + + + +Enable this inspection if you need your code to be compatible with a range of Python versions (for example, if you're building a library). +The range of Python versions with which the code needs to be compatible can be specified in the inspection settings. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDecoratorInspection.html b/python/edu/resources/inspectionDescriptions/PyDecoratorInspection.html new file mode 100644 index 000000000000..1265e99e5579 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDecoratorInspection.html @@ -0,0 +1,7 @@ + + +

+This inspection reports usages of @classmethod or @staticmethod decorators on functions outside of a class. +

+ + diff --git a/python/edu/resources/inspectionDescriptions/PyDefaultArgumentInspection.html b/python/edu/resources/inspectionDescriptions/PyDefaultArgumentInspection.html new file mode 100644 index 000000000000..3dced26af04e --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDefaultArgumentInspection.html @@ -0,0 +1,9 @@ + + + + This inspection detects when a mutable value as list or dictionary is detected in a default value for an argument.
+ Default argument values are evaluated only once at function definition time, which means that modifying the + default value of the argument will affect all subsequent calls of the function. +
+ + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDeprecatedModulesInspection.html b/python/edu/resources/inspectionDescriptions/PyDeprecatedModulesInspection.html new file mode 100644 index 000000000000..0d03609e0a00 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDeprecatedModulesInspection.html @@ -0,0 +1,7 @@ + + + + This inspection highlight import statements references a module which is deprecated in current Python version. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDeprecationInspection.html b/python/edu/resources/inspectionDescriptions/PyDeprecationInspection.html new file mode 100644 index 000000000000..46c89d8ed8d1 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDeprecationInspection.html @@ -0,0 +1,8 @@ + + + + This inspection highlights usages of Python functions, classes or methods which are marked as deprecated (which raise a + DeprecationWarning or a PendingDeprecationWarning). + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDictCreationInspection.html b/python/edu/resources/inspectionDescriptions/PyDictCreationInspection.html new file mode 100644 index 000000000000..af988be8ce9a --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDictCreationInspection.html @@ -0,0 +1,6 @@ + + +This inspection detects situations when dictionary creation + could be rewritten with dictionary literal. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDictDuplicateKeysInspection.html b/python/edu/resources/inspectionDescriptions/PyDictDuplicateKeysInspection.html new file mode 100644 index 000000000000..8f828987ba89 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDictDuplicateKeysInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights using the same value as dictionary key twice. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDocstringInspection.html b/python/edu/resources/inspectionDescriptions/PyDocstringInspection.html new file mode 100644 index 000000000000..f9f48e5e7204 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDocstringInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects mismatched parameters in docstring, lack of docstring and an empty docstring. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyDocstringTypesInspection.html b/python/edu/resources/inspectionDescriptions/PyDocstringTypesInspection.html new file mode 100644 index 000000000000..18f462f3a161 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyDocstringTypesInspection.html @@ -0,0 +1,5 @@ + + +This inspection highlights types in docstring which don't match dynamically inferred types. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyExceptClausesOrderInspection.html b/python/edu/resources/inspectionDescriptions/PyExceptClausesOrderInspection.html new file mode 100644 index 000000000000..d6ade17849ec --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyExceptClausesOrderInspection.html @@ -0,0 +1,9 @@ + + + + This inspection highlights situations when except clauses are not in the correct order + (from the more specific to the more generic) or one exception class is caught twice.
+ If you don't fix the order, some exceptions may not be catched by the most specific handler. +
+ + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyExceptionInheritInspection.html b/python/edu/resources/inspectionDescriptions/PyExceptionInheritInspection.html new file mode 100644 index 000000000000..71ba2f796ad0 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyExceptionInheritInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects when a custom exception class is raised but doesn't inherit from the builtin "Exception" class. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyFromFutureImportInspection.html b/python/edu/resources/inspectionDescriptions/PyFromFutureImportInspection.html new file mode 100644 index 000000000000..1161ea2b1035 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyFromFutureImportInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects 'from __future__ import' statements which are used not in the beginning of a file. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyGlobalUndefinedInspection.html b/python/edu/resources/inspectionDescriptions/PyGlobalUndefinedInspection.html new file mode 100644 index 000000000000..f493865fdbd7 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyGlobalUndefinedInspection.html @@ -0,0 +1,7 @@ + + + + This inspection is used when a variable is defined through the "global" statement but the variable is not defined in the module scope. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyInconsistentIndentationInspection.html b/python/edu/resources/inspectionDescriptions/PyInconsistentIndentationInspection.html new file mode 100644 index 000000000000..9fefe1fa6f88 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyInconsistentIndentationInspection.html @@ -0,0 +1,7 @@ + + +This inspection reports inconsistent indentation in Python source files (for example, use of a mixture + of tabs and spaces). + + + diff --git a/python/edu/resources/inspectionDescriptions/PyInitNewSignatureInspection.html b/python/edu/resources/inspectionDescriptions/PyInitNewSignatureInspection.html new file mode 100644 index 000000000000..3c44c678c864 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyInitNewSignatureInspection.html @@ -0,0 +1,7 @@ + + + + This inspection checks mutual compatibility of __new__ and __init__ signatures. + + + diff --git a/python/edu/resources/inspectionDescriptions/PyInterpreterInspection.html b/python/edu/resources/inspectionDescriptions/PyInterpreterInspection.html new file mode 100644 index 000000000000..3d33dd83160b --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyInterpreterInspection.html @@ -0,0 +1,5 @@ + + +This inspection notifies you if the current project has no Python interpreter configured or an invalid Python interpreter. + + diff --git a/python/edu/resources/inspectionDescriptions/PyListCreationInspection.html b/python/edu/resources/inspectionDescriptions/PyListCreationInspection.html new file mode 100644 index 000000000000..47dfd11bdbc1 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyListCreationInspection.html @@ -0,0 +1,8 @@ + + + + This inspection detects situations when list creation + could be rewritten with list literal. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyMandatoryEncodingInspection.html b/python/edu/resources/inspectionDescriptions/PyMandatoryEncodingInspection.html new file mode 100644 index 000000000000..8f9c1c87332c --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMandatoryEncodingInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects lack of encoding magic comment for file. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyMethodFirstArgAssignmentInspection.html b/python/edu/resources/inspectionDescriptions/PyMethodFirstArgAssignmentInspection.html new file mode 100644 index 000000000000..37914bb36ac9 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMethodFirstArgAssignmentInspection.html @@ -0,0 +1,6 @@ + + +This inspection detects cases when first parameter, such as 'self' or 'cls', is reassigned in a method. +In most cases imaginable, there's no point in such reassignment, and it indicates an error. + + diff --git a/python/edu/resources/inspectionDescriptions/PyMethodMayBeStaticInspection.html b/python/edu/resources/inspectionDescriptions/PyMethodMayBeStaticInspection.html new file mode 100644 index 000000000000..b6c42bf6bfb6 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMethodMayBeStaticInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects any methods which may safely be made static. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyMethodOverridingInspection.html b/python/edu/resources/inspectionDescriptions/PyMethodOverridingInspection.html new file mode 100644 index 000000000000..95b3a9fdaac8 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMethodOverridingInspection.html @@ -0,0 +1,6 @@ + + + This inspection detects inconsistencies in overriding method signatures. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyMethodParametersInspection.html b/python/edu/resources/inspectionDescriptions/PyMethodParametersInspection.html new file mode 100644 index 000000000000..378ed277a5a9 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMethodParametersInspection.html @@ -0,0 +1,5 @@ + + +This inspection looks for methods that lack a first parameter (which is usually named self). + + diff --git a/python/edu/resources/inspectionDescriptions/PyMissingConstructorInspection.html b/python/edu/resources/inspectionDescriptions/PyMissingConstructorInspection.html new file mode 100644 index 000000000000..281213efbff0 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyMissingConstructorInspection.html @@ -0,0 +1,7 @@ + + + +This inspection warns if call to super constructor in class is missed + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyNestedDecoratorsInspection.html b/python/edu/resources/inspectionDescriptions/PyNestedDecoratorsInspection.html new file mode 100644 index 000000000000..f42239f79e6e --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyNestedDecoratorsInspection.html @@ -0,0 +1,7 @@ + + + +This inspection looks for certain decorators that don't nest well. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyNonAsciiCharInspection.html b/python/edu/resources/inspectionDescriptions/PyNonAsciiCharInspection.html new file mode 100644 index 000000000000..c3f32441a4ac --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyNonAsciiCharInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects file contains non-ASCII characters and doesn't have an encoding declaration at the top. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyNoneFunctionAssignmentInspection.html b/python/edu/resources/inspectionDescriptions/PyNoneFunctionAssignmentInspection.html new file mode 100644 index 000000000000..e06c37f23b0f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyNoneFunctionAssignmentInspection.html @@ -0,0 +1,6 @@ + + +This inspection is similar to pylint inspection E1111. It highlights situations when an assignment is done on a function call but the inferred function doesn't return anything. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyOldStyleClassesInspection.html b/python/edu/resources/inspectionDescriptions/PyOldStyleClassesInspection.html new file mode 100644 index 000000000000..49a70216c631 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyOldStyleClassesInspection.html @@ -0,0 +1,7 @@ + + + + This inspection highlights occurrences of new-style class features in old-style classes. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyPackageRequirementsInspection.html b/python/edu/resources/inspectionDescriptions/PyPackageRequirementsInspection.html new file mode 100644 index 000000000000..ad916132fc56 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyPackageRequirementsInspection.html @@ -0,0 +1,5 @@ + + +This inspection warns about imported or required, but not installed packages. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyPep8Inspection.html b/python/edu/resources/inspectionDescriptions/PyPep8Inspection.html new file mode 100644 index 000000000000..3fa74ec62d48 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyPep8Inspection.html @@ -0,0 +1,5 @@ + + +This inspection runs the pep8.py tool to check for violations of the PEP 8 coding style guide. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyPep8NamingInspection.html b/python/edu/resources/inspectionDescriptions/PyPep8NamingInspection.html new file mode 100644 index 000000000000..1668c3fbb377 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyPep8NamingInspection.html @@ -0,0 +1,5 @@ + + +This inspection checks the PEP8 naming conventions. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyPropertyAccessInspection.html b/python/edu/resources/inspectionDescriptions/PyPropertyAccessInspection.html new file mode 100644 index 000000000000..437a05918de1 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyPropertyAccessInspection.html @@ -0,0 +1,8 @@ + + + + This inspection checks that properties are accessed correctly: + read-only not set, write-only not read, non-deletable not deleted. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyPropertyDefinitionInspection.html b/python/edu/resources/inspectionDescriptions/PyPropertyDefinitionInspection.html new file mode 100644 index 000000000000..38b322dd58fe --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyPropertyDefinitionInspection.html @@ -0,0 +1,8 @@ + + + + This inspection checks that arguments to property() and functions annotated with + @property and friends look reasonably. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyProtectedMemberInspection.html b/python/edu/resources/inspectionDescriptions/PyProtectedMemberInspection.html new file mode 100644 index 000000000000..d48badd5e7fe --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyProtectedMemberInspection.html @@ -0,0 +1,7 @@ + + + +This inspection warns if a protected member is access outside the class or a descendant of the class where it's defined. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyRaisingNewStyleClassInspection.html b/python/edu/resources/inspectionDescriptions/PyRaisingNewStyleClassInspection.html new file mode 100644 index 000000000000..e598afdcce23 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyRaisingNewStyleClassInspection.html @@ -0,0 +1,9 @@ + + + + This inspection detects attempts to raise a new-style class as an exception in projects with + language level less than 2.5. Raising new-style classes is only supported in Python 2.5 + or later. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyRedeclarationInspection.html b/python/edu/resources/inspectionDescriptions/PyRedeclarationInspection.html new file mode 100644 index 000000000000..1902a8f1a5c7 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyRedeclarationInspection.html @@ -0,0 +1,9 @@ + + +This inspection detects unconditional redeclarations of names without being used in between, like this:
+
def x(): pass
+x = 2
+
+It applies to function and class declarations, and top-level assignments.
+
+ diff --git a/python/edu/resources/inspectionDescriptions/PyRedundantParenthesesInspection.html b/python/edu/resources/inspectionDescriptions/PyRedundantParenthesesInspection.html new file mode 100644 index 000000000000..329591d4e425 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyRedundantParenthesesInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights redundant parentheses in statements. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyReturnFromInitInspection.html b/python/edu/resources/inspectionDescriptions/PyReturnFromInitInspection.html new file mode 100644 index 000000000000..7820f74cbede --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyReturnFromInitInspection.html @@ -0,0 +1,6 @@ + + +This inspection reports occurrences of return statements with a return value inside + __init__ methods of classes. A constructor should not return any value. + + diff --git a/python/edu/resources/inspectionDescriptions/PySetFunctionToLiteralInspection.html b/python/edu/resources/inspectionDescriptions/PySetFunctionToLiteralInspection.html new file mode 100644 index 000000000000..a54baa15f59f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PySetFunctionToLiteralInspection.html @@ -0,0 +1,8 @@ + + + + This inspection detects call for function "set" which can be replaced with + set literal. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyShadowingBuiltinsInspection.html b/python/edu/resources/inspectionDescriptions/PyShadowingBuiltinsInspection.html new file mode 100644 index 000000000000..f25c27847c4f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyShadowingBuiltinsInspection.html @@ -0,0 +1,5 @@ + + +This inspection detects shadowing built-in names, such as 'len' or 'list'. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyShadowingNamesInspection.html b/python/edu/resources/inspectionDescriptions/PyShadowingNamesInspection.html new file mode 100644 index 000000000000..dabfaf0b94a1 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyShadowingNamesInspection.html @@ -0,0 +1,5 @@ + + +This inspection detects shadowing names defined in outer scopes. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PySimplifyBooleanCheckInspection.html b/python/edu/resources/inspectionDescriptions/PySimplifyBooleanCheckInspection.html new file mode 100644 index 000000000000..dc5059e90a35 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PySimplifyBooleanCheckInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects equality comparison with a boolean literal. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PySingleQuotedDocstringInspection.html b/python/edu/resources/inspectionDescriptions/PySingleQuotedDocstringInspection.html new file mode 100644 index 000000000000..e1674d5aa517 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PySingleQuotedDocstringInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights docstrings not using triple double-quoted string format. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyStatementEffectInspection.html b/python/edu/resources/inspectionDescriptions/PyStatementEffectInspection.html new file mode 100644 index 000000000000..99eee87de619 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyStatementEffectInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects statements without any effect. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyStringExceptionInspection.html b/python/edu/resources/inspectionDescriptions/PyStringExceptionInspection.html new file mode 100644 index 000000000000..c2584f6bd36c --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyStringExceptionInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects when a string exception is raised. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyStringFormatInspection.html b/python/edu/resources/inspectionDescriptions/PyStringFormatInspection.html new file mode 100644 index 000000000000..2146cacc428f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyStringFormatInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects errors in string formatting operations. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PySuperArgumentsInspection.html b/python/edu/resources/inspectionDescriptions/PySuperArgumentsInspection.html new file mode 100644 index 000000000000..7229a01cfc75 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PySuperArgumentsInspection.html @@ -0,0 +1,7 @@ + + + + This inspection check that in any call to super(A, B), B either is an instance of A or a subclass of A. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyTrailingSemicolonInspection.html b/python/edu/resources/inspectionDescriptions/PyTrailingSemicolonInspection.html new file mode 100644 index 000000000000..1d4b70b3dc13 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyTrailingSemicolonInspection.html @@ -0,0 +1,5 @@ + + +This inspection detects trailing semicolons in statements. + + diff --git a/python/edu/resources/inspectionDescriptions/PyTupleAssignmentBalanceInspection.html b/python/edu/resources/inspectionDescriptions/PyTupleAssignmentBalanceInspection.html new file mode 100644 index 000000000000..6aa175b0927f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyTupleAssignmentBalanceInspection.html @@ -0,0 +1,6 @@ + + + + This inspection check that the number of expressions on right-hand side and targets on left-hand side are the same. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyTupleItemAssignmentInspection.html b/python/edu/resources/inspectionDescriptions/PyTupleItemAssignmentInspection.html new file mode 100644 index 000000000000..49a437b3561f --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyTupleItemAssignmentInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects assignments to tuple item. + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyTypeCheckerInspection.html b/python/edu/resources/inspectionDescriptions/PyTypeCheckerInspection.html new file mode 100644 index 000000000000..f2fc714eee0c --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyTypeCheckerInspection.html @@ -0,0 +1,8 @@ + + +This inspection detects type errors in function call expressions. +Due to dynamic dispatch and duck typing, this is possible in a limited but +useful number of cases. Types of function parameters can be specified in +docstrings or in Python 3 function annotations. + + diff --git a/python/edu/resources/inspectionDescriptions/PyUnboundLocalVariableInspection.html b/python/edu/resources/inspectionDescriptions/PyUnboundLocalVariableInspection.html new file mode 100644 index 000000000000..c65de68ae122 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnboundLocalVariableInspection.html @@ -0,0 +1,5 @@ + + +This inspection warns about local variables referenced before assignment. + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyUnnecessaryBackslashInspection.html b/python/edu/resources/inspectionDescriptions/PyUnnecessaryBackslashInspection.html new file mode 100644 index 000000000000..75d0bd3ba6d5 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnnecessaryBackslashInspection.html @@ -0,0 +1,7 @@ + + + +This inspection highlights backslashes in places where line continuation is implicit (inside (), [], {}). + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyUnreachableCodeInspection.html b/python/edu/resources/inspectionDescriptions/PyUnreachableCodeInspection.html new file mode 100644 index 000000000000..ed689c3de81b --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnreachableCodeInspection.html @@ -0,0 +1,3 @@ + +This inspection detects code which can not be normally reached. + diff --git a/python/edu/resources/inspectionDescriptions/PyUnresolvedReferencesInspection.html b/python/edu/resources/inspectionDescriptions/PyUnresolvedReferencesInspection.html new file mode 100644 index 000000000000..8841b4687e61 --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnresolvedReferencesInspection.html @@ -0,0 +1,7 @@ + + +This inspection detects names that should resolve but don't. +Due to dynamic dispatch and duck typing, this is possible in a limited but useful +number of cases. Top-level and class-level items are supported better than instance items. + + diff --git a/python/edu/resources/inspectionDescriptions/PyUnsupportedFeaturesInspection.html b/python/edu/resources/inspectionDescriptions/PyUnsupportedFeaturesInspection.html new file mode 100644 index 000000000000..b0c92cf6725b --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnsupportedFeaturesInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects usage of language features which not supported by current Python version + + + \ No newline at end of file diff --git a/python/edu/resources/inspectionDescriptions/PyUnusedLocalInspection.html b/python/edu/resources/inspectionDescriptions/PyUnusedLocalInspection.html new file mode 100644 index 000000000000..95ce583e518d --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/PyUnusedLocalInspection.html @@ -0,0 +1,3 @@ + + This inspection highlights local variables,parameters or local functions unused in scope. + diff --git a/python/edu/resources/inspectionDescriptions/RestRoleInspection.html b/python/edu/resources/inspectionDescriptions/RestRoleInspection.html new file mode 100644 index 000000000000..75809b6562be --- /dev/null +++ b/python/edu/resources/inspectionDescriptions/RestRoleInspection.html @@ -0,0 +1,7 @@ + + + + This inspection detects undefined roles. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/after.py.template b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/after.py.template new file mode 100644 index 000000000000..ea988e4ae394 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/after.py.template @@ -0,0 +1 @@ +print("{0: 5.3F}".format(12)) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/before.py.template b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/before.py.template new file mode 100644 index 000000000000..fdf53299f13f --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/before.py.template @@ -0,0 +1 @@ +print("% 5.3F" % 12) diff --git a/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/description.html b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/description.html new file mode 100644 index 000000000000..64adb58c79e3 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertFormatOperatorToMethodIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention replaces a string format operator with the equivalent 'format' method call. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/after.py.template b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/after.py.template new file mode 100644 index 000000000000..4a19285fe1f5 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/after.py.template @@ -0,0 +1,2 @@ +def foo(foo): + doSomething(foo) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/before.py.template b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/before.py.template new file mode 100644 index 000000000000..ca5b415454d2 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/before.py.template @@ -0,0 +1,2 @@ +def foo(**kwargs): + doSomething(kwargs['foo']) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/description.html b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/description.html new file mode 100644 index 000000000000..10db640519f0 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ConvertVariadicParamIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention replaces variadic parameter(s) with usual. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/after.py.template b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/after.py.template new file mode 100644 index 000000000000..3158f1b50510 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/after.py.template @@ -0,0 +1,2 @@ +import sys +name = sys.argv[0] diff --git a/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/before.py.template b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/before.py.template new file mode 100644 index 000000000000..8ccd26c2c6ae --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/before.py.template @@ -0,0 +1,2 @@ +from sys import argv +name = argv[0] diff --git a/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/description.html b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/description.html new file mode 100644 index 000000000000..63818e399ca3 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportFromToImportIntention/description.html @@ -0,0 +1,8 @@ + + + +This intention transforms from module_name import ... into import module_name +and qualifies any names imported from that module by module name. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/after.py.template b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/after.py.template new file mode 100644 index 000000000000..8ccd26c2c6ae --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/after.py.template @@ -0,0 +1,2 @@ +from sys import argv +name = argv[0] diff --git a/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/before.py.template b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/before.py.template new file mode 100644 index 000000000000..3158f1b50510 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/before.py.template @@ -0,0 +1,2 @@ +import sys +name = sys.argv[0] diff --git a/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/description.html b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/description.html new file mode 100644 index 000000000000..880f1e8deea2 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToImportFromIntention/description.html @@ -0,0 +1,8 @@ + + + +This intention replaces import foo with from foo import ... +and drop qualifiers at references to names from foo. + + + diff --git a/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/after.py.template b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/after.py.template new file mode 100644 index 000000000000..3331304b1da8 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/after.py.template @@ -0,0 +1,2 @@ +from urllib import url2pathname as u2p +name = u2p("/") diff --git a/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/before.py.template b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/before.py.template new file mode 100644 index 000000000000..6db525770030 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/before.py.template @@ -0,0 +1,2 @@ +from urllib import url2pathname +name = url2pathname("/") diff --git a/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/description.html b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/description.html new file mode 100644 index 000000000000..de5fc8167a1c --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ImportToggleAliasIntention/description.html @@ -0,0 +1,8 @@ + + + +This intention allows to add or remove an alias from an import element, renaming references accordingly. +Works both for import ... as ... and from ... import ... as statements. + + + diff --git a/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/after.py.template new file mode 100644 index 000000000000..4429ea5a8361 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/after.py.template @@ -0,0 +1,7 @@ +def func2(x, y): + return (x+y)/y + +def func(seq): + ... + newlist = reduce(func2, seq) + ... diff --git a/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/before.py.template new file mode 100644 index 000000000000..fd61cfd76461 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/before.py.template @@ -0,0 +1,4 @@ +def func(seq): + ... + newlist = reduce(lambda x, y: (x+y)/y, seq) + ... diff --git a/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/description.html b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/description.html new file mode 100644 index 000000000000..2e58675974a3 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertLambdaToFunctionIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts lambda function to function definition statement. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/after.py.template new file mode 100644 index 000000000000..1c8040301451 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/after.py.template @@ -0,0 +1,13 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + @property + def x(self): + return self._x + + +x = MyClass().x \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/before.py.template new file mode 100644 index 000000000000..7940289de5cb --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/before.py.template @@ -0,0 +1,12 @@ +class MyClass(object): + """ + My class to show intention. + """ + def __init__(self): + self._x = None + + def x(self): + return self._x + + +x = MyClass().x() \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/description.html b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/description.html new file mode 100644 index 000000000000..82ae5ebfe544 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertMethodToPropertyIntention/description.html @@ -0,0 +1,5 @@ + + +This intention converts method to property. + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/after.py.template new file mode 100644 index 000000000000..f393b5ef1e73 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/after.py.template @@ -0,0 +1,14 @@ +class MyClass(object): + """ + My class to show intention. + """ + + def __init__(self): + self.a = 1 + +def my_static_method(): + import code + import time + + time.sleep(100) + print code diff --git a/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/before.py.template new file mode 100644 index 000000000000..a2e4b7985e54 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/before.py.template @@ -0,0 +1,15 @@ +class MyClass(object): + """ + My class to show intention. + """ + + def __init__(self): + self.a = 1 + + @staticmethod + def my_static_method(): + import code + import time + + time.sleep(100) + print code diff --git a/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/description.html b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/description.html new file mode 100644 index 000000000000..ea7e64f10d6b --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertStaticMethodToFunctionIntention/description.html @@ -0,0 +1,5 @@ + + +This intention converts static method to function. + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/after.py.template new file mode 100644 index 000000000000..af439511d107 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/after.py.template @@ -0,0 +1,3 @@ +a = ("This line is ok," "\n" + "but \"this\" includes far too much" "\n" + "whitespace at the start") \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/before.py.template new file mode 100644 index 000000000000..b556824b48f0 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/before.py.template @@ -0,0 +1,3 @@ +a = """This line is ok, + but "this" includes far too much + whitespace at the start""" \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/description.html b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/description.html new file mode 100644 index 000000000000..a75a51a90fbf --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyConvertTripleQuotedStringIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts triple-quoted string to single-quoted. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDemorganIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyDemorganIntention/after.py.template new file mode 100644 index 000000000000..de9e125e7530 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDemorganIntention/after.py.template @@ -0,0 +1,2 @@ +if not (not a and not b): + pass \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDemorganIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyDemorganIntention/before.py.template new file mode 100644 index 000000000000..1a0e3f300de4 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDemorganIntention/before.py.template @@ -0,0 +1,2 @@ +if a or b: + pass \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDemorganIntention/description.html b/python/edu/resources/intentionDescriptions/PyDemorganIntention/description.html new file mode 100644 index 000000000000..4dfbca1bdc31 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDemorganIntention/description.html @@ -0,0 +1,14 @@ + + + +This intention replaces either +
+a or b with not(not a and not b) or
+a and b with not(not a or not b)
+
+ + +inside boolean expression. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/after.py.template new file mode 100644 index 000000000000..684a858f604c --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/after.py.template @@ -0,0 +1 @@ +{'a': 3, 'b': 5} \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/before.py.template new file mode 100644 index 000000000000..2bfbfb98c348 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/before.py.template @@ -0,0 +1 @@ +dict(a=3, b=5) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/description.html b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/description.html new file mode 100644 index 000000000000..ee5f619cd7f4 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictConstructorToLiteralFormIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts translation from dict constructor to dict literal form. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/after.py.template new file mode 100644 index 000000000000..2bfbfb98c348 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/after.py.template @@ -0,0 +1 @@ +dict(a=3, b=5) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/before.py.template new file mode 100644 index 000000000000..684a858f604c --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/before.py.template @@ -0,0 +1 @@ +{'a': 3, 'b': 5} \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/description.html b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/description.html new file mode 100644 index 000000000000..9af5246228d3 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyDictLiteralFormToConstructorIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts translation from dict literal form to dict constructor. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/after.py.template new file mode 100644 index 000000000000..37b79e3f1d30 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/after.py.template @@ -0,0 +1,2 @@ +if a > b: + return a \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/before.py.template new file mode 100644 index 000000000000..1814460d6f27 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/before.py.template @@ -0,0 +1,2 @@ +if b < a: + return a \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/description.html b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/description.html new file mode 100644 index 000000000000..c6b67f5acfe2 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyFlipComparisonIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention swaps the operands of a comparison expression. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/after.py.template new file mode 100644 index 000000000000..bf0cffa3e944 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/after.py.template @@ -0,0 +1,7 @@ +def foo(a, b): + """ + :param a: + :param b: + :return: + """ + pass \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/before.py.template new file mode 100644 index 000000000000..7898e8a5a596 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/before.py.template @@ -0,0 +1,2 @@ +def foo(a,b): + pass \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/description.html b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/description.html new file mode 100644 index 000000000000..87e9bb7c4b80 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyGenerateDocstringIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention generates documentation string stub. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyJoinIfIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/after.py.template new file mode 100644 index 000000000000..e2fcd5989953 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/after.py.template @@ -0,0 +1,2 @@ +if a and b: + return \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyJoinIfIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/before.py.template new file mode 100644 index 000000000000..c680e979fc94 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/before.py.template @@ -0,0 +1,3 @@ +if a: + if b: + return \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyJoinIfIntention/description.html b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/description.html new file mode 100644 index 000000000000..794e24c6b87c --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyJoinIfIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts two nested if statements into one if statement containing conjuction operation in it. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/after.py.template new file mode 100644 index 000000000000..89ed0f8d31a2 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/after.py.template @@ -0,0 +1,2 @@ +if a != b: + return a \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/before.py.template new file mode 100644 index 000000000000..7283065cd014 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/before.py.template @@ -0,0 +1,2 @@ +if not a == b: + return a \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/description.html b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/description.html new file mode 100644 index 000000000000..acb11fef7ac6 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyNegateComparisonIntention/description.html @@ -0,0 +1,8 @@ + + + + This intention converts boolean comparison expression not(a negop b) into a op b. + Where op and negop are mutually inverse comparison operators, like == and !=. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/after.py.template new file mode 100644 index 000000000000..cbf185626543 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/after.py.template @@ -0,0 +1 @@ +"\"Hello\" - said man." \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/before.py.template new file mode 100644 index 000000000000..904c28a98492 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/before.py.template @@ -0,0 +1 @@ +'"Hello" - said man.' \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/description.html b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/description.html new file mode 100644 index 000000000000..cfd35d664f82 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyQuotedStringIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention allows conversion between single-quoted and double-quoted strings. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PySplitIfIntention/after.py.template b/python/edu/resources/intentionDescriptions/PySplitIfIntention/after.py.template new file mode 100644 index 000000000000..c0f7384ea7c6 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PySplitIfIntention/after.py.template @@ -0,0 +1,3 @@ +if a: + if b: + return \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PySplitIfIntention/before.py.template b/python/edu/resources/intentionDescriptions/PySplitIfIntention/before.py.template new file mode 100644 index 000000000000..9e841f5ee358 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PySplitIfIntention/before.py.template @@ -0,0 +1,2 @@ +if a and b: + return \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PySplitIfIntention/description.html b/python/edu/resources/intentionDescriptions/PySplitIfIntention/description.html new file mode 100644 index 000000000000..643c3c79571f --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PySplitIfIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention converts if statement containing conjuction operation into two nested if statements with simplified conditions. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/after.py.template new file mode 100644 index 000000000000..56cd89aef1c8 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/after.py.template @@ -0,0 +1 @@ +"a%sc" % (b) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/before.py.template new file mode 100644 index 000000000000..96db9539c962 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/before.py.template @@ -0,0 +1 @@ +"a" + b + "c" \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/description.html b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/description.html new file mode 100644 index 000000000000..908daa21be31 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyStringConcatenationToFormatIntention/description.html @@ -0,0 +1,8 @@ + + + + This intention replaces a string concatenation with the equivalent expression with string formatting operator usage + or with str.format() method call (for Python versions >= 2.7). + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/after.py.template new file mode 100644 index 000000000000..24e157d011dc --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/after.py.template @@ -0,0 +1,4 @@ +if cond: + x = a +else: + x = b \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/before.py.template new file mode 100644 index 000000000000..601e958f079d --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/before.py.template @@ -0,0 +1 @@ +x = a if cond else b \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/description.html b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/description.html new file mode 100644 index 000000000000..c0552efb32e6 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyTransformConditionalExpressionIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention transforms conditional expression into if/else statement. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyYieldFromIntention/after.py.template b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/after.py.template new file mode 100644 index 000000000000..773e592b09e0 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/after.py.template @@ -0,0 +1 @@ +yield from b \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyYieldFromIntention/before.py.template b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/before.py.template new file mode 100644 index 000000000000..aa447f1e3b13 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/before.py.template @@ -0,0 +1,2 @@ +for a in b: + yield a \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/PyYieldFromIntention/description.html b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/description.html new file mode 100644 index 000000000000..667a76164b3f --- /dev/null +++ b/python/edu/resources/intentionDescriptions/PyYieldFromIntention/description.html @@ -0,0 +1,5 @@ + + + This intention transforms explicit iteration with 'yield' into 'yield from'. + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/after.py.template b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/after.py.template new file mode 100644 index 000000000000..036345d596d1 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/after.py.template @@ -0,0 +1,3 @@ +a = [] +for x in xrange(5): + a.add(x) \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/before.py.template b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/before.py.template new file mode 100644 index 000000000000..eef9ef7bb5dd --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/before.py.template @@ -0,0 +1 @@ +a = [x for x in xrange(5)] \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/description.html b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/description.html new file mode 100644 index 000000000000..54da12726567 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/ReplaceListComprehensionWithForIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention replaces a list comprehension with for loop. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/after.html.template b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/after.html.template new file mode 100644 index 000000000000..489da3518483 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/after.html.template @@ -0,0 +1,5 @@ +def foo(var): + """ + @type var: string + """ + var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/before.html.template b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/before.html.template new file mode 100644 index 000000000000..fcdfce0ebee8 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/before.html.template @@ -0,0 +1,2 @@ +def foo(var): + var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/description.html b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/description.html new file mode 100644 index 000000000000..9ff83f3b28bc --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInDocstringIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention used to specify type for expression in docstring. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/after.html.template b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/after.html.template new file mode 100644 index 000000000000..5f5265fc0bd6 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/after.html.template @@ -0,0 +1,2 @@ +def foo(var: object): + var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/before.html.template b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/before.html.template new file mode 100644 index 000000000000..fcdfce0ebee8 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/before.html.template @@ -0,0 +1,2 @@ +def foo(var): + var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/description.html b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/description.html new file mode 100644 index 000000000000..dce9825a7ef6 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/SpecifyTypeInPy3AnnotationsIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention used to specify type for expression in Python 3 using type annotations. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/TypeAssertionIntention/after.html.template b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/after.html.template new file mode 100644 index 000000000000..fd8ffc7fb452 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/after.html.template @@ -0,0 +1,3 @@ +var = unknown() +assert isinstance(var, object) +var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/TypeAssertionIntention/before.html.template b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/before.html.template new file mode 100644 index 000000000000..3ce25401f353 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/before.html.template @@ -0,0 +1,2 @@ +var = unknown() +var. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/TypeAssertionIntention/description.html b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/description.html new file mode 100644 index 000000000000..be57cd3b6847 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/TypeAssertionIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention used to specify type for expression by assertion. + + + \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/WrapTransTagIntention/after.html.template b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/after.html.template new file mode 100644 index 000000000000..d26fc1258f3e --- /dev/null +++ b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/after.html.template @@ -0,0 +1 @@ +{% blocktrans %}This will have {{ myvar }} inside.{% endblocktrans %} \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/WrapTransTagIntention/before.html.template b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/before.html.template new file mode 100644 index 000000000000..e7f818a2378b --- /dev/null +++ b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/before.html.template @@ -0,0 +1 @@ +This will have {{ myvar }} inside. \ No newline at end of file diff --git a/python/edu/resources/intentionDescriptions/WrapTransTagIntention/description.html b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/description.html new file mode 100644 index 000000000000..6646903b6258 --- /dev/null +++ b/python/edu/resources/intentionDescriptions/WrapTransTagIntention/description.html @@ -0,0 +1,7 @@ + + + + This intention wraps selected template part with {% trans %} tag. + + + \ No newline at end of file diff --git a/python/edu/resources/liveTemplates/Python.xml b/python/edu/resources/liveTemplates/Python.xml new file mode 100644 index 000000000000..47928f82d8aa --- /dev/null +++ b/python/edu/resources/liveTemplates/Python.xml @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + + + + diff --git a/python/edu/resources/pycharm_core_about.png b/python/edu/resources/pycharm_core_about.png new file mode 100644 index 000000000000..6e92309f8b9b Binary files /dev/null and b/python/edu/resources/pycharm_core_about.png differ diff --git a/python/edu/resources/pycharm_core_about@2x.png b/python/edu/resources/pycharm_core_about@2x.png new file mode 100644 index 000000000000..a831870c6f19 Binary files /dev/null and b/python/edu/resources/pycharm_core_about@2x.png differ diff --git a/python/edu/resources/pycharm_core_logo.png b/python/edu/resources/pycharm_core_logo.png new file mode 100644 index 000000000000..3daabbaa1470 Binary files /dev/null and b/python/edu/resources/pycharm_core_logo.png differ diff --git a/python/edu/resources/pycharm_core_logo@2x.png b/python/edu/resources/pycharm_core_logo@2x.png new file mode 100644 index 000000000000..83bf65b55e3b Binary files /dev/null and b/python/edu/resources/pycharm_core_logo@2x.png differ diff --git a/python/edu/resources/tips/AdaptiveWelcome.html b/python/edu/resources/tips/AdaptiveWelcome.html new file mode 100644 index 000000000000..597ffaf6e402 --- /dev/null +++ b/python/edu/resources/tips/AdaptiveWelcome.html @@ -0,0 +1,13 @@ + + + + + +

Welcome to PyCharm Productivity Guide

+

+ PyCharm keeps track of which of its features you are using and will offer you some tips to let you know + about the features you may have missed. These tips will be shown while the startup process is going on. + You can always get back to them by selecting Help | Productivity Guide + on the menu bar.

+ + diff --git a/python/edu/resources/tips/AnnotationsAndDiffs.html b/python/edu/resources/tips/AnnotationsAndDiffs.html new file mode 100644 index 000000000000..309d032d6483 --- /dev/null +++ b/python/edu/resources/tips/AnnotationsAndDiffs.html @@ -0,0 +1,13 @@ + + + + + +

+ Version control annotations show the latest changes of each line in one click.

+

+ Just right-click an annotation and use the Show Diff command in the context menu.

+

+

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/BreakpointSpeedmenu.html b/python/edu/resources/tips/BreakpointSpeedmenu.html new file mode 100644 index 000000000000..5a03f23734a0 --- /dev/null +++ b/python/edu/resources/tips/BreakpointSpeedmenu.html @@ -0,0 +1,12 @@ + + + + + +

+ Right-clicking on a breakpoint (in the left gutter) invokes the context menu where + you can quickly enable/disable the breakpoint or adjust its properties.

+

+

+ + diff --git a/python/edu/resources/tips/BuiltInServer.html b/python/edu/resources/tips/BuiltInServer.html new file mode 100644 index 000000000000..4515f0406f56 --- /dev/null +++ b/python/edu/resources/tips/BuiltInServer.html @@ -0,0 +1,16 @@ + + + + + + + +

It is very easy to change the built-in web server port (File | Settings – Debugger – JavaScript), +and use the "Built-in server port" spinner to set the new value.

+

+

Next, open an HTML page in your browser and see it running on the defined port.

+ + + + + diff --git a/python/edu/resources/tips/CamelHumpsInCodeCompletion.html b/python/edu/resources/tips/CamelHumpsInCodeCompletion.html new file mode 100644 index 000000000000..610f91da547e --- /dev/null +++ b/python/edu/resources/tips/CamelHumpsInCodeCompletion.html @@ -0,0 +1,11 @@ + + + + + +

+ When in the Code Completion lookup, you can ease the search by filtering the list with the help of the "camel words" prefixes.

+

+

+ + diff --git a/python/edu/resources/tips/CamelPrefixesInNavigationPopups.html b/python/edu/resources/tips/CamelPrefixesInNavigationPopups.html new file mode 100644 index 000000000000..cae5bf207ab9 --- /dev/null +++ b/python/edu/resources/tips/CamelPrefixesInNavigationPopups.html @@ -0,0 +1,17 @@ + + + + + + + +

When in the Go to Class, + Go to Symbol, or + Go to File popup, + you can ease the search by filtering the lookup list with the help of the "camel words" prefixes.

+

+ + + + + diff --git a/python/edu/resources/tips/CancelByControlArrows.html b/python/edu/resources/tips/CancelByControlArrows.html new file mode 100644 index 000000000000..2433e56796a3 --- /dev/null +++ b/python/edu/resources/tips/CancelByControlArrows.html @@ -0,0 +1,12 @@ + + + + + +

+ When an autopopup completion is active, + &shortcut:EditorLookupDown; and &shortcut:EditorLookupUp; + will close it and move the caret down or up in the editor. +

+ + diff --git a/python/edu/resources/tips/ChangeSorting.html b/python/edu/resources/tips/ChangeSorting.html new file mode 100644 index 000000000000..152e182b5dfc --- /dev/null +++ b/python/edu/resources/tips/ChangeSorting.html @@ -0,0 +1,11 @@ + + + + + +

+ You can switch between sorting completion variants by relevance or alphabetically by using an icon at the bottom right: +

+

+ + diff --git a/python/edu/resources/tips/ChangesView.html b/python/edu/resources/tips/ChangesView.html new file mode 100644 index 000000000000..73d19bbd87a1 --- /dev/null +++ b/python/edu/resources/tips/ChangesView.html @@ -0,0 +1,13 @@ + + + + + +

The Changes tool window shows all deleted, modified, and unversioned files in a single view. +Use &shortcut:ActivateChangesToolWindow; keyboard shortcut to show or hide this tool window.

+

From the Changes tool window you can perform all the necessary version control actions: commit changes, manage changelists, put resources under version control, examine differences and more.

+ + + + + diff --git a/python/edu/resources/tips/CheckRegExp.html b/python/edu/resources/tips/CheckRegExp.html new file mode 100644 index 000000000000..d231480db17c --- /dev/null +++ b/python/edu/resources/tips/CheckRegExp.html @@ -0,0 +1,13 @@ + + + + + +

The format of a regular expression can be rather complicated. +To make sure you didn't miss some slash of quotation mark, place the caret +somewhere in the expression you want to check, and press &shortcut:ShowIntentionActions;.

+

In the pop-up frame type a string that you think should match your regular expression. If the background turns green, you are lucky. If it turns red, then you have to look for a mistake.

+

+

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/ClassNameCompletion.html b/python/edu/resources/tips/ClassNameCompletion.html new file mode 100644 index 000000000000..cdeb6602a9ff --- /dev/null +++ b/python/edu/resources/tips/ClassNameCompletion.html @@ -0,0 +1,14 @@ + + + + + +

+ A special variant of the Code Completion feature invoked by pressing &shortcut:CodeCompletion; twice allows you to + complete the name of any class + no matter if it was imported in the current file or not. + If the class is not imported yet, the import statement is generated automatically.

+

+

+ + diff --git a/python/edu/resources/tips/ClipboardStack.html b/python/edu/resources/tips/ClipboardStack.html new file mode 100644 index 000000000000..1c5e00890bec --- /dev/null +++ b/python/edu/resources/tips/ClipboardStack.html @@ -0,0 +1,12 @@ + + + + + + + +

Use the &shortcut:PasteMultiple; shortcut to choose and insert recent clipboard contents into the text.

+ + + + diff --git a/python/edu/resources/tips/CloseOthers.html b/python/edu/resources/tips/CloseOthers.html new file mode 100644 index 000000000000..ab5beb58f6e3 --- /dev/null +++ b/python/edu/resources/tips/CloseOthers.html @@ -0,0 +1,15 @@ + + + + + +

+ There are two ways of closing all tabs in the editor, except the current one:

+
    +
  • First, right-click the editor tab, and choose Close Others on the context menu.
  • +
  • Second, keeping the Alt key pressed, click on the editor tab.
  • +
+

+

+ + diff --git a/python/edu/resources/tips/CodeCompletion.html b/python/edu/resources/tips/CodeCompletion.html new file mode 100644 index 000000000000..351c332e55a8 --- /dev/null +++ b/python/edu/resources/tips/CodeCompletion.html @@ -0,0 +1,15 @@ + + + + + +

+ The Code Completion feature lets you quickly complete different kinds of statements + in the code. + For example, start typing a class name and press &shortcut:CodeCompletion; + to complete it. + When multiple choices are available, they are shown in the lookup list.

+

+

+ + diff --git a/python/edu/resources/tips/CodeCompletionInSearch.html b/python/edu/resources/tips/CodeCompletionInSearch.html new file mode 100644 index 000000000000..165a58883779 --- /dev/null +++ b/python/edu/resources/tips/CodeCompletionInSearch.html @@ -0,0 +1,17 @@ + + + + + + + +

When you are finding text in the current file (&shortcut:Find;), you don't need to type the whole search string: + Basic Code Completion is available in the search field. Start typing, press &shortcut:CodeCompletion;, and + select the desired string from the suggestion list.

+ +

+ + + + + diff --git a/python/edu/resources/tips/CodeCompletionMiddle.html b/python/edu/resources/tips/CodeCompletionMiddle.html new file mode 100644 index 000000000000..016a0749554d --- /dev/null +++ b/python/edu/resources/tips/CodeCompletionMiddle.html @@ -0,0 +1,17 @@ + + + + + + + +

When using basic code completion (&shortcut:CodeCompletion;), +type any characters that exist anywhere in an identifier. +

+ +

+ + + + + diff --git a/python/edu/resources/tips/CodeCompletionNoShift.html b/python/edu/resources/tips/CodeCompletionNoShift.html new file mode 100644 index 000000000000..b9128ec74cf5 --- /dev/null +++ b/python/edu/resources/tips/CodeCompletionNoShift.html @@ -0,0 +1,16 @@ + + + + + +

+ When using basic code completion (&shortcut:CodeCompletion;), + you don't need to type upper-case letters in CamelHump names. + It is enough to type the initial letters of the camel names in lower case, and they will be smartly recognized.

+

+

+

This behavior is enabled, if None is selected from the +Case sensitive completion drop-down list (the +Code Completion page of the Editor settings). + + diff --git a/python/edu/resources/tips/ColorEditingInCss.html b/python/edu/resources/tips/ColorEditingInCss.html new file mode 100644 index 000000000000..cf92ed9baa2f --- /dev/null +++ b/python/edu/resources/tips/ColorEditingInCss.html @@ -0,0 +1,19 @@ + + + + + + + +

&productName; + simplifies your work + with colors in CSS files. The color + properties have the icons of the corresponding color in the left gutter area of the editor. +

+

Click color icons to choose the desired color from the color picker.

+

+ + + + + diff --git a/python/edu/resources/tips/ColumnSelection.html b/python/edu/resources/tips/ColumnSelection.html new file mode 100644 index 000000000000..d7bddd0db0fc --- /dev/null +++ b/python/edu/resources/tips/ColumnSelection.html @@ -0,0 +1,11 @@ + + + + + +

You can easily make column selection by dragging your mouse pointer while keeping the + Alt key pressed. +

+

+ + diff --git a/python/edu/resources/tips/Comment.html b/python/edu/resources/tips/Comment.html new file mode 100644 index 000000000000..534d17231c9e --- /dev/null +++ b/python/edu/resources/tips/Comment.html @@ -0,0 +1,17 @@ + + + + + +

+ You can comment and uncomment lines of code using &shortcut:CommentByLineComment;.

+

+ &shortcut:CommentByLineComment; comments or uncomments the current line or + several selected lines with single line comments ({# in Django templates, + or # in Python scripts).

+

+ Pressing &shortcut:CommentByBlockComment; for a selected block of source code + in a Django template surrounds the block with {% comment %} + and {% endcomment %} tags.

+ + diff --git a/python/edu/resources/tips/CommitCtrlK.html b/python/edu/resources/tips/CommitCtrlK.html new file mode 100644 index 000000000000..488a75e29bc9 --- /dev/null +++ b/python/edu/resources/tips/CommitCtrlK.html @@ -0,0 +1,11 @@ + + + + + +

+ The keyboard shortcut Ctrl+K enables you to quickly invoke the Commit Changes dialog.

+

+ This dialog shows all modifications in project, gives summary information of file status and suggests improvements before check-in.

+ + diff --git a/python/edu/resources/tips/CompletionInHTML.html b/python/edu/resources/tips/CompletionInHTML.html new file mode 100644 index 000000000000..3b39387f5c7a --- /dev/null +++ b/python/edu/resources/tips/CompletionInHTML.html @@ -0,0 +1,17 @@ + + + + + + + +

You can use Basic Completion + (&shortcut:CodeCompletion;) in HTML, CSS and JavaScript files, for completing attributes, + parameters, tags, selectors, etc.

+

+

+ + + + + diff --git a/python/edu/resources/tips/ConfiguringTerminal.html b/python/edu/resources/tips/ConfiguringTerminal.html new file mode 100644 index 000000000000..c393ea6575b7 --- /dev/null +++ b/python/edu/resources/tips/ConfiguringTerminal.html @@ -0,0 +1,16 @@ + + + + + + + +

For the embedded local terminal, you can define your favorite shell, +default tab name, and other settings. +Choose +File | Settings (Windows/*nix) or +PyCharm | Preferences (Mac) +on the main menu, and then open the page Terminal.

+ + + diff --git a/python/edu/resources/tips/Consoles.html b/python/edu/resources/tips/Consoles.html new file mode 100644 index 000000000000..1514b6efc50c --- /dev/null +++ b/python/edu/resources/tips/Consoles.html @@ -0,0 +1,11 @@ + + + + + +

+ You can work in the Python or Django shell without leaving the IDE. + Just choose Run Python Console or Run Django Console + in the Tools menu.

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/ConsolesCodeCompletion.html b/python/edu/resources/tips/ConsolesCodeCompletion.html new file mode 100644 index 000000000000..8c4cbb33dd3d --- /dev/null +++ b/python/edu/resources/tips/ConsolesCodeCompletion.html @@ -0,0 +1,14 @@ + + + + + +

+ Working in the interactive consoles, you don't need to memorise the command line syntax or available functions. + Instead, you can use the familiar code completion &shortcut:CodeCompletion;. + Moreover, from within the lookup list, you can press &shortcut:QuickJavaDoc; + to view the item's documentation.

+

+

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/ConsolesHistory.html b/python/edu/resources/tips/ConsolesHistory.html new file mode 100644 index 000000000000..8fe19a578742 --- /dev/null +++ b/python/edu/resources/tips/ConsolesHistory.html @@ -0,0 +1,13 @@ + + + + + +

+ If you have already spent some time working in the interactive consoles, + you don't need to re-type the previously entered commands to repeat them. + Instead, press &shortcut:EditorScrollUp; and + &shortcut:EditorScrollDown; to scroll through + the history of commands.

+ + diff --git a/python/edu/resources/tips/CopyWithNoSelection.html b/python/edu/resources/tips/CopyWithNoSelection.html new file mode 100644 index 000000000000..d7321e4e8379 --- /dev/null +++ b/python/edu/resources/tips/CopyWithNoSelection.html @@ -0,0 +1,13 @@ + + + + + + + +

+If nothing is selected in the editor, and you press &shortcut:$Copy;, then the whole line at caret is copied to the clipboard. +

+ + + diff --git a/python/edu/resources/tips/CtrlD.html b/python/edu/resources/tips/CtrlD.html new file mode 100644 index 000000000000..5b676b83275b --- /dev/null +++ b/python/edu/resources/tips/CtrlD.html @@ -0,0 +1,14 @@ + + + + + + + +

&shortcut:EditorDuplicate; in the editor duplicates the selected block or the current line + when no block is selected.

+ + + + + diff --git a/python/edu/resources/tips/CtrlDotInLookups.html b/python/edu/resources/tips/CtrlDotInLookups.html new file mode 100644 index 000000000000..9cc5b377d169 --- /dev/null +++ b/python/edu/resources/tips/CtrlDotInLookups.html @@ -0,0 +1,15 @@ + + + + + + + +

+ When using autopopup Code Completion, you can select the first item using &shortcut:EditorChooseLookupItemDot;. + The selected name is automatically entered in the editor followed by dot.

+ + + + + diff --git a/python/edu/resources/tips/CtrlShiftI.html b/python/edu/resources/tips/CtrlShiftI.html new file mode 100644 index 000000000000..59f9dd57209e --- /dev/null +++ b/python/edu/resources/tips/CtrlShiftI.html @@ -0,0 +1,17 @@ + + + + + + + +

Use &shortcut:QuickImplementations; + (View | Quick Definition), + to quickly review definition or content of the symbol at caret, without the need to open it + in a new editor tab.

+

+ + + + + diff --git a/python/edu/resources/tips/CtrlShiftIForLookup.html b/python/edu/resources/tips/CtrlShiftIForLookup.html new file mode 100644 index 000000000000..9a783314e0a2 --- /dev/null +++ b/python/edu/resources/tips/CtrlShiftIForLookup.html @@ -0,0 +1,16 @@ + + + + + + + +

The Quick Definition Viewer + (&shortcut:QuickImplementations;) can be also used for items in lookup lists that appear on code + completion and class/file/symbol navigaton commands.

+

+ + + + + \ No newline at end of file diff --git a/python/edu/resources/tips/CtrlW.html b/python/edu/resources/tips/CtrlW.html new file mode 100644 index 000000000000..34e30540cb80 --- /dev/null +++ b/python/edu/resources/tips/CtrlW.html @@ -0,0 +1,15 @@ + + + + + + + +

&shortcut:EditorSelectWord; (extend selection) in the editor selects the word at the caret + and then selects expanding areas of the source code. For example, it may select a method name, + then the expression that calls this method, then the whole statement, then the containing block, etc. + You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor.

+ + + + diff --git a/python/edu/resources/tips/DirDiff.html b/python/edu/resources/tips/DirDiff.html new file mode 100644 index 000000000000..b03166b9689e --- /dev/null +++ b/python/edu/resources/tips/DirDiff.html @@ -0,0 +1,10 @@ + + + + + +

+ To compare two directories, select one or both of them in the Project view and + press &shortcut:CompareDirs;.

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/DotEtcInLookups.html b/python/edu/resources/tips/DotEtcInLookups.html new file mode 100644 index 000000000000..149bbaad6aab --- /dev/null +++ b/python/edu/resources/tips/DotEtcInLookups.html @@ -0,0 +1,18 @@ + + + + + + + +

+ When using Code Completion, you can accept the currently highlighted selection in the popup list + with the period character (.), comma (,), + semicolon (;), space and other characters.

+

+ The selected name is automatically entered in the editor followed by the entered character.

+ + + + + diff --git a/python/edu/resources/tips/DragToOpen.html b/python/edu/resources/tips/DragToOpen.html new file mode 100644 index 000000000000..6d788aebb3e7 --- /dev/null +++ b/python/edu/resources/tips/DragToOpen.html @@ -0,0 +1,13 @@ + + + + + + +

You can easily open an external file for editing, if you just drag it from the Explorer or Finder to the editor.

+ + +

+ + + diff --git a/python/edu/resources/tips/EditRegExp.html b/python/edu/resources/tips/EditRegExp.html new file mode 100644 index 000000000000..6a14a46a28ca --- /dev/null +++ b/python/edu/resources/tips/EditRegExp.html @@ -0,0 +1,13 @@ + + + + + + +

You can avoid escaping backslashes in your regular expressions. Start typing a regular expression, then press &shortcut:ShowIntentionActions; and choose Edit RegExp. +The regular expression opens in a separate tab in the editor, where you can type backslashes as is.

+

All changes are synchronized with the original regular expression, and escapes are presented automatically. When ready, just press &shortcut:EditorEscape; to close the regular expression editor.

+

+ + + diff --git a/python/edu/resources/tips/Emmet.html b/python/edu/resources/tips/Emmet.html new file mode 100644 index 000000000000..6dcec74020a3 --- /dev/null +++ b/python/edu/resources/tips/Emmet.html @@ -0,0 +1,11 @@ + + + + + +

Speed up HTML, XML or CSS development with Emmet.

+

Enable this framework in the Emmet(Zen Coding) page of the Settings/Preferences dialog:

+

+

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/EnterDirectoryInGotoFile.html b/python/edu/resources/tips/EnterDirectoryInGotoFile.html new file mode 100644 index 000000000000..71704d4906f3 --- /dev/null +++ b/python/edu/resources/tips/EnterDirectoryInGotoFile.html @@ -0,0 +1,17 @@ + + + + + + + +

You can jump directly to any deeply buried file, if you press &shortcut:GotoFile;, and type just a couple +of characters of the enclosing directories and file names:

+ +

+ +

Use either a slash or a backslash as a delimiter.

+ + + + \ No newline at end of file diff --git a/python/edu/resources/tips/Escape.html b/python/edu/resources/tips/Escape.html new file mode 100644 index 000000000000..949dec64329d --- /dev/null +++ b/python/edu/resources/tips/Escape.html @@ -0,0 +1,15 @@ + + + + + + + +

The &shortcut:EditorEscape; key in any tool window moves the focus to the editor.

+

&shortcut:HideActiveWindow; moves the focus to the editor and also hides the current (or last active) tool window.

+

The &shortcut:JumpToLastWindow; key moves the focus from the editor to the last focused tool window.

+ + + + + diff --git a/python/edu/resources/tips/EvaluateExpressionInEditor.html b/python/edu/resources/tips/EvaluateExpressionInEditor.html new file mode 100644 index 000000000000..09917ef01048 --- /dev/null +++ b/python/edu/resources/tips/EvaluateExpressionInEditor.html @@ -0,0 +1,15 @@ + + + + + + + +

To easily evaluate the value of any expression while debugging the program, select its text in the editor + (you might want to press a &shortcut:EditorSelectWord; a few times to efficiently perform this operation) + and then press &shortcut:EvaluateExpression;.

+ + + + + diff --git a/python/edu/resources/tips/ExtractVariable.html b/python/edu/resources/tips/ExtractVariable.html new file mode 100644 index 000000000000..06ce96f45675 --- /dev/null +++ b/python/edu/resources/tips/ExtractVariable.html @@ -0,0 +1,19 @@ + + + + + + + +

The Extract Variable + refactoring helps you simplify complicated statements in your code. For example, in the code fragment below, + you can select an expression in the code, and press &shortcut:IntroduceVariable; (Refactor | Extract | Variable).

+

+

+ This will result in the following:

+

+ + + + + diff --git a/python/edu/resources/tips/FileStructurePopup.html b/python/edu/resources/tips/FileStructurePopup.html new file mode 100644 index 000000000000..f0f94c6a3e18 --- /dev/null +++ b/python/edu/resources/tips/FileStructurePopup.html @@ -0,0 +1,17 @@ + + + + + + + +

You can quickly navigate in the currently edited file with &shortcut:FileStructurePopup; + (Navigate | File Structure).

+

It shows the list of members of the current class. Select an element you want to navigate to and press the + Enter key or the &shortcut:EditSource; key.

+

To easily locate an item in the list, just start typing its name.

+ + + + + diff --git a/python/edu/resources/tips/FindReplaceToggle.html b/python/edu/resources/tips/FindReplaceToggle.html new file mode 100644 index 000000000000..60d7b31dc700 --- /dev/null +++ b/python/edu/resources/tips/FindReplaceToggle.html @@ -0,0 +1,17 @@ + + + + + + +

It is very easy to toggle between find and replace functionality.

+

When you perform search and replace in a file, pressing &shortcut:Find; +shows the search pane. Pressing &shortcut:Replace; adds field, where you can type the replace string.

+ +

While in the Find in Path dialog, you can switch to +replace by pressing &shortcut:ReplaceInPath;. Same way, press &shortcut:FindInPath; to hide the +Replace with field, and switch to mere search.

+ + + + diff --git a/python/edu/resources/tips/FindUsages.html b/python/edu/resources/tips/FindUsages.html new file mode 100644 index 000000000000..a7162139a42f --- /dev/null +++ b/python/edu/resources/tips/FindUsages.html @@ -0,0 +1,12 @@ + + + + + +

+ You can quickly find all places where a particular class, method or variable is used in the whole project + by positioning the caret at the symbol's name or at its usage in code and pressing &shortcut:FindUsages; + (Find Usages + in the popup menu).

+ + diff --git a/python/edu/resources/tips/GoToAction.html b/python/edu/resources/tips/GoToAction.html new file mode 100644 index 000000000000..89a93e95e3f2 --- /dev/null +++ b/python/edu/resources/tips/GoToAction.html @@ -0,0 +1,16 @@ + + + + + + + +

To quickly find a menu command or toolbar action, you do not need to look through the menus. Just press + &shortcut:GotoAction; + (Help | Find Action on the main + menu) and start typing the name of the action. Choose the desired action from the suggestion list.

+ + + + + diff --git a/python/edu/resources/tips/GoToClass.html b/python/edu/resources/tips/GoToClass.html new file mode 100644 index 000000000000..2cdf5eb3f0d1 --- /dev/null +++ b/python/edu/resources/tips/GoToClass.html @@ -0,0 +1,16 @@ + + + + + +

+ To open any class in the editor quickly, press &shortcut:GotoClass; + (Navigate | Class) + and start typing the name of the class. Choose the class from a drop-down list that appears.

+

+

+

+ You can open any file in your project in a similar way by using &shortcut:GotoFile; + (Navigate | File)

+ + diff --git a/python/edu/resources/tips/GoToDeclaration.html b/python/edu/resources/tips/GoToDeclaration.html new file mode 100644 index 000000000000..7db07bbfdf96 --- /dev/null +++ b/python/edu/resources/tips/GoToDeclaration.html @@ -0,0 +1,17 @@ + + + + + + + +

To navigate to the declaration of a class, method or variable used somewhere in the code, + position the caret at the usage and press &shortcut:GotoDeclaration;. You can also click the mouse + on usages with the Ctrl + key pressed to jump to declarations.

+

+ + + + + diff --git a/python/edu/resources/tips/GoToInspection.html b/python/edu/resources/tips/GoToInspection.html new file mode 100644 index 000000000000..dabb6ef4fb51 --- /dev/null +++ b/python/edu/resources/tips/GoToInspection.html @@ -0,0 +1,16 @@ + + + + + + + +

To quickly find and run an inspection, press + &shortcut:RunInspection; + and start typing the name of the inspection or its group. Choose the desired inspection from the suggestion list and + then specify the desired scope.

+ + + + + diff --git a/python/edu/resources/tips/GoToSymbol.html b/python/edu/resources/tips/GoToSymbol.html new file mode 100644 index 000000000000..85d099fd8121 --- /dev/null +++ b/python/edu/resources/tips/GoToSymbol.html @@ -0,0 +1,17 @@ + + + + + + + +

To open any particular method or field in the editor quickly, press &shortcut:GotoSymbol; + (Navigate | Symbol) + and start typing its name.

+

Choose symbol from the drop-down list that appears.

+

+ + + + + diff --git a/python/edu/resources/tips/GotoLineInFile.html b/python/edu/resources/tips/GotoLineInFile.html new file mode 100644 index 000000000000..cc44b74064f1 --- /dev/null +++ b/python/edu/resources/tips/GotoLineInFile.html @@ -0,0 +1,16 @@ + + + + + +

+ To open any class or file in the editor at the desired line, press &shortcut:GotoFile; + (Navigate | File), + start typing the name, and choose the one from the suggestion list. + Then type the colon (:) and a line number.

+

+ The selected file will open with the caret at the specified line.

+

+

+ + diff --git a/python/edu/resources/tips/HierarchyBrowser.html b/python/edu/resources/tips/HierarchyBrowser.html new file mode 100644 index 000000000000..3fd2fc9c1678 --- /dev/null +++ b/python/edu/resources/tips/HierarchyBrowser.html @@ -0,0 +1,15 @@ + + + + + +

+ To see the inheritance hierarchy for a selected class, + press &shortcut:TypeHierarchy; + (Navigate | Type Hierarchy). + You can also invoke the hierarchy view right from the editor + to see the hierarchy for the currently edited class.

+

+

+ + diff --git a/python/edu/resources/tips/HighlightUsagesInFile.html b/python/edu/resources/tips/HighlightUsagesInFile.html new file mode 100644 index 000000000000..ea316136833b --- /dev/null +++ b/python/edu/resources/tips/HighlightUsagesInFile.html @@ -0,0 +1,16 @@ + + + + + + + +

Use &shortcut:HighlightUsagesInFile; (Edit | Find | Highlight Usages in File) + to quickly highlight usages of some variable in the current file.

+

Use &shortcut:FindNext; and &shortcut:FindPrevious; keys to navigate through highlighted usages.

+

Press &shortcut:EditorEscape; to remove highlighting.

+ + + + + diff --git a/python/edu/resources/tips/HorizontalScrolling.html b/python/edu/resources/tips/HorizontalScrolling.html new file mode 100644 index 000000000000..f70b0cd50c7c --- /dev/null +++ b/python/edu/resources/tips/HorizontalScrolling.html @@ -0,0 +1,10 @@ + + + + + +

+ Enable the horizontal scrolling with the mouse wheel by holding + the Shift key.

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/ImageFileCompletion.html b/python/edu/resources/tips/ImageFileCompletion.html new file mode 100644 index 000000000000..cc6a5291b7ab --- /dev/null +++ b/python/edu/resources/tips/ImageFileCompletion.html @@ -0,0 +1,15 @@ + + + + + + + +

Use Basic Completion + (&shortcut:CodeCompletion;) within HTML, CSS and other files, for completing image file names.

+

+ + + + + diff --git a/python/edu/resources/tips/ImagesLookup.html b/python/edu/resources/tips/ImagesLookup.html new file mode 100644 index 000000000000..cad3862eef64 --- /dev/null +++ b/python/edu/resources/tips/ImagesLookup.html @@ -0,0 +1,16 @@ + + + + + + + +

You can quickly view the image referenced at caret by using the + Quick Definition + (&shortcut:QuickImplementations;). The underlying image will be opened in a popup instead of a separate editor tab.

+

+ + + + + diff --git a/python/edu/resources/tips/Interpreter.html b/python/edu/resources/tips/Interpreter.html new file mode 100644 index 000000000000..4f4c58f58657 --- /dev/null +++ b/python/edu/resources/tips/Interpreter.html @@ -0,0 +1,12 @@ + + + + + +

PyCharm allows configuring Python interpreters on the various stages of development:

+
    +
  • When a project is only being created (File | New Project, or Create New Project on the Welcome screen).
  • +
  • In an already existing project (File | Settings - Project Interpreter).
  • +
+ + diff --git a/python/edu/resources/tips/IssueNavigation.html b/python/edu/resources/tips/IssueNavigation.html new file mode 100644 index 000000000000..8f1bc7db088e --- /dev/null +++ b/python/edu/resources/tips/IssueNavigation.html @@ -0,0 +1,22 @@ + + + + + + + + +

&productName; lets you jump from your check-in comment to an issue in your task tracker.

+

All you have to do is to define issue navigation patterns on the + Version Control page of the Settings/Preferences + dialog:

+

+

When you commit a changelist, and type the check-in comment, make sure it matches one of your issue navigation patterns. + Later, when you browse through the changelists in the repository, such comments turn into hyperlinks:

+

+

Clicking a hyperlink brings you directly to an issue in your task tracker.

+ + + + + \ No newline at end of file diff --git a/python/edu/resources/tips/JoinLines.html b/python/edu/resources/tips/JoinLines.html new file mode 100644 index 000000000000..144035ddb624 --- /dev/null +++ b/python/edu/resources/tips/JoinLines.html @@ -0,0 +1,10 @@ + + + + + +

+ The &shortcut:EditorJoinLines; shortcut joins two lines + into one and removes unnecessary spaces to match your code style.

+ + diff --git a/python/edu/resources/tips/JumpToLastEdit.html b/python/edu/resources/tips/JumpToLastEdit.html new file mode 100644 index 000000000000..1438812f4e1d --- /dev/null +++ b/python/edu/resources/tips/JumpToLastEdit.html @@ -0,0 +1,15 @@ + + + + + + + +

&shortcut:JumpToLastChange; (Navigate | Last Edit Location) + brings you back to the last place where you made changes in the code.

+

Pressing &shortcut:JumpToLastChange; a few times moves you deeper into your changes history.

+ + + + + diff --git a/python/edu/resources/tips/LaunchConsole.html b/python/edu/resources/tips/LaunchConsole.html new file mode 100644 index 000000000000..5b2213c0c57d --- /dev/null +++ b/python/edu/resources/tips/LaunchConsole.html @@ -0,0 +1,15 @@ + + + + + +

+ While debugging, you might need an interactive console at hand... This is most easy. +During the debugging session, switch to the Debugger Console, +and then press the very lowest button in its toolbar. +

+

The console becomes interactive, and shows a prompt, where you can enter commands, and view output.

+

launch_console_in_debugger

+ + + diff --git a/python/edu/resources/tips/LineEndings.html b/python/edu/resources/tips/LineEndings.html new file mode 100644 index 000000000000..162eb9b1ede6 --- /dev/null +++ b/python/edu/resources/tips/LineEndings.html @@ -0,0 +1,12 @@ + + + + + +

To view which line separators style is used in the current file, +look at the Status Bar:

+ +

+

To change the current line ending style, just click the spinner.

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/LineEndingsFolder.html b/python/edu/resources/tips/LineEndingsFolder.html new file mode 100644 index 000000000000..a7824801b636 --- /dev/null +++ b/python/edu/resources/tips/LineEndingsFolder.html @@ -0,0 +1,13 @@ + + + + + +

You do not need to open a file in the editor to change its line separator style. +Use the Project tool window instead: select one or more files, +or folders, point to File | Line Separators on the main menu, +and then choose the desired line ending style.

+

For a directory, new line separator applies recursively.

+

+ + \ No newline at end of file diff --git a/python/edu/resources/tips/LiveTemplates.html b/python/edu/resources/tips/LiveTemplates.html new file mode 100644 index 000000000000..be1d10b45a42 --- /dev/null +++ b/python/edu/resources/tips/LiveTemplates.html @@ -0,0 +1,20 @@ + + + + + +

+ Live Templates let you generate many typical code constructs in seconds. For example, type + for in a Django template

+

+

+

+ and then press the Tab key to see what happens.

+

+

+

+ Use the Tab key to move between the template fields.

+

See Live Templates page of the Settings / Preferences +dialog for more details.

+ + diff --git a/python/edu/resources/tips/LiveTemplatesDjango.html b/python/edu/resources/tips/LiveTemplatesDjango.html new file mode 100644 index 000000000000..4bd3fa725cfa --- /dev/null +++ b/python/edu/resources/tips/LiveTemplatesDjango.html @@ -0,0 +1,13 @@ + + + + + +

If you are going to use Django live templates, make sure that Django is selected +as the default Python template language in the Settings / Preferences dialog: +

+

+

+ + + diff --git a/python/edu/resources/tips/LiveTemplatesRestore.html b/python/edu/resources/tips/LiveTemplatesRestore.html new file mode 100755 index 000000000000..dd090591347f --- /dev/null +++ b/python/edu/resources/tips/LiveTemplatesRestore.html @@ -0,0 +1,12 @@ + + + + + + +

If you've changed a live template, it becomes blue. If you want to return to the +original text, right-click such a blue template, and choose +Restore defaults on the context menu. +

+ + diff --git a/python/edu/resources/tips/LocalVCS.html b/python/edu/resources/tips/LocalVCS.html new file mode 100644 index 000000000000..28811c18950a --- /dev/null +++ b/python/edu/resources/tips/LocalVCS.html @@ -0,0 +1,16 @@ + + + + + + + +

To see your local history of changes in a file, invoke + Local History | Show History + from the context menu. You can navigate through different file versions, see the differences and roll back to any previous version.

+

Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature!

+ + + + + diff --git a/python/edu/resources/tips/Managepy.html b/python/edu/resources/tips/Managepy.html new file mode 100644 index 000000000000..ca9250ea3acd --- /dev/null +++ b/python/edu/resources/tips/Managepy.html @@ -0,0 +1,18 @@ + + + + + +

+ The easiest way to run a utility of the manage.py task is to + choose Run manage.py Task in the + Tools menu, or press &shortcut:Django.RunManageTaskAction;.

+

+ As you type the name of the utility you want to run, the lookup list shrinks + to show the matching entries only.

+

+ If you type an asterisk, PyCharm will show the complete list of all the available tasks.

+

+

+ + diff --git a/python/edu/resources/tips/MenuItemsDescriptions.html b/python/edu/resources/tips/MenuItemsDescriptions.html new file mode 100644 index 000000000000..1739124a0073 --- /dev/null +++ b/python/edu/resources/tips/MenuItemsDescriptions.html @@ -0,0 +1,14 @@ + + + + + + + +

To help you learn the purpose of each item in the main menu, its short description is shown in the status + bar at the bottom of the application frame when you position the mouse pointer over this item.

+ + + + + diff --git a/python/edu/resources/tips/MethodSeparators.html b/python/edu/resources/tips/MethodSeparators.html new file mode 100644 index 000000000000..1ce1b039d762 --- /dev/null +++ b/python/edu/resources/tips/MethodSeparators.html @@ -0,0 +1,16 @@ + + + + + + + +

To show separator lines between methods in the editor, open the editor settings + and select the Show method separators check box in the + Appearance page.

+ +

+ + + + diff --git a/python/edu/resources/tips/MethodUpDown.html b/python/edu/resources/tips/MethodUpDown.html new file mode 100644 index 000000000000..0bf39a287674 --- /dev/null +++ b/python/edu/resources/tips/MethodUpDown.html @@ -0,0 +1,12 @@ + + + + + + + +

Use &shortcut:MethodUp; and &shortcut:MethodDown; keys to quickly move between methods in the editor.

+ + + + diff --git a/python/edu/resources/tips/MoveToChangelist.html b/python/edu/resources/tips/MoveToChangelist.html new file mode 100644 index 000000000000..440cc9c17ee2 --- /dev/null +++ b/python/edu/resources/tips/MoveToChangelist.html @@ -0,0 +1,17 @@ + + + + + + + + +

If you don't want to commit some of your changes to the repository, you can set them aside for a while, by moving + to a separate changelist, or by putting them to a shelf. Select such file in the Local tab of the Changes tool + window, and on the context menu choose Move to another changelist, + or Shelve Changes.

+ + + + + diff --git a/python/edu/resources/tips/MoveUpDown.html b/python/edu/resources/tips/MoveUpDown.html new file mode 100644 index 000000000000..0575c20e7c63 --- /dev/null +++ b/python/edu/resources/tips/MoveUpDown.html @@ -0,0 +1,28 @@ + + + + + +

+ The Code | Move Statement Up/Down action is useful for reorganizing the code lines + in your file, e.g., for bringing a variable declaration closer to the variable usage.

+

+ For example, select a code fragment and press &shortcut:MoveStatementUp; or + &shortcut:MoveStatementDown;.

+

+ Before:

+

+

+

+ After moving the lines up:

+

+

+

+ After moving the lines down:

+

+

+

+ When there is no selection, the line at the cursor will be moved.

+ + + diff --git a/python/edu/resources/tips/Multicursor.html b/python/edu/resources/tips/Multicursor.html new file mode 100755 index 000000000000..251d849acab1 --- /dev/null +++ b/python/edu/resources/tips/Multicursor.html @@ -0,0 +1,17 @@ + + + + + + + +

In &productName;, you can have multiple cursors. +Having pressed Alt, click the left mouse button +at the desired position to set additional cursors in the editor.

+

Press &shortcut:EditorEscape; to remove all the additional cursors +but one that resides at the line at caret.

+

+ + + + diff --git a/python/edu/resources/tips/Multicursor1.html b/python/edu/resources/tips/Multicursor1.html new file mode 100755 index 000000000000..21bf62ffbd90 --- /dev/null +++ b/python/edu/resources/tips/Multicursor1.html @@ -0,0 +1,13 @@ + + + + + + + +

Clone the cursor strictly upwards or downwards. To do that, +press &shortcut:GotoAction; twice, type +Clone caret, and then choose the desired action.

+

+ + diff --git a/python/edu/resources/tips/MultipleProjects.html b/python/edu/resources/tips/MultipleProjects.html new file mode 100644 index 000000000000..2efdd0852d09 --- /dev/null +++ b/python/edu/resources/tips/MultipleProjects.html @@ -0,0 +1,16 @@ + + + + + + + +

&productName; can work with several projects in one window. +To open a project in the same window with the already opened one, choose +Open directory, then in the Open project +dialog box, select the option +Open in current window, and select the check box +Add to currently opened projects.

+ + + diff --git a/python/edu/resources/tips/NavBar.html b/python/edu/resources/tips/NavBar.html new file mode 100644 index 000000000000..2029dc95e2b8 --- /dev/null +++ b/python/edu/resources/tips/NavBar.html @@ -0,0 +1,15 @@ + + + + + + + +

Navigation bar is a quick alternative to the Project view.

+

Use &shortcut:ShowNavBar; keyboard shortcut to show the navigation bar, and arrow keys to locate the necessary files or folders.

+ + + +

+ + diff --git a/python/edu/resources/tips/NavigateToFilePath.html b/python/edu/resources/tips/NavigateToFilePath.html new file mode 100644 index 000000000000..0df5aa5b9377 --- /dev/null +++ b/python/edu/resources/tips/NavigateToFilePath.html @@ -0,0 +1,16 @@ + + + + + + + +

Ctrl+Click (on Windows) or Cmd+Click (on MacOS) a tab in the editor to navigate to any part of the file path. +Select the necessary element in the drop-down, and the corresponding file path opens in an external browser +(e.g., in the Explorer, if your OS is Windows).

+

+ + + + + \ No newline at end of file diff --git a/python/edu/resources/tips/OverrideImplementMethods.html b/python/edu/resources/tips/OverrideImplementMethods.html new file mode 100644 index 000000000000..f9a4ecb5083c --- /dev/null +++ b/python/edu/resources/tips/OverrideImplementMethods.html @@ -0,0 +1,12 @@ + + + + + +

+ You can easily override the methods of the base class by pressing + &shortcut:OverrideMethods; (Code | Override Methods).

+

+

+ + diff --git a/python/edu/resources/tips/ParameterInfo.html b/python/edu/resources/tips/ParameterInfo.html new file mode 100644 index 000000000000..3cc6ab808a1b --- /dev/null +++ b/python/edu/resources/tips/ParameterInfo.html @@ -0,0 +1,17 @@ + + + + + + + +

If the cursor is between the parentheses of a method call, pressing &shortcut:ParameterInfo; brings up + a list of valid parameters.

+

+ + + + + + + diff --git a/python/edu/resources/tips/PreviewTODO.html b/python/edu/resources/tips/PreviewTODO.html new file mode 100644 index 000000000000..c7c9c2acb83a --- /dev/null +++ b/python/edu/resources/tips/PreviewTODO.html @@ -0,0 +1,13 @@ + + + + + + +

TODO tool window lets you preview each of the +encountered TODO items – just click the preview button on the toolbar.

+

+

+ + + diff --git a/python/edu/resources/tips/PyColorFiles.html b/python/edu/resources/tips/PyColorFiles.html new file mode 100644 index 000000000000..4ac26ed2e950 --- /dev/null +++ b/python/edu/resources/tips/PyColorFiles.html @@ -0,0 +1,15 @@ + + + + + +

+ You don't need to guess which __init__.py or + views.py you are looking at...

+

+ Make the editor tabs and the lines in navigation lists stand out + using the File Colors page of the project settings.

+

+

+ + diff --git a/python/edu/resources/tips/QuickDocInSuggestionList.html b/python/edu/resources/tips/QuickDocInSuggestionList.html new file mode 100755 index 000000000000..94d0e5a2e0d3 --- /dev/null +++ b/python/edu/resources/tips/QuickDocInSuggestionList.html @@ -0,0 +1,14 @@ + + + + + + + +

When choosing a live template from a suggestion list, press +&shortcut:QuickJavaDoc; to view quick documentation - +to be sure you make a right choice:

+

+ + + diff --git a/python/edu/resources/tips/QuickDocOnMouseMove.html b/python/edu/resources/tips/QuickDocOnMouseMove.html new file mode 100755 index 000000000000..9499aeaeaad5 --- /dev/null +++ b/python/edu/resources/tips/QuickDocOnMouseMove.html @@ -0,0 +1,15 @@ + + + + + + +

You don't need to invoke quick documentation explicitly +(&shortcut:QuickJavaDoc;) - if you just move your mouse +pointer over the desired symbol, the quick documentation pop-up window will show +automatically.

+

To enable this feature, select the check box Show quick doc on mouse move +in the editor settings. +

+ + diff --git a/python/edu/resources/tips/QuickFixRightArrow.html b/python/edu/resources/tips/QuickFixRightArrow.html new file mode 100644 index 000000000000..04a937377bc2 --- /dev/null +++ b/python/edu/resources/tips/QuickFixRightArrow.html @@ -0,0 +1,17 @@ + + + + + + + +

When you press &shortcut:ShowIntentionActions; to invoke a quick fix or intention action, + press the right arrow key to reveal the list of additional options.

+

Depending on the context, you can choose to disable inspection, fix all problems, + change inspection profile, etc.

+

qfo

+ + + + + diff --git a/python/edu/resources/tips/QuickJavaDoc.html b/python/edu/resources/tips/QuickJavaDoc.html new file mode 100644 index 000000000000..5bceb1a6ce70 --- /dev/null +++ b/python/edu/resources/tips/QuickJavaDoc.html @@ -0,0 +1,12 @@ + + + + + +

+ To quickly see the documentation for the symbol at caret, press &shortcut:QuickJavaDoc; + (View | Quick Documentation).

+

+

+ + diff --git a/python/edu/resources/tips/QuickJavaDocInLookups.html b/python/edu/resources/tips/QuickJavaDocInLookups.html new file mode 100644 index 000000000000..b2c232944bda --- /dev/null +++ b/python/edu/resources/tips/QuickJavaDocInLookups.html @@ -0,0 +1,18 @@ + + + + + + + +

The shortcuts such as &shortcut:QuickJavaDoc; + (View | Quick Documentation), + &shortcut:ParameterInfo; (View | Parameter Info), + &shortcut:GotoDeclaration; (Navigate | Declaration) + and others can be used not only in the editor but in the code completion popup list as well.

+

+ + + + + diff --git a/python/edu/resources/tips/QuickSwitchScheme.html b/python/edu/resources/tips/QuickSwitchScheme.html new file mode 100644 index 000000000000..0d9359921242 --- /dev/null +++ b/python/edu/resources/tips/QuickSwitchScheme.html @@ -0,0 +1,17 @@ + + + + + + + +

With a single keystroke, you can apply another code style/coloring scheme or keymap right from the editor. + Just press &shortcut:QuickChangeScheme; + (View | Quick Switch Scheme), + to specify the scheme you want to change.

+

+ + + + + \ No newline at end of file diff --git a/python/edu/resources/tips/RecentChanges.html b/python/edu/resources/tips/RecentChanges.html new file mode 100644 index 000000000000..83cae820f71a --- /dev/null +++ b/python/edu/resources/tips/RecentChanges.html @@ -0,0 +1,14 @@ + + + + + + + +

Use &shortcut:RecentChanges; to quickly review your recent changes to the project.

+

+ + + + + diff --git a/python/edu/resources/tips/RecentFiles.html b/python/edu/resources/tips/RecentFiles.html new file mode 100644 index 000000000000..975af5018893 --- /dev/null +++ b/python/edu/resources/tips/RecentFiles.html @@ -0,0 +1,22 @@ + + + + + + + +

&shortcut:RecentFiles; (View | Recent Files) + brings a popup list of the recently visited files. Choose the desired file and press + Enter to open it.

+

+ +

Besides recent files, you can bring up results of the usage searches you have performed + recently. To do that, use the same &shortcut:RecentFiles; shortcut with the Find tool window having + the focus, and select the desired find usages result from the Recent Find Usages popup.

+ +

+ + + + + diff --git a/python/edu/resources/tips/RecentSearch.html b/python/edu/resources/tips/RecentSearch.html new file mode 100644 index 000000000000..1c727e6a952f --- /dev/null +++ b/python/edu/resources/tips/RecentSearch.html @@ -0,0 +1,16 @@ + + + + + + + + +

When searching for a text string in a file, use recent history: with the search pane already open, click + the down arrow to show the list of recent entries. +

+ + + + + diff --git a/python/edu/resources/tips/RefactorThis.html b/python/edu/resources/tips/RefactorThis.html new file mode 100644 index 000000000000..275e43b74696 --- /dev/null +++ b/python/edu/resources/tips/RefactorThis.html @@ -0,0 +1,13 @@ + + + + + + +

If you place the caret at certain symbol and press &shortcut:Refactorings.QuickListPopupAction;, +you will see the list of refactorings applicable to the current context.

+

+

+ + + diff --git a/python/edu/resources/tips/RemoteInterpreter.html b/python/edu/resources/tips/RemoteInterpreter.html new file mode 100644 index 000000000000..9373493d41e1 --- /dev/null +++ b/python/edu/resources/tips/RemoteInterpreter.html @@ -0,0 +1,13 @@ + + + + + +

Found yourself in a situation, when you want to use an interpreter located remotely? With +PyCharm it is quite easy.

+

To configure a remote interpreter, press &shortcut:ShowSettings;, and +under the Project Settings. open the page Project Interpreter.

+

Then click the geat button, and choose the option Add Remote:

+

You can use this remote interpreter for your project, or just leave it as one of the available interpreters.

+ + diff --git a/python/edu/resources/tips/Rename.html b/python/edu/resources/tips/Rename.html new file mode 100644 index 000000000000..a1307443a10f --- /dev/null +++ b/python/edu/resources/tips/Rename.html @@ -0,0 +1,17 @@ + + + + + + + +

You can easily rename your local variables with automatic correction of all places where they are used.

+

To try it, place the caret at the variable you want to rename, and press &shortcut:RenameElement; + (Refactor | Rename). + Type the new name in the popup window that appears, or select one of the suggested names, + and press + Enter.

+

+ + + diff --git a/python/edu/resources/tips/RenameCssSelector.html b/python/edu/resources/tips/RenameCssSelector.html new file mode 100644 index 000000000000..12e4b7a9cfbb --- /dev/null +++ b/python/edu/resources/tips/RenameCssSelector.html @@ -0,0 +1,15 @@ + + + + + + + +

It is possible to rename CSS selectors directly from HTML. Position the caret at + the selector to be renamed and press &shortcut:RenameElement; + (Refactor | Rename).

+ + + + + diff --git a/python/edu/resources/tips/Reopen.html b/python/edu/resources/tips/Reopen.html new file mode 100644 index 000000000000..f66edac2e0ac --- /dev/null +++ b/python/edu/resources/tips/Reopen.html @@ -0,0 +1,20 @@ + + + + + + + +

To open again one of the recent projects, use Reopen(on Windows and Linux)/Open Recent(on MacOS) +on the File menu:

+

+ +

Another way to reopen a project is to right-click the &productName; icon on the task bar: + +

+ + +

+ + + diff --git a/python/edu/resources/tips/RunConfigFolders.html b/python/edu/resources/tips/RunConfigFolders.html new file mode 100644 index 000000000000..a4d8c08c3597 --- /dev/null +++ b/python/edu/resources/tips/RunConfigFolders.html @@ -0,0 +1,11 @@ + + + + + + +

If there are too many run/debug configurations of the same type, you can group them into folders, and thus distinguish them visually.

+

+ + + diff --git a/python/edu/resources/tips/ScopesInTODO.html b/python/edu/resources/tips/ScopesInTODO.html new file mode 100644 index 000000000000..9872b807a7a9 --- /dev/null +++ b/python/edu/resources/tips/ScopesInTODO.html @@ -0,0 +1,15 @@ + + + + + + +

If you are working on a large project, with numerous TODO items, +filter them by scopes.

+

Use the Scope-Based tab in the TODO tool window to show only those items +that pertain to the scope of interest.

+

+

+ + + diff --git a/python/edu/resources/tips/SearchEverywhere.html b/python/edu/resources/tips/SearchEverywhere.html new file mode 100644 index 000000000000..9488ee263bda --- /dev/null +++ b/python/edu/resources/tips/SearchEverywhere.html @@ -0,0 +1,15 @@ + + + + + + + +

Find any action, symbol, or setting in &productName; with +Double Shift:

+

. +

You can also click in the upper-right corner of the product window. +

+ + + diff --git a/python/edu/resources/tips/SearchInSettings.html b/python/edu/resources/tips/SearchInSettings.html new file mode 100644 index 000000000000..85f14b136114 --- /dev/null +++ b/python/edu/resources/tips/SearchInSettings.html @@ -0,0 +1,16 @@ + + + + + + + +

You can quickly find a setting you need in the Settings/Preferences dialog, without browsing through the numerous options. +Just type some characters that, in your opinion, exist in the option description, and the list of settings will reduce to the +matching ones. Select the desired entry, and see the setting that contains the entered characters highlighted:

+

+ + + + + diff --git a/python/edu/resources/tips/SelectIn.html b/python/edu/resources/tips/SelectIn.html new file mode 100644 index 000000000000..5076777f945b --- /dev/null +++ b/python/edu/resources/tips/SelectIn.html @@ -0,0 +1,16 @@ + + + + + + + +

To quickly select the currently edited element (class, file, method or field) in any view (Project view, + Structure view or other), + press &shortcut:SelectIn;.

+

+ + + + + diff --git a/python/edu/resources/tips/SelectRunDebugConfiguration.html b/python/edu/resources/tips/SelectRunDebugConfiguration.html new file mode 100644 index 000000000000..54ff5a42b2f3 --- /dev/null +++ b/python/edu/resources/tips/SelectRunDebugConfiguration.html @@ -0,0 +1,14 @@ + + + + + + + +

By pressing &shortcut:ChooseRunConfiguration; you can access the Run/Debug dropdown on the main toolbar, + without the need to use your mouse.

+ + + + + \ No newline at end of file diff --git a/python/edu/resources/tips/SelectTasks.html b/python/edu/resources/tips/SelectTasks.html new file mode 100644 index 000000000000..db5fb1a34864 --- /dev/null +++ b/python/edu/resources/tips/SelectTasks.html @@ -0,0 +1,15 @@ + + + + + + +

When working with a lengthy list of tasks, you don't need to delete them one by one. + Select several tasks, using Shift + or Control/Command keys, click the right arrow, and then click +Remove. +

+

+ + + diff --git a/python/edu/resources/tips/ShowAppliedStyles.html b/python/edu/resources/tips/ShowAppliedStyles.html new file mode 100644 index 000000000000..2f6b0984b220 --- /dev/null +++ b/python/edu/resources/tips/ShowAppliedStyles.html @@ -0,0 +1,17 @@ + + + + + + + +

You can quickly review all styles currently applied to an HTML tag, by right-clicking the tag name and selecting + Show Applied Styles For Tag + from the context menu:

+

+ + + + + + diff --git a/python/edu/resources/tips/ShowHideSideBars.html b/python/edu/resources/tips/ShowHideSideBars.html new file mode 100644 index 000000000000..d39e28fa2e7b --- /dev/null +++ b/python/edu/resources/tips/ShowHideSideBars.html @@ -0,0 +1,14 @@ + + + + + +

+ If you need more workspace, you can hide the tool windows bars: + click in the lower left corner.

+

+ If necessary, you can show the tool window buttons just for a moment. To do that, press the key Alt (for Windows/*nix) or +Cmd (for Mac) twice and keep it down. + While the key is pressed, the tool window buttons are visible.

+ + diff --git a/python/edu/resources/tips/ShowUsages.html b/python/edu/resources/tips/ShowUsages.html new file mode 100644 index 000000000000..83e009ffab12 --- /dev/null +++ b/python/edu/resources/tips/ShowUsages.html @@ -0,0 +1,17 @@ + + + + + + + +

You can bring forward the list of all usages of a class, method or variable across the whole + project, and quickly jump to the selected usage. To do that, place the caret at the symbol's name or at its usage + in code and press &shortcut:ShowUsages; (Edit | Find | Show Usages + in the main menu), scroll the list and click the desired usage.

+

+ + + + + diff --git a/python/edu/resources/tips/SpeedSearch.html b/python/edu/resources/tips/SpeedSearch.html new file mode 100644 index 000000000000..879615356dab --- /dev/null +++ b/python/edu/resources/tips/SpeedSearch.html @@ -0,0 +1,14 @@ + + + + + + + +

The speed search is available in all the tree views: just start typing and you'll quickly locate the necessary item.

+

+ + + + + diff --git a/python/edu/resources/tips/SpeedSearchinLiveTemplates.html b/python/edu/resources/tips/SpeedSearchinLiveTemplates.html new file mode 100644 index 000000000000..c5b3f9ca3a54 --- /dev/null +++ b/python/edu/resources/tips/SpeedSearchinLiveTemplates.html @@ -0,0 +1,12 @@ + + + + + + +

In the Live Templates settings, use speed search to find templates with certain text in the template abbreviation, body or description.

+

Start typing the desired text, and the list of available templates will shrink to show matching templates only:

+

+ + + diff --git a/python/edu/resources/tips/Spellchecker.html b/python/edu/resources/tips/Spellchecker.html new file mode 100644 index 000000000000..7361ddf2aaaf --- /dev/null +++ b/python/edu/resources/tips/Spellchecker.html @@ -0,0 +1,15 @@ + + + + + + +

Keep your source code typo-free with the help of the built-in Spellchecker.

+ +

All texts, including comments, textual strings and literals, are inspected against the pre-defined dictionaries. +All typos are highlighted, which leaves you with the task of choosing the correct word, accepting the current spelling, or disabling inspection.

+

Use &shortcut:ShowIntentionActions; to see the list of available actions.

+ + + + diff --git a/python/edu/resources/tips/SpellcheckerDictionaries.html b/python/edu/resources/tips/SpellcheckerDictionaries.html new file mode 100644 index 000000000000..c81027a013f0 --- /dev/null +++ b/python/edu/resources/tips/SpellcheckerDictionaries.html @@ -0,0 +1,12 @@ + + + + + + +

If you lack words in the pre-defined dictionaries, you can create your own ones. A custom dictionary is a mere +textual file with a .dic extension, with each word starting on a new line.

+

All you have to do is to point to the directories where your dictionaries are stored, in the +Spelling of the Settings dialog.

+ + diff --git a/python/edu/resources/tips/Surround.html b/python/edu/resources/tips/Surround.html new file mode 100644 index 000000000000..a7b2478b56ef --- /dev/null +++ b/python/edu/resources/tips/Surround.html @@ -0,0 +1,14 @@ + + + + + +

+ When you want to catch exceptions thrown by some code fragment, + select it in the editor, press &shortcut:SurroundWith; + (Code | Surround With) and choose try/except. + This will automatically generate the except clause.

+

+ surround

+ + diff --git a/python/edu/resources/tips/Switcher.html b/python/edu/resources/tips/Switcher.html new file mode 100644 index 000000000000..270bd9b86574 --- /dev/null +++ b/python/edu/resources/tips/Switcher.html @@ -0,0 +1,15 @@ + + + + + + + +

Use the Switcher (&shortcut:Switcher;) to switch between open files and tool windows. + Keeping Ctrl pressed, use the Up and Down arrow keys, + Tab or Shift+Tab, Alt for navigation; + use Delete or BackSpace to close editor tab or hide a tool window.

+

+ + + \ No newline at end of file diff --git a/python/edu/resources/tips/TabInEditorClose.html b/python/edu/resources/tips/TabInEditorClose.html new file mode 100644 index 000000000000..dd3f371c0228 --- /dev/null +++ b/python/edu/resources/tips/TabInEditorClose.html @@ -0,0 +1,15 @@ + + + + + + + +

Did you know that you can close tabs in the editor and the tool windows of &productName; without actually + using the context menu commands? + It is enough to point with your mouse cursor to a tab to be closed, and click the middle mouse button, or just + use the Shift+click combination.

+ + + + diff --git a/python/edu/resources/tips/TabInLookups.html b/python/edu/resources/tips/TabInLookups.html new file mode 100644 index 000000000000..328047399be6 --- /dev/null +++ b/python/edu/resources/tips/TabInLookups.html @@ -0,0 +1,17 @@ + + + + + + + +

When using Code Completion, you can accept the currently highlighted selection in the popup list + with &shortcut:EditorChooseLookupItemReplace; key.

+

Unlike accepting with the &shortcut:EditorChooseLookupItem; key, the selected name will overwrite + the rest of the name to the right of the caret. This can be especially useful for replacing one method + or variable name with another.

+ + + + + diff --git a/python/edu/resources/tips/TagNameCompletion.html b/python/edu/resources/tips/TagNameCompletion.html new file mode 100644 index 000000000000..cdce27443c63 --- /dev/null +++ b/python/edu/resources/tips/TagNameCompletion.html @@ -0,0 +1,17 @@ + + + + + +

+ A special variant of the Code Completion feature invoked by pressing &shortcut:CodeCompletion; twice allows you to + complete + XML tag names from namespaces not declared in the current file. + If the namespace is not declared yet the declaration is generated automatically. +

+ +

+ + + + \ No newline at end of file diff --git a/python/edu/resources/tips/Templates.html b/python/edu/resources/tips/Templates.html new file mode 100644 index 000000000000..91bd658bff3f --- /dev/null +++ b/python/edu/resources/tips/Templates.html @@ -0,0 +1,14 @@ + + + + + +

+ It's very easy to navigate between the Django templates and referencing views.

+

+ To do that, use the icons and + in the left gutter of the editor.

+

+

+ + diff --git a/python/edu/resources/tips/Terminal.html b/python/edu/resources/tips/Terminal.html new file mode 100644 index 000000000000..fcebc658521a --- /dev/null +++ b/python/edu/resources/tips/Terminal.html @@ -0,0 +1,14 @@ + + + + + + + +

You don't need to leave &productName; to work with your favorite shell. Just choose +Tools | Open Terminal on the main menu, +and enjoy using the embedded local terminal.

+

+ + + diff --git a/python/edu/resources/tips/TerminalOpen.html b/python/edu/resources/tips/TerminalOpen.html new file mode 100755 index 000000000000..bb96ceebb64b --- /dev/null +++ b/python/edu/resources/tips/TerminalOpen.html @@ -0,0 +1,14 @@ + + + + + + + +

&productName; makes it possible to +launch the embedded local terminal using keyboard only. Press +&shortcut:ActivateTerminalToolWindow;, +and see the terminal running. +

+ + diff --git a/python/edu/resources/tips/ToolWindowsQuickAccess.html b/python/edu/resources/tips/ToolWindowsQuickAccess.html new file mode 100644 index 000000000000..bf499d360dd1 --- /dev/null +++ b/python/edu/resources/tips/ToolWindowsQuickAccess.html @@ -0,0 +1,14 @@ + + + + + + + +

You can gain quick access to the available tool windows: hover your mouse +pointer over icon in the lower left corner of the IDE window.

+

The list of tool windows shows up, leaving you with the task of selecting the desired one:

+

+ + + diff --git a/python/edu/resources/tips/VcsQuickList.html b/python/edu/resources/tips/VcsQuickList.html new file mode 100644 index 000000000000..e7455bab492e --- /dev/null +++ b/python/edu/resources/tips/VcsQuickList.html @@ -0,0 +1,16 @@ + + + + + + +

All your most indispensable VCS commands are just one-click away...

+

+Choose VCS | VCS Operations Popup +on the main menu, and get a popup with the VCS commands that are relevant to the current context: +

+ +

+ + + diff --git a/python/edu/resources/tips/Welcome.html b/python/edu/resources/tips/Welcome.html new file mode 100644 index 000000000000..1be740b96e03 --- /dev/null +++ b/python/edu/resources/tips/Welcome.html @@ -0,0 +1,15 @@ + + + + + +

Welcome to PyCharm &majorVersion;.&minorVersion;

+

+ You can quickly get familiar with the main features of the IDE by reading these tips.

+

+ You can try out the features described in the tips while this dialog stays open on the screen.

+

+ If you close the dialog, you can always get back to it using + Help | Tip of the Day on the menu bar.

+ + diff --git a/python/edu/resources/tips/WideScreen.html b/python/edu/resources/tips/WideScreen.html new file mode 100644 index 000000000000..1ef170b896a4 --- /dev/null +++ b/python/edu/resources/tips/WideScreen.html @@ -0,0 +1,16 @@ + + + + + + + +

Tune the &productName; tool windows layout to make better use of your screen.

+

Toggle between the vertical and side-by-side placement of the tool windows by +Ctrl+click (Windows/*nix) or Cmd+click (Mac) on the splitter:

+ + +

+ + + diff --git a/python/edu/resources/tips/WildcardsInNavigationPopups.html b/python/edu/resources/tips/WildcardsInNavigationPopups.html new file mode 100644 index 000000000000..87958ee8ee10 --- /dev/null +++ b/python/edu/resources/tips/WildcardsInNavigationPopups.html @@ -0,0 +1,20 @@ + + + + + + + +

For the pattern search in the Go to Class, + Go to Symbol and + Go to File pop-up frames, + use * and space symbols.

+

* stands for any symbol.

+

Space at the end means the end of a pattern, and the preceding string will be considered not just a prefix but a whole pattern. + The list of the suggested names will be reduced accordingly.

+

+ + + + + diff --git a/python/edu/resources/tips/WordCompletion.html b/python/edu/resources/tips/WordCompletion.html new file mode 100644 index 000000000000..fd51de5e95a6 --- /dev/null +++ b/python/edu/resources/tips/WordCompletion.html @@ -0,0 +1,16 @@ + + + + + + + +

Use Basic Completion + (&shortcut:CodeCompletion;) for completing words in text and comments in files of many different types.

+

All the words from the current file that start with the typed prefix will appear in the lookup list.

+

+ + + + + diff --git a/python/edu/resources/tips/css/tips.css b/python/edu/resources/tips/css/tips.css new file mode 100644 index 000000000000..1dea96fc5169 --- /dev/null +++ b/python/edu/resources/tips/css/tips.css @@ -0,0 +1,60 @@ +body { + /*background: #ffffff;*/ + margin-left: 10px; + margin-right: 2px; + margin-bottom: 6px; +} +h1, p, ul { + font-family: 'MS Reference Sans Serif', verdana, arial, sans-serif; +} +.code, .code_emphasis, .code_keyword, pre, .shortcut { + font-family: 'Lucida Console', monospace; +} +h1, p, pre, ul { + font-size: 10px; + /*color: #3f3f3f;*/ +} +p, ul { + margin-top: 6px; +} +h1, p, ul { + margin-bottom: 0; +} +ul { + margin-left: 0; + padding-left: 14px; +} +h1, .image, pre { + margin-top: 10px; +} +.image, pre { + margin-bottom: 2px; +} +pre { + margin-right: 6px; + border-style: solid; + border-width: 1px; + border-color: #d0d0d0; + background-color: #fbfbfb; + padding-left: 10px; + padding-top: 6px; + padding-bottom: 6px; +} +.control, h1 { + font-weight: bold; +} +.control { + color: #808080; +} +.caret, .code_emphasis, .code_keyword, .emphasis, .shortcut { + color: #990000; +} +pre .keyword{ + color: #000080; +} +h1 .product { + color: #264db5; +} +h1 .version { + color: #f58220; +} \ No newline at end of file diff --git a/python/edu/resources/tips/css/tips_darcula.css b/python/edu/resources/tips/css/tips_darcula.css new file mode 100644 index 000000000000..5524189d342f --- /dev/null +++ b/python/edu/resources/tips/css/tips_darcula.css @@ -0,0 +1,75 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +body { + margin-left: 10px; + margin-right: 2px; + margin-bottom: 6px; +} +h1, p, ul { + font-family: 'MS Reference Sans Serif', verdana, arial, sans-serif; +} +.code, .code_emphasis, .code_keyword, pre, .shortcut { + font-family: 'Lucida Console', monospace; +} +h1, p, pre, ul { + font-size: 10px; + /*color: #3f3f3f;*/ +} +p, ul { + margin-top: 6px; +} +h1, p, ul { + margin-bottom: 0; +} +ul { + margin-left: 0; + padding-left: 14px; +} +h1, .image, pre { + margin-top: 10px; +} +.image, pre { + margin-bottom: 2px; +} +pre { + margin-right: 6px; + border-style: solid; + border-width: 1px; + border-color: #d0d0d0; + background-color: #fbfbfb; + padding-left: 10px; + padding-top: 6px; + padding-bottom: 6px; +} +.control, h1 { + font-weight: bold; +} +.control { + color: #d19a67; +} +.caret, .code_emphasis, .code_keyword, .emphasis, .shortcut { + color: #cb7d4a; + font-weight: bold; +} +pre .keyword{ + color: #cb7832; +} +h1 .product { + color: #5275d0; +} +h1 .version { + color: #f58220; +} \ No newline at end of file diff --git a/python/edu/resources/tips/images/CodeCompletionInSearch.png b/python/edu/resources/tips/images/CodeCompletionInSearch.png new file mode 100644 index 000000000000..f4aa5e71bc48 Binary files /dev/null and b/python/edu/resources/tips/images/CodeCompletionInSearch.png differ diff --git a/python/edu/resources/tips/images/CodeCompletionInSearch@2x.png b/python/edu/resources/tips/images/CodeCompletionInSearch@2x.png new file mode 100644 index 000000000000..ffdc6ecd1228 Binary files /dev/null and b/python/edu/resources/tips/images/CodeCompletionInSearch@2x.png differ diff --git a/python/edu/resources/tips/images/CodeCompletionInSearch@2x_dark.png b/python/edu/resources/tips/images/CodeCompletionInSearch@2x_dark.png new file mode 100644 index 000000000000..13a36f0b9cb0 Binary files /dev/null and b/python/edu/resources/tips/images/CodeCompletionInSearch@2x_dark.png differ diff --git a/python/edu/resources/tips/images/CodeCompletionInSearch_dark.png b/python/edu/resources/tips/images/CodeCompletionInSearch_dark.png new file mode 100644 index 000000000000..69c9b5d8bca3 Binary files /dev/null and b/python/edu/resources/tips/images/CodeCompletionInSearch_dark.png differ diff --git a/python/edu/resources/tips/images/RunConfigFolder.png b/python/edu/resources/tips/images/RunConfigFolder.png new file mode 100644 index 000000000000..b9badc177a1f Binary files /dev/null and b/python/edu/resources/tips/images/RunConfigFolder.png differ diff --git a/python/edu/resources/tips/images/RunConfigFolder@2x.png b/python/edu/resources/tips/images/RunConfigFolder@2x.png new file mode 100644 index 000000000000..ae8a0ebe8992 Binary files /dev/null and b/python/edu/resources/tips/images/RunConfigFolder@2x.png differ diff --git a/python/edu/resources/tips/images/RunConfigFolder@2x_dark.png b/python/edu/resources/tips/images/RunConfigFolder@2x_dark.png new file mode 100644 index 000000000000..34bdb8694790 Binary files /dev/null and b/python/edu/resources/tips/images/RunConfigFolder@2x_dark.png differ diff --git a/python/edu/resources/tips/images/RunConfigFolder_dark.png b/python/edu/resources/tips/images/RunConfigFolder_dark.png new file mode 100644 index 000000000000..c1c4e99ed1a4 Binary files /dev/null and b/python/edu/resources/tips/images/RunConfigFolder_dark.png differ diff --git a/python/edu/resources/tips/images/SpeedSearchInLiveTemplates.png b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates.png new file mode 100644 index 000000000000..586a47de63de Binary files /dev/null and b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates.png differ diff --git a/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x.png b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x.png new file mode 100644 index 000000000000..ae951e8bf066 Binary files /dev/null and b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x.png differ diff --git a/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x_dark.png b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x_dark.png new file mode 100644 index 000000000000..562e5c0fb3bf Binary files /dev/null and b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates@2x_dark.png differ diff --git a/python/edu/resources/tips/images/SpeedSearchInLiveTemplates_dark.png b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates_dark.png new file mode 100644 index 000000000000..5def14aa5f36 Binary files /dev/null and b/python/edu/resources/tips/images/SpeedSearchInLiveTemplates_dark.png differ diff --git a/python/edu/resources/tips/images/add_remote_interpreter.png b/python/edu/resources/tips/images/add_remote_interpreter.png new file mode 100644 index 000000000000..d9370e4468fb Binary files /dev/null and b/python/edu/resources/tips/images/add_remote_interpreter.png differ diff --git a/python/edu/resources/tips/images/add_remote_interpreter@2x.png b/python/edu/resources/tips/images/add_remote_interpreter@2x.png new file mode 100644 index 000000000000..01712503c0ac Binary files /dev/null and b/python/edu/resources/tips/images/add_remote_interpreter@2x.png differ diff --git a/python/edu/resources/tips/images/add_remote_interpreter@2x_dark.png b/python/edu/resources/tips/images/add_remote_interpreter@2x_dark.png new file mode 100644 index 000000000000..f5758134e8cb Binary files /dev/null and b/python/edu/resources/tips/images/add_remote_interpreter@2x_dark.png differ diff --git a/python/edu/resources/tips/images/add_remote_interpreter_dark.png b/python/edu/resources/tips/images/add_remote_interpreter_dark.png new file mode 100644 index 000000000000..81177f5dd4d6 Binary files /dev/null and b/python/edu/resources/tips/images/add_remote_interpreter_dark.png differ diff --git a/python/edu/resources/tips/images/annotationShowDiff.png b/python/edu/resources/tips/images/annotationShowDiff.png new file mode 100644 index 000000000000..f31b70798265 Binary files /dev/null and b/python/edu/resources/tips/images/annotationShowDiff.png differ diff --git a/python/edu/resources/tips/images/annotationShowDiff@2x.png b/python/edu/resources/tips/images/annotationShowDiff@2x.png new file mode 100644 index 000000000000..22cd9dc11b73 Binary files /dev/null and b/python/edu/resources/tips/images/annotationShowDiff@2x.png differ diff --git a/python/edu/resources/tips/images/annotationShowDiff@2x_dark.png b/python/edu/resources/tips/images/annotationShowDiff@2x_dark.png new file mode 100644 index 000000000000..ebe7bd7d8702 Binary files /dev/null and b/python/edu/resources/tips/images/annotationShowDiff@2x_dark.png differ diff --git a/python/edu/resources/tips/images/annotationShowDiff_dark.png b/python/edu/resources/tips/images/annotationShowDiff_dark.png new file mode 100644 index 000000000000..f91539d14c9f Binary files /dev/null and b/python/edu/resources/tips/images/annotationShowDiff_dark.png differ diff --git a/python/edu/resources/tips/images/breakpoint_speedmenu.png b/python/edu/resources/tips/images/breakpoint_speedmenu.png new file mode 100644 index 000000000000..51c8cdedf4ef Binary files /dev/null and b/python/edu/resources/tips/images/breakpoint_speedmenu.png differ diff --git a/python/edu/resources/tips/images/breakpoint_speedmenu@2x.png b/python/edu/resources/tips/images/breakpoint_speedmenu@2x.png new file mode 100644 index 000000000000..cb0eb1b1bec2 Binary files /dev/null and b/python/edu/resources/tips/images/breakpoint_speedmenu@2x.png differ diff --git a/python/edu/resources/tips/images/breakpoint_speedmenu@2x_dark.png b/python/edu/resources/tips/images/breakpoint_speedmenu@2x_dark.png new file mode 100644 index 000000000000..c384649ddc14 Binary files /dev/null and b/python/edu/resources/tips/images/breakpoint_speedmenu@2x_dark.png differ diff --git a/python/edu/resources/tips/images/breakpoint_speedmenu@_dark.png b/python/edu/resources/tips/images/breakpoint_speedmenu@_dark.png new file mode 100644 index 000000000000..f51e9a5c1ecf Binary files /dev/null and b/python/edu/resources/tips/images/breakpoint_speedmenu@_dark.png differ diff --git a/python/edu/resources/tips/images/browse_remote_hosts.png b/python/edu/resources/tips/images/browse_remote_hosts.png new file mode 100644 index 000000000000..fc79b19fe0e3 Binary files /dev/null and b/python/edu/resources/tips/images/browse_remote_hosts.png differ diff --git a/python/edu/resources/tips/images/builtInServer.png b/python/edu/resources/tips/images/builtInServer.png new file mode 100644 index 000000000000..068f8228cad4 Binary files /dev/null and b/python/edu/resources/tips/images/builtInServer.png differ diff --git a/python/edu/resources/tips/images/builtInServer@2x.png b/python/edu/resources/tips/images/builtInServer@2x.png new file mode 100644 index 000000000000..09b46ff0b969 Binary files /dev/null and b/python/edu/resources/tips/images/builtInServer@2x.png differ diff --git a/python/edu/resources/tips/images/builtInServer@2x_dark.png b/python/edu/resources/tips/images/builtInServer@2x_dark.png new file mode 100644 index 000000000000..215fd3e55f1d Binary files /dev/null and b/python/edu/resources/tips/images/builtInServer@2x_dark.png differ diff --git a/python/edu/resources/tips/images/builtInServer@_dark.png b/python/edu/resources/tips/images/builtInServer@_dark.png new file mode 100644 index 000000000000..4e3d5a403df4 Binary files /dev/null and b/python/edu/resources/tips/images/builtInServer@_dark.png differ diff --git a/python/edu/resources/tips/images/bullet.png b/python/edu/resources/tips/images/bullet.png new file mode 100644 index 000000000000..bc9f6a70cbde Binary files /dev/null and b/python/edu/resources/tips/images/bullet.png differ diff --git a/python/edu/resources/tips/images/camel_completion.png b/python/edu/resources/tips/images/camel_completion.png new file mode 100644 index 000000000000..45c166b31404 Binary files /dev/null and b/python/edu/resources/tips/images/camel_completion.png differ diff --git a/python/edu/resources/tips/images/camel_completion@2x.png b/python/edu/resources/tips/images/camel_completion@2x.png new file mode 100644 index 000000000000..55fb7a737d37 Binary files /dev/null and b/python/edu/resources/tips/images/camel_completion@2x.png differ diff --git a/python/edu/resources/tips/images/camel_completion@2x_dark.png b/python/edu/resources/tips/images/camel_completion@2x_dark.png new file mode 100644 index 000000000000..1c9f53aa8521 Binary files /dev/null and b/python/edu/resources/tips/images/camel_completion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/camel_completion_dark.png b/python/edu/resources/tips/images/camel_completion_dark.png new file mode 100644 index 000000000000..d4ea6e880fbb Binary files /dev/null and b/python/edu/resources/tips/images/camel_completion_dark.png differ diff --git a/python/edu/resources/tips/images/camel_goto.png b/python/edu/resources/tips/images/camel_goto.png new file mode 100644 index 000000000000..28405e5da141 Binary files /dev/null and b/python/edu/resources/tips/images/camel_goto.png differ diff --git a/python/edu/resources/tips/images/camel_goto@2x.png b/python/edu/resources/tips/images/camel_goto@2x.png new file mode 100644 index 000000000000..31f2be46dbd6 Binary files /dev/null and b/python/edu/resources/tips/images/camel_goto@2x.png differ diff --git a/python/edu/resources/tips/images/camel_goto@2x_dark.png b/python/edu/resources/tips/images/camel_goto@2x_dark.png new file mode 100644 index 000000000000..3ed950fa449b Binary files /dev/null and b/python/edu/resources/tips/images/camel_goto@2x_dark.png differ diff --git a/python/edu/resources/tips/images/camel_goto_dark.png b/python/edu/resources/tips/images/camel_goto_dark.png new file mode 100644 index 000000000000..0871187f8043 Binary files /dev/null and b/python/edu/resources/tips/images/camel_goto_dark.png differ diff --git a/python/edu/resources/tips/images/changeLookupSorting.png b/python/edu/resources/tips/images/changeLookupSorting.png new file mode 100644 index 000000000000..63155a3eebc7 Binary files /dev/null and b/python/edu/resources/tips/images/changeLookupSorting.png differ diff --git a/python/edu/resources/tips/images/changeLookupSorting@2x.png b/python/edu/resources/tips/images/changeLookupSorting@2x.png new file mode 100644 index 000000000000..5fd6b02d25f0 Binary files /dev/null and b/python/edu/resources/tips/images/changeLookupSorting@2x.png differ diff --git a/python/edu/resources/tips/images/changeLookupSorting@2x_dark.png b/python/edu/resources/tips/images/changeLookupSorting@2x_dark.png new file mode 100644 index 000000000000..e87e55ee1579 Binary files /dev/null and b/python/edu/resources/tips/images/changeLookupSorting@2x_dark.png differ diff --git a/python/edu/resources/tips/images/changeLookupSorting_dark.png b/python/edu/resources/tips/images/changeLookupSorting_dark.png new file mode 100644 index 000000000000..4e7f0df5a4c8 Binary files /dev/null and b/python/edu/resources/tips/images/changeLookupSorting_dark.png differ diff --git a/python/edu/resources/tips/images/checkRegExp.png b/python/edu/resources/tips/images/checkRegExp.png new file mode 100644 index 000000000000..8d74fbe8716b Binary files /dev/null and b/python/edu/resources/tips/images/checkRegExp.png differ diff --git a/python/edu/resources/tips/images/checkRegExp@2x.png b/python/edu/resources/tips/images/checkRegExp@2x.png new file mode 100644 index 000000000000..2a20810d1f9f Binary files /dev/null and b/python/edu/resources/tips/images/checkRegExp@2x.png differ diff --git a/python/edu/resources/tips/images/checkRegExp@2x_dark.png b/python/edu/resources/tips/images/checkRegExp@2x_dark.png new file mode 100644 index 000000000000..26dcf18e1628 Binary files /dev/null and b/python/edu/resources/tips/images/checkRegExp@2x_dark.png differ diff --git a/python/edu/resources/tips/images/checkRegExp_dark.png b/python/edu/resources/tips/images/checkRegExp_dark.png new file mode 100644 index 000000000000..909fc3d43a75 Binary files /dev/null and b/python/edu/resources/tips/images/checkRegExp_dark.png differ diff --git a/python/edu/resources/tips/images/class_name_completion.png b/python/edu/resources/tips/images/class_name_completion.png new file mode 100644 index 000000000000..5c517e0de148 Binary files /dev/null and b/python/edu/resources/tips/images/class_name_completion.png differ diff --git a/python/edu/resources/tips/images/class_name_completion@2x.png b/python/edu/resources/tips/images/class_name_completion@2x.png new file mode 100644 index 000000000000..394a97748df3 Binary files /dev/null and b/python/edu/resources/tips/images/class_name_completion@2x.png differ diff --git a/python/edu/resources/tips/images/class_name_completion@2x_dark.png b/python/edu/resources/tips/images/class_name_completion@2x_dark.png new file mode 100644 index 000000000000..e6bbe34db2b0 Binary files /dev/null and b/python/edu/resources/tips/images/class_name_completion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/class_name_completion_dark.png b/python/edu/resources/tips/images/class_name_completion_dark.png new file mode 100644 index 000000000000..6f8793338c64 Binary files /dev/null and b/python/edu/resources/tips/images/class_name_completion_dark.png differ diff --git a/python/edu/resources/tips/images/close1.png b/python/edu/resources/tips/images/close1.png new file mode 100644 index 000000000000..c09b94d4e608 Binary files /dev/null and b/python/edu/resources/tips/images/close1.png differ diff --git a/python/edu/resources/tips/images/close_others.png b/python/edu/resources/tips/images/close_others.png new file mode 100644 index 000000000000..9c860503f631 Binary files /dev/null and b/python/edu/resources/tips/images/close_others.png differ diff --git a/python/edu/resources/tips/images/close_others@2x.png b/python/edu/resources/tips/images/close_others@2x.png new file mode 100644 index 000000000000..2b1654bdb890 Binary files /dev/null and b/python/edu/resources/tips/images/close_others@2x.png differ diff --git a/python/edu/resources/tips/images/close_others@2x_dark.png b/python/edu/resources/tips/images/close_others@2x_dark.png new file mode 100644 index 000000000000..f4a8ecebbb59 Binary files /dev/null and b/python/edu/resources/tips/images/close_others@2x_dark.png differ diff --git a/python/edu/resources/tips/images/close_others_dark.png b/python/edu/resources/tips/images/close_others_dark.png new file mode 100644 index 000000000000..903575f4c5de Binary files /dev/null and b/python/edu/resources/tips/images/close_others_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion.png b/python/edu/resources/tips/images/code_completion.png new file mode 100644 index 000000000000..cd51006c5dad Binary files /dev/null and b/python/edu/resources/tips/images/code_completion.png differ diff --git a/python/edu/resources/tips/images/code_completion@2x.png b/python/edu/resources/tips/images/code_completion@2x.png new file mode 100644 index 000000000000..933f30e2939b Binary files /dev/null and b/python/edu/resources/tips/images/code_completion@2x.png differ diff --git a/python/edu/resources/tips/images/code_completion@2x_dark.png b/python/edu/resources/tips/images/code_completion@2x_dark.png new file mode 100644 index 000000000000..c1c078ec50cb Binary files /dev/null and b/python/edu/resources/tips/images/code_completion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion_dark.png b/python/edu/resources/tips/images/code_completion_dark.png new file mode 100644 index 000000000000..e932b9a4d9b8 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion_middle.png b/python/edu/resources/tips/images/code_completion_middle.png new file mode 100644 index 000000000000..7dd4008426c1 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_middle.png differ diff --git a/python/edu/resources/tips/images/code_completion_middle@2x.png b/python/edu/resources/tips/images/code_completion_middle@2x.png new file mode 100644 index 000000000000..4df16b9eb020 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_middle@2x.png differ diff --git a/python/edu/resources/tips/images/code_completion_middle@2x_dark.png b/python/edu/resources/tips/images/code_completion_middle@2x_dark.png new file mode 100644 index 000000000000..2a72b63ef76e Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_middle@2x_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion_middle_dark.png b/python/edu/resources/tips/images/code_completion_middle_dark.png new file mode 100644 index 000000000000..392db57c3ff2 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_middle_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion_no_shift.png b/python/edu/resources/tips/images/code_completion_no_shift.png new file mode 100644 index 000000000000..0907cb0d9096 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_no_shift.png differ diff --git a/python/edu/resources/tips/images/code_completion_no_shift@2x.png b/python/edu/resources/tips/images/code_completion_no_shift@2x.png new file mode 100644 index 000000000000..7680b7c895d8 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_no_shift@2x.png differ diff --git a/python/edu/resources/tips/images/code_completion_no_shift@2x_dark.png b/python/edu/resources/tips/images/code_completion_no_shift@2x_dark.png new file mode 100644 index 000000000000..e1d5fa996600 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_no_shift@2x_dark.png differ diff --git a/python/edu/resources/tips/images/code_completion_no_shift_dark.png b/python/edu/resources/tips/images/code_completion_no_shift_dark.png new file mode 100644 index 000000000000..3394c0e1b272 Binary files /dev/null and b/python/edu/resources/tips/images/code_completion_no_shift_dark.png differ diff --git a/python/edu/resources/tips/images/coloredFiles.png b/python/edu/resources/tips/images/coloredFiles.png new file mode 100644 index 000000000000..b68571305ded Binary files /dev/null and b/python/edu/resources/tips/images/coloredFiles.png differ diff --git a/python/edu/resources/tips/images/coloredFiles@2x.png b/python/edu/resources/tips/images/coloredFiles@2x.png new file mode 100644 index 000000000000..f26012847bdf Binary files /dev/null and b/python/edu/resources/tips/images/coloredFiles@2x.png differ diff --git a/python/edu/resources/tips/images/coloredFiles@2x_dark.png b/python/edu/resources/tips/images/coloredFiles@2x_dark.png new file mode 100644 index 000000000000..3691b6d759e7 Binary files /dev/null and b/python/edu/resources/tips/images/coloredFiles@2x_dark.png differ diff --git a/python/edu/resources/tips/images/coloredFiles_dark.png b/python/edu/resources/tips/images/coloredFiles_dark.png new file mode 100644 index 000000000000..45b3d008288f Binary files /dev/null and b/python/edu/resources/tips/images/coloredFiles_dark.png differ diff --git a/python/edu/resources/tips/images/columnSelection.png b/python/edu/resources/tips/images/columnSelection.png new file mode 100644 index 000000000000..2e3b62c77199 Binary files /dev/null and b/python/edu/resources/tips/images/columnSelection.png differ diff --git a/python/edu/resources/tips/images/columnSelection@2x.png b/python/edu/resources/tips/images/columnSelection@2x.png new file mode 100644 index 000000000000..56fbe0c8bab6 Binary files /dev/null and b/python/edu/resources/tips/images/columnSelection@2x.png differ diff --git a/python/edu/resources/tips/images/columnSelection@2x_dark.png b/python/edu/resources/tips/images/columnSelection@2x_dark.png new file mode 100644 index 000000000000..0e8c967186ef Binary files /dev/null and b/python/edu/resources/tips/images/columnSelection@2x_dark.png differ diff --git a/python/edu/resources/tips/images/columnSelection_dark.png b/python/edu/resources/tips/images/columnSelection_dark.png new file mode 100644 index 000000000000..a676d7e74311 Binary files /dev/null and b/python/edu/resources/tips/images/columnSelection_dark.png differ diff --git a/python/edu/resources/tips/images/completion_in_html.png b/python/edu/resources/tips/images/completion_in_html.png new file mode 100644 index 000000000000..9c20bb436faf Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html.png differ diff --git a/python/edu/resources/tips/images/completion_in_html2.png b/python/edu/resources/tips/images/completion_in_html2.png new file mode 100644 index 000000000000..b51fb2c76303 Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html2.png differ diff --git a/python/edu/resources/tips/images/completion_in_html2@2x.png b/python/edu/resources/tips/images/completion_in_html2@2x.png new file mode 100644 index 000000000000..748e6678fb80 Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html2@2x.png differ diff --git a/python/edu/resources/tips/images/completion_in_html2@2x_dark.png b/python/edu/resources/tips/images/completion_in_html2@2x_dark.png new file mode 100644 index 000000000000..cb619b32d763 Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html2@2x_dark.png differ diff --git a/python/edu/resources/tips/images/completion_in_html2_dark.png b/python/edu/resources/tips/images/completion_in_html2_dark.png new file mode 100644 index 000000000000..306428233ccf Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html2_dark.png differ diff --git a/python/edu/resources/tips/images/completion_in_html@2x.png b/python/edu/resources/tips/images/completion_in_html@2x.png new file mode 100644 index 000000000000..6a62d727ee18 Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html@2x.png differ diff --git a/python/edu/resources/tips/images/completion_in_html@2x_dark.png b/python/edu/resources/tips/images/completion_in_html@2x_dark.png new file mode 100644 index 000000000000..ffbf46694702 Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html@2x_dark.png differ diff --git a/python/edu/resources/tips/images/completion_in_html_dark.png b/python/edu/resources/tips/images/completion_in_html_dark.png new file mode 100644 index 000000000000..f845b3ca343e Binary files /dev/null and b/python/edu/resources/tips/images/completion_in_html_dark.png differ diff --git a/python/edu/resources/tips/images/cssColor.png b/python/edu/resources/tips/images/cssColor.png new file mode 100644 index 000000000000..a6bdd6e6539a Binary files /dev/null and b/python/edu/resources/tips/images/cssColor.png differ diff --git a/python/edu/resources/tips/images/cssColor@2x.png b/python/edu/resources/tips/images/cssColor@2x.png new file mode 100644 index 000000000000..e0f272336d87 Binary files /dev/null and b/python/edu/resources/tips/images/cssColor@2x.png differ diff --git a/python/edu/resources/tips/images/cssColor@2x_dark.png b/python/edu/resources/tips/images/cssColor@2x_dark.png new file mode 100644 index 000000000000..8ff841ee6518 Binary files /dev/null and b/python/edu/resources/tips/images/cssColor@2x_dark.png differ diff --git a/python/edu/resources/tips/images/cssColor_dark.png b/python/edu/resources/tips/images/cssColor_dark.png new file mode 100644 index 000000000000..e37bb9a94361 Binary files /dev/null and b/python/edu/resources/tips/images/cssColor_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_click.png b/python/edu/resources/tips/images/ctrl_click.png new file mode 100644 index 000000000000..fd35a0329fea Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_click.png differ diff --git a/python/edu/resources/tips/images/ctrl_click@2x.png b/python/edu/resources/tips/images/ctrl_click@2x.png new file mode 100644 index 000000000000..7ce99f948362 Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_click@2x.png differ diff --git a/python/edu/resources/tips/images/ctrl_click@2x_dark.png b/python/edu/resources/tips/images/ctrl_click@2x_dark.png new file mode 100644 index 000000000000..09f5b045dd53 Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_click@2x_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_click_dark.png b/python/edu/resources/tips/images/ctrl_click_dark.png new file mode 100644 index 000000000000..dc331f7dd952 Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_click_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_i.png b/python/edu/resources/tips/images/ctrl_shift_i.png new file mode 100644 index 000000000000..fbb8786d0a8d Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_i.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_i@2x.png b/python/edu/resources/tips/images/ctrl_shift_i@2x.png new file mode 100644 index 000000000000..6bb2978dd797 Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_i@2x.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_i@2x_dark.png b/python/edu/resources/tips/images/ctrl_shift_i@2x_dark.png new file mode 100644 index 000000000000..3e29df03f92b Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_i@2x_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_i_dark.png b/python/edu/resources/tips/images/ctrl_shift_i_dark.png new file mode 100644 index 000000000000..61201ff0d5da Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_i_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_in_lookup.png b/python/edu/resources/tips/images/ctrl_shift_in_lookup.png new file mode 100644 index 000000000000..073b31b4b15c Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_in_lookup.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x.png b/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x.png new file mode 100644 index 000000000000..ee49d459fcab Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x_dark.png b/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x_dark.png new file mode 100644 index 000000000000..5730d9058dc9 Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_in_lookup@2x_dark.png differ diff --git a/python/edu/resources/tips/images/ctrl_shift_in_lookup_dark.png b/python/edu/resources/tips/images/ctrl_shift_in_lookup_dark.png new file mode 100644 index 000000000000..2ab9f9f93ebe Binary files /dev/null and b/python/edu/resources/tips/images/ctrl_shift_in_lookup_dark.png differ diff --git a/python/edu/resources/tips/images/default_template_language.png b/python/edu/resources/tips/images/default_template_language.png new file mode 100644 index 000000000000..9e46fb11450f Binary files /dev/null and b/python/edu/resources/tips/images/default_template_language.png differ diff --git a/python/edu/resources/tips/images/default_template_language@2x.png b/python/edu/resources/tips/images/default_template_language@2x.png new file mode 100644 index 000000000000..dddd008123e7 Binary files /dev/null and b/python/edu/resources/tips/images/default_template_language@2x.png differ diff --git a/python/edu/resources/tips/images/default_template_language@2x_dark.png b/python/edu/resources/tips/images/default_template_language@2x_dark.png new file mode 100644 index 000000000000..fa48561f94ec Binary files /dev/null and b/python/edu/resources/tips/images/default_template_language@2x_dark.png differ diff --git a/python/edu/resources/tips/images/default_template_language_dark.png b/python/edu/resources/tips/images/default_template_language_dark.png new file mode 100644 index 000000000000..486b30703799 Binary files /dev/null and b/python/edu/resources/tips/images/default_template_language_dark.png differ diff --git a/python/edu/resources/tips/images/deployment.png b/python/edu/resources/tips/images/deployment.png new file mode 100644 index 000000000000..f104afa208b5 Binary files /dev/null and b/python/edu/resources/tips/images/deployment.png differ diff --git a/python/edu/resources/tips/images/deployment@2x.png b/python/edu/resources/tips/images/deployment@2x.png new file mode 100644 index 000000000000..af593c25b0e0 Binary files /dev/null and b/python/edu/resources/tips/images/deployment@2x.png differ diff --git a/python/edu/resources/tips/images/deployment@2x_dark.png b/python/edu/resources/tips/images/deployment@2x_dark.png new file mode 100644 index 000000000000..ec478c090d29 Binary files /dev/null and b/python/edu/resources/tips/images/deployment@2x_dark.png differ diff --git a/python/edu/resources/tips/images/deployment_dark.png b/python/edu/resources/tips/images/deployment_dark.png new file mode 100644 index 000000000000..6ed4686a0f70 Binary files /dev/null and b/python/edu/resources/tips/images/deployment_dark.png differ diff --git a/python/edu/resources/tips/images/dragToOpen.png b/python/edu/resources/tips/images/dragToOpen.png new file mode 100644 index 000000000000..30f564789e09 Binary files /dev/null and b/python/edu/resources/tips/images/dragToOpen.png differ diff --git a/python/edu/resources/tips/images/dragToOpen@2x.png b/python/edu/resources/tips/images/dragToOpen@2x.png new file mode 100644 index 000000000000..039e85b28a86 Binary files /dev/null and b/python/edu/resources/tips/images/dragToOpen@2x.png differ diff --git a/python/edu/resources/tips/images/dragToOpen@2x_dark.png b/python/edu/resources/tips/images/dragToOpen@2x_dark.png new file mode 100644 index 000000000000..55e3a479e795 Binary files /dev/null and b/python/edu/resources/tips/images/dragToOpen@2x_dark.png differ diff --git a/python/edu/resources/tips/images/dragToOpen_dark.png b/python/edu/resources/tips/images/dragToOpen_dark.png new file mode 100644 index 000000000000..666446e5e761 Binary files /dev/null and b/python/edu/resources/tips/images/dragToOpen_dark.png differ diff --git a/python/edu/resources/tips/images/editregexp.png b/python/edu/resources/tips/images/editregexp.png new file mode 100644 index 000000000000..ccb059c5932a Binary files /dev/null and b/python/edu/resources/tips/images/editregexp.png differ diff --git a/python/edu/resources/tips/images/editregexp@2x.png b/python/edu/resources/tips/images/editregexp@2x.png new file mode 100644 index 000000000000..1d80b7ad272e Binary files /dev/null and b/python/edu/resources/tips/images/editregexp@2x.png differ diff --git a/python/edu/resources/tips/images/editregexp@2x_dark.png b/python/edu/resources/tips/images/editregexp@2x_dark.png new file mode 100644 index 000000000000..b2fb91911468 Binary files /dev/null and b/python/edu/resources/tips/images/editregexp@2x_dark.png differ diff --git a/python/edu/resources/tips/images/editregexp_dark.png b/python/edu/resources/tips/images/editregexp_dark.png new file mode 100644 index 000000000000..37a44fc8bf72 Binary files /dev/null and b/python/edu/resources/tips/images/editregexp_dark.png differ diff --git a/python/edu/resources/tips/images/emmet.png b/python/edu/resources/tips/images/emmet.png new file mode 100644 index 000000000000..6c616f5376f5 Binary files /dev/null and b/python/edu/resources/tips/images/emmet.png differ diff --git a/python/edu/resources/tips/images/emmet@2x.png b/python/edu/resources/tips/images/emmet@2x.png new file mode 100644 index 000000000000..2c5d963fa8b9 Binary files /dev/null and b/python/edu/resources/tips/images/emmet@2x.png differ diff --git a/python/edu/resources/tips/images/emmet@2x_dark.png b/python/edu/resources/tips/images/emmet@2x_dark.png new file mode 100644 index 000000000000..37f6952953d8 Binary files /dev/null and b/python/edu/resources/tips/images/emmet@2x_dark.png differ diff --git a/python/edu/resources/tips/images/emmet_dark.png b/python/edu/resources/tips/images/emmet_dark.png new file mode 100644 index 000000000000..671bcd3aec36 Binary files /dev/null and b/python/edu/resources/tips/images/emmet_dark.png differ diff --git a/python/edu/resources/tips/images/enterDirectory.png b/python/edu/resources/tips/images/enterDirectory.png new file mode 100644 index 000000000000..f5a882e53e6d Binary files /dev/null and b/python/edu/resources/tips/images/enterDirectory.png differ diff --git a/python/edu/resources/tips/images/enterDirectory@2x.png b/python/edu/resources/tips/images/enterDirectory@2x.png new file mode 100644 index 000000000000..bfbadea02f63 Binary files /dev/null and b/python/edu/resources/tips/images/enterDirectory@2x.png differ diff --git a/python/edu/resources/tips/images/enterDirectory@2x_dark.png b/python/edu/resources/tips/images/enterDirectory@2x_dark.png new file mode 100644 index 000000000000..b4e271b043bd Binary files /dev/null and b/python/edu/resources/tips/images/enterDirectory@2x_dark.png differ diff --git a/python/edu/resources/tips/images/enterDirectory_dark.png b/python/edu/resources/tips/images/enterDirectory_dark.png new file mode 100644 index 000000000000..1facfef51c3c Binary files /dev/null and b/python/edu/resources/tips/images/enterDirectory_dark.png differ diff --git a/python/edu/resources/tips/images/extract_variable_1.png b/python/edu/resources/tips/images/extract_variable_1.png new file mode 100644 index 000000000000..60e5d66a66ff Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_1.png differ diff --git a/python/edu/resources/tips/images/extract_variable_1@2x.png b/python/edu/resources/tips/images/extract_variable_1@2x.png new file mode 100644 index 000000000000..b468e5f964af Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_1@2x.png differ diff --git a/python/edu/resources/tips/images/extract_variable_1@2x_dark.png b/python/edu/resources/tips/images/extract_variable_1@2x_dark.png new file mode 100644 index 000000000000..dbc02dbce181 Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_1@2x_dark.png differ diff --git a/python/edu/resources/tips/images/extract_variable_1_dark.png b/python/edu/resources/tips/images/extract_variable_1_dark.png new file mode 100644 index 000000000000..70647667d289 Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_1_dark.png differ diff --git a/python/edu/resources/tips/images/extract_variable_2.png b/python/edu/resources/tips/images/extract_variable_2.png new file mode 100644 index 000000000000..4e3b767db005 Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_2.png differ diff --git a/python/edu/resources/tips/images/extract_variable_2@2x.png b/python/edu/resources/tips/images/extract_variable_2@2x.png new file mode 100644 index 000000000000..49cdf5237c0f Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_2@2x.png differ diff --git a/python/edu/resources/tips/images/extract_variable_2@2x_dark.png b/python/edu/resources/tips/images/extract_variable_2@2x_dark.png new file mode 100644 index 000000000000..120e9a5ace28 Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_2@2x_dark.png differ diff --git a/python/edu/resources/tips/images/extract_variable_2_dark.png b/python/edu/resources/tips/images/extract_variable_2_dark.png new file mode 100644 index 000000000000..07e67b75cd86 Binary files /dev/null and b/python/edu/resources/tips/images/extract_variable_2_dark.png differ diff --git a/python/edu/resources/tips/images/gotoFileLineNumber.png b/python/edu/resources/tips/images/gotoFileLineNumber.png new file mode 100644 index 000000000000..3d4f72a847cc Binary files /dev/null and b/python/edu/resources/tips/images/gotoFileLineNumber.png differ diff --git a/python/edu/resources/tips/images/gotoFileLineNumber@2x.png b/python/edu/resources/tips/images/gotoFileLineNumber@2x.png new file mode 100644 index 000000000000..5727edb925e0 Binary files /dev/null and b/python/edu/resources/tips/images/gotoFileLineNumber@2x.png differ diff --git a/python/edu/resources/tips/images/gotoFileLineNumber@2x_dark.png b/python/edu/resources/tips/images/gotoFileLineNumber@2x_dark.png new file mode 100644 index 000000000000..5bd7da5a480e Binary files /dev/null and b/python/edu/resources/tips/images/gotoFileLineNumber@2x_dark.png differ diff --git a/python/edu/resources/tips/images/gotoFileLineNumber_dark.png b/python/edu/resources/tips/images/gotoFileLineNumber_dark.png new file mode 100644 index 000000000000..52c9137e1205 Binary files /dev/null and b/python/edu/resources/tips/images/gotoFileLineNumber_dark.png differ diff --git a/python/edu/resources/tips/images/goto_class.png b/python/edu/resources/tips/images/goto_class.png new file mode 100644 index 000000000000..8eb339e8ff8d Binary files /dev/null and b/python/edu/resources/tips/images/goto_class.png differ diff --git a/python/edu/resources/tips/images/goto_class@2x.png b/python/edu/resources/tips/images/goto_class@2x.png new file mode 100644 index 000000000000..e7fd228b3e25 Binary files /dev/null and b/python/edu/resources/tips/images/goto_class@2x.png differ diff --git a/python/edu/resources/tips/images/goto_class@2x_dark.png b/python/edu/resources/tips/images/goto_class@2x_dark.png new file mode 100644 index 000000000000..5c524ba1e61e Binary files /dev/null and b/python/edu/resources/tips/images/goto_class@2x_dark.png differ diff --git a/python/edu/resources/tips/images/goto_class_dark.png b/python/edu/resources/tips/images/goto_class_dark.png new file mode 100644 index 000000000000..6a9b461d86f7 Binary files /dev/null and b/python/edu/resources/tips/images/goto_class_dark.png differ diff --git a/python/edu/resources/tips/images/goto_symbol.png b/python/edu/resources/tips/images/goto_symbol.png new file mode 100644 index 000000000000..d10fdc33878f Binary files /dev/null and b/python/edu/resources/tips/images/goto_symbol.png differ diff --git a/python/edu/resources/tips/images/goto_symbol@2x.png b/python/edu/resources/tips/images/goto_symbol@2x.png new file mode 100644 index 000000000000..86bae1245f3c Binary files /dev/null and b/python/edu/resources/tips/images/goto_symbol@2x.png differ diff --git a/python/edu/resources/tips/images/goto_symbol@2x_dark.png b/python/edu/resources/tips/images/goto_symbol@2x_dark.png new file mode 100644 index 000000000000..03bf40eeff8b Binary files /dev/null and b/python/edu/resources/tips/images/goto_symbol@2x_dark.png differ diff --git a/python/edu/resources/tips/images/goto_symbol_dark.png b/python/edu/resources/tips/images/goto_symbol_dark.png new file mode 100644 index 000000000000..201ec6956816 Binary files /dev/null and b/python/edu/resources/tips/images/goto_symbol_dark.png differ diff --git a/python/edu/resources/tips/images/goto_template_icon.png b/python/edu/resources/tips/images/goto_template_icon.png new file mode 100644 index 000000000000..9a6f4f26cf19 Binary files /dev/null and b/python/edu/resources/tips/images/goto_template_icon.png differ diff --git a/python/edu/resources/tips/images/goto_template_icon@2x.png b/python/edu/resources/tips/images/goto_template_icon@2x.png new file mode 100644 index 000000000000..28f1ef8593c0 Binary files /dev/null and b/python/edu/resources/tips/images/goto_template_icon@2x.png differ diff --git a/python/edu/resources/tips/images/goto_template_icon@2x_dark.png b/python/edu/resources/tips/images/goto_template_icon@2x_dark.png new file mode 100644 index 000000000000..b9f13e1db3ce Binary files /dev/null and b/python/edu/resources/tips/images/goto_template_icon@2x_dark.png differ diff --git a/python/edu/resources/tips/images/goto_template_icon_dark.png b/python/edu/resources/tips/images/goto_template_icon_dark.png new file mode 100644 index 000000000000..5e91cc9e8b48 Binary files /dev/null and b/python/edu/resources/tips/images/goto_template_icon_dark.png differ diff --git a/python/edu/resources/tips/images/goto_view.png b/python/edu/resources/tips/images/goto_view.png new file mode 100644 index 000000000000..66fe57144daa Binary files /dev/null and b/python/edu/resources/tips/images/goto_view.png differ diff --git a/python/edu/resources/tips/images/goto_view@2x.png b/python/edu/resources/tips/images/goto_view@2x.png new file mode 100644 index 000000000000..8d7d74b867f5 Binary files /dev/null and b/python/edu/resources/tips/images/goto_view@2x.png differ diff --git a/python/edu/resources/tips/images/goto_view@2x_dark.png b/python/edu/resources/tips/images/goto_view@2x_dark.png new file mode 100644 index 000000000000..11d399b65041 Binary files /dev/null and b/python/edu/resources/tips/images/goto_view@2x_dark.png differ diff --git a/python/edu/resources/tips/images/goto_view_dark.png b/python/edu/resources/tips/images/goto_view_dark.png new file mode 100644 index 000000000000..df77bd4b745f Binary files /dev/null and b/python/edu/resources/tips/images/goto_view_dark.png differ diff --git a/python/edu/resources/tips/images/goto_view_icon.png b/python/edu/resources/tips/images/goto_view_icon.png new file mode 100644 index 000000000000..4f7dab95b0aa Binary files /dev/null and b/python/edu/resources/tips/images/goto_view_icon.png differ diff --git a/python/edu/resources/tips/images/goto_view_icon@2x.png b/python/edu/resources/tips/images/goto_view_icon@2x.png new file mode 100644 index 000000000000..579d967dd721 Binary files /dev/null and b/python/edu/resources/tips/images/goto_view_icon@2x.png differ diff --git a/python/edu/resources/tips/images/goto_view_icon@2x_dark.png b/python/edu/resources/tips/images/goto_view_icon@2x_dark.png new file mode 100644 index 000000000000..9a9c9255aeb1 Binary files /dev/null and b/python/edu/resources/tips/images/goto_view_icon@2x_dark.png differ diff --git a/python/edu/resources/tips/images/goto_view_icon_dark.png b/python/edu/resources/tips/images/goto_view_icon_dark.png new file mode 100644 index 000000000000..dd6a508261ed Binary files /dev/null and b/python/edu/resources/tips/images/goto_view_icon_dark.png differ diff --git a/python/edu/resources/tips/images/hierarchy_browser.png b/python/edu/resources/tips/images/hierarchy_browser.png new file mode 100644 index 000000000000..05bbb92f486a Binary files /dev/null and b/python/edu/resources/tips/images/hierarchy_browser.png differ diff --git a/python/edu/resources/tips/images/hierarchy_browser@2x.png b/python/edu/resources/tips/images/hierarchy_browser@2x.png new file mode 100644 index 000000000000..a2f4cd29410e Binary files /dev/null and b/python/edu/resources/tips/images/hierarchy_browser@2x.png differ diff --git a/python/edu/resources/tips/images/hierarchy_browser@2x_dark.png b/python/edu/resources/tips/images/hierarchy_browser@2x_dark.png new file mode 100644 index 000000000000..4b120e8f7ff6 Binary files /dev/null and b/python/edu/resources/tips/images/hierarchy_browser@2x_dark.png differ diff --git a/python/edu/resources/tips/images/hierarchy_browser_dark.png b/python/edu/resources/tips/images/hierarchy_browser_dark.png new file mode 100644 index 000000000000..d52835cbd23f Binary files /dev/null and b/python/edu/resources/tips/images/hierarchy_browser_dark.png differ diff --git a/python/edu/resources/tips/images/image_completion.png b/python/edu/resources/tips/images/image_completion.png new file mode 100644 index 000000000000..56a3599aac4e Binary files /dev/null and b/python/edu/resources/tips/images/image_completion.png differ diff --git a/python/edu/resources/tips/images/image_completion@2x.png b/python/edu/resources/tips/images/image_completion@2x.png new file mode 100644 index 000000000000..2d96d83c224a Binary files /dev/null and b/python/edu/resources/tips/images/image_completion@2x.png differ diff --git a/python/edu/resources/tips/images/image_completion@2x_dark.png b/python/edu/resources/tips/images/image_completion@2x_dark.png new file mode 100644 index 000000000000..99f6e96a7775 Binary files /dev/null and b/python/edu/resources/tips/images/image_completion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/image_completion_dark.png b/python/edu/resources/tips/images/image_completion_dark.png new file mode 100644 index 000000000000..3b396c908758 Binary files /dev/null and b/python/edu/resources/tips/images/image_completion_dark.png differ diff --git a/python/edu/resources/tips/images/image_lookup.png b/python/edu/resources/tips/images/image_lookup.png new file mode 100644 index 000000000000..cdff22d10bee Binary files /dev/null and b/python/edu/resources/tips/images/image_lookup.png differ diff --git a/python/edu/resources/tips/images/image_lookup@2x.png b/python/edu/resources/tips/images/image_lookup@2x.png new file mode 100644 index 000000000000..05075dd8ed47 Binary files /dev/null and b/python/edu/resources/tips/images/image_lookup@2x.png differ diff --git a/python/edu/resources/tips/images/image_lookup@2x_dark.png b/python/edu/resources/tips/images/image_lookup@2x_dark.png new file mode 100644 index 000000000000..6ac2a465fc40 Binary files /dev/null and b/python/edu/resources/tips/images/image_lookup@2x_dark.png differ diff --git a/python/edu/resources/tips/images/image_lookup_dark.png b/python/edu/resources/tips/images/image_lookup_dark.png new file mode 100644 index 000000000000..75af27a9d2e3 Binary files /dev/null and b/python/edu/resources/tips/images/image_lookup_dark.png differ diff --git a/python/edu/resources/tips/images/issueNavigation.png b/python/edu/resources/tips/images/issueNavigation.png new file mode 100644 index 000000000000..1fe942275cae Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation.png differ diff --git a/python/edu/resources/tips/images/issueNavigation1.png b/python/edu/resources/tips/images/issueNavigation1.png new file mode 100644 index 000000000000..bc5c7bb84454 Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation1.png differ diff --git a/python/edu/resources/tips/images/issueNavigation1@2x.png b/python/edu/resources/tips/images/issueNavigation1@2x.png new file mode 100644 index 000000000000..31b4d3f9b114 Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation1@2x.png differ diff --git a/python/edu/resources/tips/images/issueNavigation1@2x_dark.png b/python/edu/resources/tips/images/issueNavigation1@2x_dark.png new file mode 100644 index 000000000000..9a654a24f8f0 Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation1@2x_dark.png differ diff --git a/python/edu/resources/tips/images/issueNavigation1_dark.png b/python/edu/resources/tips/images/issueNavigation1_dark.png new file mode 100644 index 000000000000..fa1cdc666dca Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation1_dark.png differ diff --git a/python/edu/resources/tips/images/issueNavigation@2x.png b/python/edu/resources/tips/images/issueNavigation@2x.png new file mode 100644 index 000000000000..835c9dba3bab Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation@2x.png differ diff --git a/python/edu/resources/tips/images/issueNavigation@2x_dark.png b/python/edu/resources/tips/images/issueNavigation@2x_dark.png new file mode 100644 index 000000000000..47e4270ab066 Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation@2x_dark.png differ diff --git a/python/edu/resources/tips/images/issueNavigation_dark.png b/python/edu/resources/tips/images/issueNavigation_dark.png new file mode 100644 index 000000000000..4085ed8913df Binary files /dev/null and b/python/edu/resources/tips/images/issueNavigation_dark.png differ diff --git a/python/edu/resources/tips/images/jumplist.png b/python/edu/resources/tips/images/jumplist.png new file mode 100644 index 000000000000..6a195bcdadb0 Binary files /dev/null and b/python/edu/resources/tips/images/jumplist.png differ diff --git a/python/edu/resources/tips/images/jumplist@2x.png b/python/edu/resources/tips/images/jumplist@2x.png new file mode 100644 index 000000000000..a3b8d7e182fe Binary files /dev/null and b/python/edu/resources/tips/images/jumplist@2x.png differ diff --git a/python/edu/resources/tips/images/jumplist@2x_dark.png b/python/edu/resources/tips/images/jumplist@2x_dark.png new file mode 100644 index 000000000000..b9b279e38813 Binary files /dev/null and b/python/edu/resources/tips/images/jumplist@2x_dark.png differ diff --git a/python/edu/resources/tips/images/jumplist_dark.png b/python/edu/resources/tips/images/jumplist_dark.png new file mode 100644 index 000000000000..3f0e90659c80 Binary files /dev/null and b/python/edu/resources/tips/images/jumplist_dark.png differ diff --git a/python/edu/resources/tips/images/launch_console_in_debugger.png b/python/edu/resources/tips/images/launch_console_in_debugger.png new file mode 100644 index 000000000000..77250807b2ff Binary files /dev/null and b/python/edu/resources/tips/images/launch_console_in_debugger.png differ diff --git a/python/edu/resources/tips/images/launch_console_in_debugger@2x.png b/python/edu/resources/tips/images/launch_console_in_debugger@2x.png new file mode 100644 index 000000000000..468c49c70e05 Binary files /dev/null and b/python/edu/resources/tips/images/launch_console_in_debugger@2x.png differ diff --git a/python/edu/resources/tips/images/launch_console_in_debugger@2x_dark.png b/python/edu/resources/tips/images/launch_console_in_debugger@2x_dark.png new file mode 100644 index 000000000000..5f5381c8936d Binary files /dev/null and b/python/edu/resources/tips/images/launch_console_in_debugger@2x_dark.png differ diff --git a/python/edu/resources/tips/images/launch_console_in_debugger_dark.png b/python/edu/resources/tips/images/launch_console_in_debugger_dark.png new file mode 100644 index 000000000000..9fa62e0b9bb0 Binary files /dev/null and b/python/edu/resources/tips/images/launch_console_in_debugger_dark.png differ diff --git a/python/edu/resources/tips/images/line_separator.png b/python/edu/resources/tips/images/line_separator.png new file mode 100644 index 000000000000..61d20d18f3d7 Binary files /dev/null and b/python/edu/resources/tips/images/line_separator.png differ diff --git a/python/edu/resources/tips/images/line_separator@2x.png b/python/edu/resources/tips/images/line_separator@2x.png new file mode 100644 index 000000000000..bf67e11e42e8 Binary files /dev/null and b/python/edu/resources/tips/images/line_separator@2x.png differ diff --git a/python/edu/resources/tips/images/line_separator@2x_dark.png b/python/edu/resources/tips/images/line_separator@2x_dark.png new file mode 100644 index 000000000000..eb6f8ea3111f Binary files /dev/null and b/python/edu/resources/tips/images/line_separator@2x_dark.png differ diff --git a/python/edu/resources/tips/images/line_separator_dark.png b/python/edu/resources/tips/images/line_separator_dark.png new file mode 100644 index 000000000000..3d8b1a68ee53 Binary files /dev/null and b/python/edu/resources/tips/images/line_separator_dark.png differ diff --git a/python/edu/resources/tips/images/line_separator_folder.png b/python/edu/resources/tips/images/line_separator_folder.png new file mode 100644 index 000000000000..4ae8dc021f66 Binary files /dev/null and b/python/edu/resources/tips/images/line_separator_folder.png differ diff --git a/python/edu/resources/tips/images/line_separator_folder@2x.png b/python/edu/resources/tips/images/line_separator_folder@2x.png new file mode 100644 index 000000000000..782b58b8ad0d Binary files /dev/null and b/python/edu/resources/tips/images/line_separator_folder@2x.png differ diff --git a/python/edu/resources/tips/images/line_separator_folder@2x_dark.png b/python/edu/resources/tips/images/line_separator_folder@2x_dark.png new file mode 100644 index 000000000000..d8ab14857a9b Binary files /dev/null and b/python/edu/resources/tips/images/line_separator_folder@2x_dark.png differ diff --git a/python/edu/resources/tips/images/line_separator_folder_dark.png b/python/edu/resources/tips/images/line_separator_folder_dark.png new file mode 100644 index 000000000000..c02c201218a2 Binary files /dev/null and b/python/edu/resources/tips/images/line_separator_folder_dark.png differ diff --git a/python/edu/resources/tips/images/live_templates_1.png b/python/edu/resources/tips/images/live_templates_1.png new file mode 100644 index 000000000000..b0fc1051a752 Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_1.png differ diff --git a/python/edu/resources/tips/images/live_templates_1@2x.png b/python/edu/resources/tips/images/live_templates_1@2x.png new file mode 100644 index 000000000000..ec456208d61d Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_1@2x.png differ diff --git a/python/edu/resources/tips/images/live_templates_1@2x_dark.png b/python/edu/resources/tips/images/live_templates_1@2x_dark.png new file mode 100644 index 000000000000..c4dd574ab50e Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_1@2x_dark.png differ diff --git a/python/edu/resources/tips/images/live_templates_1_dark.png b/python/edu/resources/tips/images/live_templates_1_dark.png new file mode 100644 index 000000000000..8e3da85d2b62 Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_1_dark.png differ diff --git a/python/edu/resources/tips/images/live_templates_2.png b/python/edu/resources/tips/images/live_templates_2.png new file mode 100644 index 000000000000..2ed16fb57791 Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_2.png differ diff --git a/python/edu/resources/tips/images/live_templates_2@2x.png b/python/edu/resources/tips/images/live_templates_2@2x.png new file mode 100644 index 000000000000..54e6b059cd03 Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_2@2x.png differ diff --git a/python/edu/resources/tips/images/live_templates_2@2x_dark.png b/python/edu/resources/tips/images/live_templates_2@2x_dark.png new file mode 100644 index 000000000000..89fbb741fc1a Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_2@2x_dark.png differ diff --git a/python/edu/resources/tips/images/live_templates_2_dark.png b/python/edu/resources/tips/images/live_templates_2_dark.png new file mode 100644 index 000000000000..3431fdedf244 Binary files /dev/null and b/python/edu/resources/tips/images/live_templates_2_dark.png differ diff --git a/python/edu/resources/tips/images/lower_left.png b/python/edu/resources/tips/images/lower_left.png new file mode 100644 index 000000000000..771913eec97e Binary files /dev/null and b/python/edu/resources/tips/images/lower_left.png differ diff --git a/python/edu/resources/tips/images/lower_left@2x.png b/python/edu/resources/tips/images/lower_left@2x.png new file mode 100644 index 000000000000..2839f4099299 Binary files /dev/null and b/python/edu/resources/tips/images/lower_left@2x.png differ diff --git a/python/edu/resources/tips/images/lower_left@2x_dark.png b/python/edu/resources/tips/images/lower_left@2x_dark.png new file mode 100644 index 000000000000..2c2a582a1db7 Binary files /dev/null and b/python/edu/resources/tips/images/lower_left@2x_dark.png differ diff --git a/python/edu/resources/tips/images/lower_left_dark.png b/python/edu/resources/tips/images/lower_left_dark.png new file mode 100644 index 000000000000..19996d76492c Binary files /dev/null and b/python/edu/resources/tips/images/lower_left_dark.png differ diff --git a/python/edu/resources/tips/images/managepy.png b/python/edu/resources/tips/images/managepy.png new file mode 100644 index 000000000000..6212233b8f49 Binary files /dev/null and b/python/edu/resources/tips/images/managepy.png differ diff --git a/python/edu/resources/tips/images/managepy@2x.png b/python/edu/resources/tips/images/managepy@2x.png new file mode 100644 index 000000000000..c29d6b71ef79 Binary files /dev/null and b/python/edu/resources/tips/images/managepy@2x.png differ diff --git a/python/edu/resources/tips/images/managepy@2x_dark.png b/python/edu/resources/tips/images/managepy@2x_dark.png new file mode 100644 index 000000000000..d87785601ced Binary files /dev/null and b/python/edu/resources/tips/images/managepy@2x_dark.png differ diff --git a/python/edu/resources/tips/images/managepy_dark.png b/python/edu/resources/tips/images/managepy_dark.png new file mode 100644 index 000000000000..9228a0d1c056 Binary files /dev/null and b/python/edu/resources/tips/images/managepy_dark.png differ diff --git a/python/edu/resources/tips/images/method_separator.png b/python/edu/resources/tips/images/method_separator.png new file mode 100644 index 000000000000..e458b8246566 Binary files /dev/null and b/python/edu/resources/tips/images/method_separator.png differ diff --git a/python/edu/resources/tips/images/method_separator@2x.png b/python/edu/resources/tips/images/method_separator@2x.png new file mode 100644 index 000000000000..d7221f809988 Binary files /dev/null and b/python/edu/resources/tips/images/method_separator@2x.png differ diff --git a/python/edu/resources/tips/images/method_separator@2x_dark.png b/python/edu/resources/tips/images/method_separator@2x_dark.png new file mode 100644 index 000000000000..9bd4e5d20b7c Binary files /dev/null and b/python/edu/resources/tips/images/method_separator@2x_dark.png differ diff --git a/python/edu/resources/tips/images/method_separator_dark.png b/python/edu/resources/tips/images/method_separator_dark.png new file mode 100644 index 000000000000..eed48d258960 Binary files /dev/null and b/python/edu/resources/tips/images/method_separator_dark.png differ diff --git a/python/edu/resources/tips/images/move_to_changelist.png b/python/edu/resources/tips/images/move_to_changelist.png new file mode 100644 index 000000000000..e5e95ff23a65 Binary files /dev/null and b/python/edu/resources/tips/images/move_to_changelist.png differ diff --git a/python/edu/resources/tips/images/move_to_changelist@2x.png b/python/edu/resources/tips/images/move_to_changelist@2x.png new file mode 100644 index 000000000000..893f9a9ce930 Binary files /dev/null and b/python/edu/resources/tips/images/move_to_changelist@2x.png differ diff --git a/python/edu/resources/tips/images/move_to_changelist@2x_dark.png b/python/edu/resources/tips/images/move_to_changelist@2x_dark.png new file mode 100644 index 000000000000..389c34e906e4 Binary files /dev/null and b/python/edu/resources/tips/images/move_to_changelist@2x_dark.png differ diff --git a/python/edu/resources/tips/images/move_to_changelist_dark.png b/python/edu/resources/tips/images/move_to_changelist_dark.png new file mode 100644 index 000000000000..057bad2eb926 Binary files /dev/null and b/python/edu/resources/tips/images/move_to_changelist_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_down.png b/python/edu/resources/tips/images/move_up_down_witharrows_down.png new file mode 100644 index 000000000000..cb9469f63e18 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_down.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_down@2x.png b/python/edu/resources/tips/images/move_up_down_witharrows_down@2x.png new file mode 100644 index 000000000000..1d689d73d905 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_down@2x.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_down@2x_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_down@2x_dark.png new file mode 100644 index 000000000000..bb935b007863 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_down@2x_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_down_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_down_dark.png new file mode 100644 index 000000000000..2346d8cfe482 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_down_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_initial.png b/python/edu/resources/tips/images/move_up_down_witharrows_initial.png new file mode 100644 index 000000000000..82fd7469e1d2 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_initial.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x.png b/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x.png new file mode 100644 index 000000000000..bd1792c520a4 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x_dark.png new file mode 100644 index 000000000000..a476ac334c70 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_initial@2x_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_initial_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_initial_dark.png new file mode 100644 index 000000000000..8b84ae8430a7 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_initial_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_up.png b/python/edu/resources/tips/images/move_up_down_witharrows_up.png new file mode 100644 index 000000000000..e19c67b445ea Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_up.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_up@2x.png b/python/edu/resources/tips/images/move_up_down_witharrows_up@2x.png new file mode 100644 index 000000000000..d0008e29dcb2 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_up@2x.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_up@2x_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_up@2x_dark.png new file mode 100644 index 000000000000..124866ed802c Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_up@2x_dark.png differ diff --git a/python/edu/resources/tips/images/move_up_down_witharrows_up_dark.png b/python/edu/resources/tips/images/move_up_down_witharrows_up_dark.png new file mode 100644 index 000000000000..7251cb33ac08 Binary files /dev/null and b/python/edu/resources/tips/images/move_up_down_witharrows_up_dark.png differ diff --git a/python/edu/resources/tips/images/multicursor1@2x.png b/python/edu/resources/tips/images/multicursor1@2x.png new file mode 100755 index 000000000000..29208468a665 Binary files /dev/null and b/python/edu/resources/tips/images/multicursor1@2x.png differ diff --git a/python/edu/resources/tips/images/multicursor1@2x_dark.png b/python/edu/resources/tips/images/multicursor1@2x_dark.png new file mode 100755 index 000000000000..04dbef34c971 Binary files /dev/null and b/python/edu/resources/tips/images/multicursor1@2x_dark.png differ diff --git a/python/edu/resources/tips/images/multicursor@2x.png b/python/edu/resources/tips/images/multicursor@2x.png new file mode 100755 index 000000000000..d771d0a9aa0e Binary files /dev/null and b/python/edu/resources/tips/images/multicursor@2x.png differ diff --git a/python/edu/resources/tips/images/multicursor@2x_dark.png b/python/edu/resources/tips/images/multicursor@2x_dark.png new file mode 100755 index 000000000000..dd93320f7b39 Binary files /dev/null and b/python/edu/resources/tips/images/multicursor@2x_dark.png differ diff --git a/python/edu/resources/tips/images/navigateToFilePath.png b/python/edu/resources/tips/images/navigateToFilePath.png new file mode 100644 index 000000000000..ae4b78955a49 Binary files /dev/null and b/python/edu/resources/tips/images/navigateToFilePath.png differ diff --git a/python/edu/resources/tips/images/navigateToFilePath@2x.png b/python/edu/resources/tips/images/navigateToFilePath@2x.png new file mode 100644 index 000000000000..077f1831b68b Binary files /dev/null and b/python/edu/resources/tips/images/navigateToFilePath@2x.png differ diff --git a/python/edu/resources/tips/images/navigateToFilePath@2x_dark.png b/python/edu/resources/tips/images/navigateToFilePath@2x_dark.png new file mode 100644 index 000000000000..a73df98e5da1 Binary files /dev/null and b/python/edu/resources/tips/images/navigateToFilePath@2x_dark.png differ diff --git a/python/edu/resources/tips/images/navigateToFilePath_dark.png b/python/edu/resources/tips/images/navigateToFilePath_dark.png new file mode 100644 index 000000000000..756020ec39ab Binary files /dev/null and b/python/edu/resources/tips/images/navigateToFilePath_dark.png differ diff --git a/python/edu/resources/tips/images/navigationbar.png b/python/edu/resources/tips/images/navigationbar.png new file mode 100644 index 000000000000..ba8c14720723 Binary files /dev/null and b/python/edu/resources/tips/images/navigationbar.png differ diff --git a/python/edu/resources/tips/images/navigationbar@2x.png b/python/edu/resources/tips/images/navigationbar@2x.png new file mode 100644 index 000000000000..fc2bcd07f705 Binary files /dev/null and b/python/edu/resources/tips/images/navigationbar@2x.png differ diff --git a/python/edu/resources/tips/images/navigationbar@2x_dark.png b/python/edu/resources/tips/images/navigationbar@2x_dark.png new file mode 100644 index 000000000000..5b69d321540a Binary files /dev/null and b/python/edu/resources/tips/images/navigationbar@2x_dark.png differ diff --git a/python/edu/resources/tips/images/navigationbar_dark.png b/python/edu/resources/tips/images/navigationbar_dark.png new file mode 100644 index 000000000000..03c5f6fe2522 Binary files /dev/null and b/python/edu/resources/tips/images/navigationbar_dark.png differ diff --git a/python/edu/resources/tips/images/override_methods.png b/python/edu/resources/tips/images/override_methods.png new file mode 100644 index 000000000000..2234f7fa98b6 Binary files /dev/null and b/python/edu/resources/tips/images/override_methods.png differ diff --git a/python/edu/resources/tips/images/override_methods@2x.png b/python/edu/resources/tips/images/override_methods@2x.png new file mode 100644 index 000000000000..94a83071e0f9 Binary files /dev/null and b/python/edu/resources/tips/images/override_methods@2x.png differ diff --git a/python/edu/resources/tips/images/override_methods@2x_dark.png b/python/edu/resources/tips/images/override_methods@2x_dark.png new file mode 100644 index 000000000000..789ac6ce95ca Binary files /dev/null and b/python/edu/resources/tips/images/override_methods@2x_dark.png differ diff --git a/python/edu/resources/tips/images/override_methods_dark.png b/python/edu/resources/tips/images/override_methods_dark.png new file mode 100644 index 000000000000..3d32dc7b142a Binary files /dev/null and b/python/edu/resources/tips/images/override_methods_dark.png differ diff --git a/python/edu/resources/tips/images/param_info.png b/python/edu/resources/tips/images/param_info.png new file mode 100644 index 000000000000..b0b39e4998c1 Binary files /dev/null and b/python/edu/resources/tips/images/param_info.png differ diff --git a/python/edu/resources/tips/images/param_info@2x.png b/python/edu/resources/tips/images/param_info@2x.png new file mode 100644 index 000000000000..6e63f83dba6a Binary files /dev/null and b/python/edu/resources/tips/images/param_info@2x.png differ diff --git a/python/edu/resources/tips/images/param_info@2x_dark.png b/python/edu/resources/tips/images/param_info@2x_dark.png new file mode 100644 index 000000000000..b65141148638 Binary files /dev/null and b/python/edu/resources/tips/images/param_info@2x_dark.png differ diff --git a/python/edu/resources/tips/images/param_info_dark.png b/python/edu/resources/tips/images/param_info_dark.png new file mode 100644 index 000000000000..dcf76512342e Binary files /dev/null and b/python/edu/resources/tips/images/param_info_dark.png differ diff --git a/python/edu/resources/tips/images/pyColoredFiles.png b/python/edu/resources/tips/images/pyColoredFiles.png new file mode 100644 index 000000000000..b2c7ef9ff282 Binary files /dev/null and b/python/edu/resources/tips/images/pyColoredFiles.png differ diff --git a/python/edu/resources/tips/images/pyColoredFiles@2x.png b/python/edu/resources/tips/images/pyColoredFiles@2x.png new file mode 100644 index 000000000000..3274e2ffaa8c Binary files /dev/null and b/python/edu/resources/tips/images/pyColoredFiles@2x.png differ diff --git a/python/edu/resources/tips/images/pyColoredFiles@2x_dark.png b/python/edu/resources/tips/images/pyColoredFiles@2x_dark.png new file mode 100644 index 000000000000..69e38f9ecac3 Binary files /dev/null and b/python/edu/resources/tips/images/pyColoredFiles@2x_dark.png differ diff --git a/python/edu/resources/tips/images/pyColoredFiles_dark.png b/python/edu/resources/tips/images/pyColoredFiles_dark.png new file mode 100644 index 000000000000..61e0cc1bcf70 Binary files /dev/null and b/python/edu/resources/tips/images/pyColoredFiles_dark.png differ diff --git a/python/edu/resources/tips/images/pyconsole.png b/python/edu/resources/tips/images/pyconsole.png new file mode 100644 index 000000000000..b319f10d9386 Binary files /dev/null and b/python/edu/resources/tips/images/pyconsole.png differ diff --git a/python/edu/resources/tips/images/pyconsole@2x.png b/python/edu/resources/tips/images/pyconsole@2x.png new file mode 100644 index 000000000000..caf7b5c979a7 Binary files /dev/null and b/python/edu/resources/tips/images/pyconsole@2x.png differ diff --git a/python/edu/resources/tips/images/pyconsole@2x_dark.png b/python/edu/resources/tips/images/pyconsole@2x_dark.png new file mode 100644 index 000000000000..b05cee2f17a0 Binary files /dev/null and b/python/edu/resources/tips/images/pyconsole@2x_dark.png differ diff --git a/python/edu/resources/tips/images/pyconsole_dark.png b/python/edu/resources/tips/images/pyconsole_dark.png new file mode 100644 index 000000000000..8748fe1e59f5 Binary files /dev/null and b/python/edu/resources/tips/images/pyconsole_dark.png differ diff --git a/python/edu/resources/tips/images/qdoc_live_template@2x-3.png b/python/edu/resources/tips/images/qdoc_live_template@2x-3.png new file mode 100755 index 000000000000..ae79e7e1bb6d Binary files /dev/null and b/python/edu/resources/tips/images/qdoc_live_template@2x-3.png differ diff --git a/python/edu/resources/tips/images/qdoc_live_template@2x_dark-3.png b/python/edu/resources/tips/images/qdoc_live_template@2x_dark-3.png new file mode 100755 index 000000000000..6b077c641d17 Binary files /dev/null and b/python/edu/resources/tips/images/qdoc_live_template@2x_dark-3.png differ diff --git a/python/edu/resources/tips/images/quick_fix_options.png b/python/edu/resources/tips/images/quick_fix_options.png new file mode 100644 index 000000000000..418a2524380a Binary files /dev/null and b/python/edu/resources/tips/images/quick_fix_options.png differ diff --git a/python/edu/resources/tips/images/quick_fix_options@2x.png b/python/edu/resources/tips/images/quick_fix_options@2x.png new file mode 100644 index 000000000000..21e63469db24 Binary files /dev/null and b/python/edu/resources/tips/images/quick_fix_options@2x.png differ diff --git a/python/edu/resources/tips/images/quick_fix_options@2x_dark.png b/python/edu/resources/tips/images/quick_fix_options@2x_dark.png new file mode 100644 index 000000000000..aaf91a613d20 Binary files /dev/null and b/python/edu/resources/tips/images/quick_fix_options@2x_dark.png differ diff --git a/python/edu/resources/tips/images/quick_fix_options_dark.png b/python/edu/resources/tips/images/quick_fix_options_dark.png new file mode 100644 index 000000000000..8a80f476646e Binary files /dev/null and b/python/edu/resources/tips/images/quick_fix_options_dark.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc.png b/python/edu/resources/tips/images/quick_javadoc.png new file mode 100644 index 000000000000..b19982d2f483 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc@2x.png b/python/edu/resources/tips/images/quick_javadoc@2x.png new file mode 100644 index 000000000000..abbfebcc3056 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc@2x.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc@2x_dark.png b/python/edu/resources/tips/images/quick_javadoc@2x_dark.png new file mode 100644 index 000000000000..8f971f517d76 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc@2x_dark.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc_dark.png b/python/edu/resources/tips/images/quick_javadoc_dark.png new file mode 100644 index 000000000000..7f482d4ec962 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc_dark.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc_in_lookups.png b/python/edu/resources/tips/images/quick_javadoc_in_lookups.png new file mode 100644 index 000000000000..f346e103dd45 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc_in_lookups.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x.png b/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x.png new file mode 100644 index 000000000000..d782d4a39982 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x_dark.png b/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x_dark.png new file mode 100644 index 000000000000..5af062aa49f4 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc_in_lookups@2x_dark.png differ diff --git a/python/edu/resources/tips/images/quick_javadoc_in_lookups_dark.png b/python/edu/resources/tips/images/quick_javadoc_in_lookups_dark.png new file mode 100644 index 000000000000..e1e954f4f153 Binary files /dev/null and b/python/edu/resources/tips/images/quick_javadoc_in_lookups_dark.png differ diff --git a/python/edu/resources/tips/images/quick_switch_scheme.png b/python/edu/resources/tips/images/quick_switch_scheme.png new file mode 100644 index 000000000000..b1f99b5c42cd Binary files /dev/null and b/python/edu/resources/tips/images/quick_switch_scheme.png differ diff --git a/python/edu/resources/tips/images/quick_switch_scheme@2x.png b/python/edu/resources/tips/images/quick_switch_scheme@2x.png new file mode 100644 index 000000000000..7a9a3435eb45 Binary files /dev/null and b/python/edu/resources/tips/images/quick_switch_scheme@2x.png differ diff --git a/python/edu/resources/tips/images/quick_switch_scheme@2x_dark.png b/python/edu/resources/tips/images/quick_switch_scheme@2x_dark.png new file mode 100644 index 000000000000..ee68d67abe07 Binary files /dev/null and b/python/edu/resources/tips/images/quick_switch_scheme@2x_dark.png differ diff --git a/python/edu/resources/tips/images/quick_switch_scheme_dark.png b/python/edu/resources/tips/images/quick_switch_scheme_dark.png new file mode 100644 index 000000000000..0ab7af56669a Binary files /dev/null and b/python/edu/resources/tips/images/quick_switch_scheme_dark.png differ diff --git a/python/edu/resources/tips/images/recentSearch.png b/python/edu/resources/tips/images/recentSearch.png new file mode 100644 index 000000000000..18949394e842 Binary files /dev/null and b/python/edu/resources/tips/images/recentSearch.png differ diff --git a/python/edu/resources/tips/images/recentSearch@2x.png b/python/edu/resources/tips/images/recentSearch@2x.png new file mode 100644 index 000000000000..b39244becd4c Binary files /dev/null and b/python/edu/resources/tips/images/recentSearch@2x.png differ diff --git a/python/edu/resources/tips/images/recentSearch@2x_dark.png b/python/edu/resources/tips/images/recentSearch@2x_dark.png new file mode 100644 index 000000000000..15e255f1aeaf Binary files /dev/null and b/python/edu/resources/tips/images/recentSearch@2x_dark.png differ diff --git a/python/edu/resources/tips/images/recentSearch_dark.png b/python/edu/resources/tips/images/recentSearch_dark.png new file mode 100644 index 000000000000..2c2acc561757 Binary files /dev/null and b/python/edu/resources/tips/images/recentSearch_dark.png differ diff --git a/python/edu/resources/tips/images/recent_changes.png b/python/edu/resources/tips/images/recent_changes.png new file mode 100644 index 000000000000..27470ca76575 Binary files /dev/null and b/python/edu/resources/tips/images/recent_changes.png differ diff --git a/python/edu/resources/tips/images/recent_changes@2x.png b/python/edu/resources/tips/images/recent_changes@2x.png new file mode 100644 index 000000000000..60d873c6de79 Binary files /dev/null and b/python/edu/resources/tips/images/recent_changes@2x.png differ diff --git a/python/edu/resources/tips/images/recent_changes@2x_dark.png b/python/edu/resources/tips/images/recent_changes@2x_dark.png new file mode 100644 index 000000000000..bf0463e9382c Binary files /dev/null and b/python/edu/resources/tips/images/recent_changes@2x_dark.png differ diff --git a/python/edu/resources/tips/images/recent_changes_dark.png b/python/edu/resources/tips/images/recent_changes_dark.png new file mode 100644 index 000000000000..a3abbdecb4f2 Binary files /dev/null and b/python/edu/resources/tips/images/recent_changes_dark.png differ diff --git a/python/edu/resources/tips/images/recent_files_1.png b/python/edu/resources/tips/images/recent_files_1.png new file mode 100644 index 000000000000..c10b423146b6 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_1.png differ diff --git a/python/edu/resources/tips/images/recent_files_1@2x.png b/python/edu/resources/tips/images/recent_files_1@2x.png new file mode 100644 index 000000000000..634f836858b3 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_1@2x.png differ diff --git a/python/edu/resources/tips/images/recent_files_1@2x_dark.png b/python/edu/resources/tips/images/recent_files_1@2x_dark.png new file mode 100644 index 000000000000..59ae46a98d76 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_1@2x_dark.png differ diff --git a/python/edu/resources/tips/images/recent_files_1_dark.png b/python/edu/resources/tips/images/recent_files_1_dark.png new file mode 100644 index 000000000000..125776961430 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_1_dark.png differ diff --git a/python/edu/resources/tips/images/recent_files_2.png b/python/edu/resources/tips/images/recent_files_2.png new file mode 100644 index 000000000000..05698c860336 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_2.png differ diff --git a/python/edu/resources/tips/images/recent_files_2@2x.png b/python/edu/resources/tips/images/recent_files_2@2x.png new file mode 100644 index 000000000000..7df083acf60f Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_2@2x.png differ diff --git a/python/edu/resources/tips/images/recent_files_2@2x_dark.png b/python/edu/resources/tips/images/recent_files_2@2x_dark.png new file mode 100644 index 000000000000..f66da1b31829 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_2@2x_dark.png differ diff --git a/python/edu/resources/tips/images/recent_files_2_dark.png b/python/edu/resources/tips/images/recent_files_2_dark.png new file mode 100644 index 000000000000..99cdf79f99b6 Binary files /dev/null and b/python/edu/resources/tips/images/recent_files_2_dark.png differ diff --git a/python/edu/resources/tips/images/refactor_this.png b/python/edu/resources/tips/images/refactor_this.png new file mode 100644 index 000000000000..1a5fc4982ccb Binary files /dev/null and b/python/edu/resources/tips/images/refactor_this.png differ diff --git a/python/edu/resources/tips/images/refactor_this@2x.png b/python/edu/resources/tips/images/refactor_this@2x.png new file mode 100644 index 000000000000..698889b05840 Binary files /dev/null and b/python/edu/resources/tips/images/refactor_this@2x.png differ diff --git a/python/edu/resources/tips/images/refactor_this@2x_dark.png b/python/edu/resources/tips/images/refactor_this@2x_dark.png new file mode 100644 index 000000000000..78c122a1da71 Binary files /dev/null and b/python/edu/resources/tips/images/refactor_this@2x_dark.png differ diff --git a/python/edu/resources/tips/images/refactor_this_dark.png b/python/edu/resources/tips/images/refactor_this_dark.png new file mode 100644 index 000000000000..a832560c85ae Binary files /dev/null and b/python/edu/resources/tips/images/refactor_this_dark.png differ diff --git a/python/edu/resources/tips/images/rename.png b/python/edu/resources/tips/images/rename.png new file mode 100644 index 000000000000..35d533501f73 Binary files /dev/null and b/python/edu/resources/tips/images/rename.png differ diff --git a/python/edu/resources/tips/images/rename@2x.png b/python/edu/resources/tips/images/rename@2x.png new file mode 100644 index 000000000000..26b49a49eb82 Binary files /dev/null and b/python/edu/resources/tips/images/rename@2x.png differ diff --git a/python/edu/resources/tips/images/rename@2x_dark.png b/python/edu/resources/tips/images/rename@2x_dark.png new file mode 100644 index 000000000000..7bda59490aa9 Binary files /dev/null and b/python/edu/resources/tips/images/rename@2x_dark.png differ diff --git a/python/edu/resources/tips/images/rename_dark.png b/python/edu/resources/tips/images/rename_dark.png new file mode 100644 index 000000000000..c5f96c32554d Binary files /dev/null and b/python/edu/resources/tips/images/rename_dark.png differ diff --git a/python/edu/resources/tips/images/reopen.png b/python/edu/resources/tips/images/reopen.png new file mode 100644 index 000000000000..3cdb2df84786 Binary files /dev/null and b/python/edu/resources/tips/images/reopen.png differ diff --git a/python/edu/resources/tips/images/reopen@2x.png b/python/edu/resources/tips/images/reopen@2x.png new file mode 100644 index 000000000000..a0b61f58ea37 Binary files /dev/null and b/python/edu/resources/tips/images/reopen@2x.png differ diff --git a/python/edu/resources/tips/images/reopen@2x_dark.png b/python/edu/resources/tips/images/reopen@2x_dark.png new file mode 100644 index 000000000000..ed33d6e49c84 Binary files /dev/null and b/python/edu/resources/tips/images/reopen@2x_dark.png differ diff --git a/python/edu/resources/tips/images/reopen_dark.png b/python/edu/resources/tips/images/reopen_dark.png new file mode 100644 index 000000000000..af7ba67c534c Binary files /dev/null and b/python/edu/resources/tips/images/reopen_dark.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere.png b/python/edu/resources/tips/images/searchEverywhere.png new file mode 100644 index 000000000000..639f100b5192 Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere@2x.png b/python/edu/resources/tips/images/searchEverywhere@2x.png new file mode 100644 index 000000000000..9ef380cc5b45 Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere@2x.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere@2x_dark.png b/python/edu/resources/tips/images/searchEverywhere@2x_dark.png new file mode 100644 index 000000000000..2f6fa5607082 Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere@2x_dark.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere_dark.png b/python/edu/resources/tips/images/searchEverywhere_dark.png new file mode 100644 index 000000000000..c71501aa9e67 Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere_dark.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere_lense.png b/python/edu/resources/tips/images/searchEverywhere_lense.png new file mode 100644 index 000000000000..d855d22809ba Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere_lense.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere_lense@2x.png b/python/edu/resources/tips/images/searchEverywhere_lense@2x.png new file mode 100644 index 000000000000..5255eca01461 Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere_lense@2x.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere_lense@2x_dark.png b/python/edu/resources/tips/images/searchEverywhere_lense@2x_dark.png new file mode 100644 index 000000000000..680c00233e8a Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere_lense@2x_dark.png differ diff --git a/python/edu/resources/tips/images/searchEverywhere_lense_dark.png b/python/edu/resources/tips/images/searchEverywhere_lense_dark.png new file mode 100644 index 000000000000..1157f40e4f8a Binary files /dev/null and b/python/edu/resources/tips/images/searchEverywhere_lense_dark.png differ diff --git a/python/edu/resources/tips/images/search_settings.png b/python/edu/resources/tips/images/search_settings.png new file mode 100644 index 000000000000..31796e24f576 Binary files /dev/null and b/python/edu/resources/tips/images/search_settings.png differ diff --git a/python/edu/resources/tips/images/search_settings@2x.png b/python/edu/resources/tips/images/search_settings@2x.png new file mode 100644 index 000000000000..14212d48cd5f Binary files /dev/null and b/python/edu/resources/tips/images/search_settings@2x.png differ diff --git a/python/edu/resources/tips/images/search_settings@2x_dark.png b/python/edu/resources/tips/images/search_settings@2x_dark.png new file mode 100644 index 000000000000..10a33a2676dd Binary files /dev/null and b/python/edu/resources/tips/images/search_settings@2x_dark.png differ diff --git a/python/edu/resources/tips/images/search_settings_dark.png b/python/edu/resources/tips/images/search_settings_dark.png new file mode 100644 index 000000000000..32a05bc600c9 Binary files /dev/null and b/python/edu/resources/tips/images/search_settings_dark.png differ diff --git a/python/edu/resources/tips/images/select_in.png b/python/edu/resources/tips/images/select_in.png new file mode 100644 index 000000000000..782ccc2629c1 Binary files /dev/null and b/python/edu/resources/tips/images/select_in.png differ diff --git a/python/edu/resources/tips/images/select_in@2x.png b/python/edu/resources/tips/images/select_in@2x.png new file mode 100644 index 000000000000..68aec61d7934 Binary files /dev/null and b/python/edu/resources/tips/images/select_in@2x.png differ diff --git a/python/edu/resources/tips/images/select_in@2x_dark.png b/python/edu/resources/tips/images/select_in@2x_dark.png new file mode 100644 index 000000000000..993408d31af3 Binary files /dev/null and b/python/edu/resources/tips/images/select_in@2x_dark.png differ diff --git a/python/edu/resources/tips/images/select_in_dark.png b/python/edu/resources/tips/images/select_in_dark.png new file mode 100644 index 000000000000..8ead24652cc9 Binary files /dev/null and b/python/edu/resources/tips/images/select_in_dark.png differ diff --git a/python/edu/resources/tips/images/select_tasks.png b/python/edu/resources/tips/images/select_tasks.png new file mode 100644 index 000000000000..1c9aa8993ff3 Binary files /dev/null and b/python/edu/resources/tips/images/select_tasks.png differ diff --git a/python/edu/resources/tips/images/select_tasks@2x.png b/python/edu/resources/tips/images/select_tasks@2x.png new file mode 100644 index 000000000000..58a42c001b1d Binary files /dev/null and b/python/edu/resources/tips/images/select_tasks@2x.png differ diff --git a/python/edu/resources/tips/images/select_tasks@2x_dark.png b/python/edu/resources/tips/images/select_tasks@2x_dark.png new file mode 100644 index 000000000000..59272a32576a Binary files /dev/null and b/python/edu/resources/tips/images/select_tasks@2x_dark.png differ diff --git a/python/edu/resources/tips/images/select_tasks_dark.png b/python/edu/resources/tips/images/select_tasks_dark.png new file mode 100644 index 000000000000..7d001529e458 Binary files /dev/null and b/python/edu/resources/tips/images/select_tasks_dark.png differ diff --git a/python/edu/resources/tips/images/showToolWindows.png b/python/edu/resources/tips/images/showToolWindows.png new file mode 100644 index 000000000000..2a925b29c213 Binary files /dev/null and b/python/edu/resources/tips/images/showToolWindows.png differ diff --git a/python/edu/resources/tips/images/showToolWindows@2x.png b/python/edu/resources/tips/images/showToolWindows@2x.png new file mode 100644 index 000000000000..db1071b866cd Binary files /dev/null and b/python/edu/resources/tips/images/showToolWindows@2x.png differ diff --git a/python/edu/resources/tips/images/showToolWindows@2x_dark.png b/python/edu/resources/tips/images/showToolWindows@2x_dark.png new file mode 100644 index 000000000000..06c387852f1c Binary files /dev/null and b/python/edu/resources/tips/images/showToolWindows@2x_dark.png differ diff --git a/python/edu/resources/tips/images/showToolWindows_dark.png b/python/edu/resources/tips/images/showToolWindows_dark.png new file mode 100644 index 000000000000..471d3b721af3 Binary files /dev/null and b/python/edu/resources/tips/images/showToolWindows_dark.png differ diff --git a/python/edu/resources/tips/images/showUsages.png b/python/edu/resources/tips/images/showUsages.png new file mode 100644 index 000000000000..196992b8c639 Binary files /dev/null and b/python/edu/resources/tips/images/showUsages.png differ diff --git a/python/edu/resources/tips/images/showUsages@2x.png b/python/edu/resources/tips/images/showUsages@2x.png new file mode 100644 index 000000000000..694a59cb2339 Binary files /dev/null and b/python/edu/resources/tips/images/showUsages@2x.png differ diff --git a/python/edu/resources/tips/images/showUsages@2x_dark.png b/python/edu/resources/tips/images/showUsages@2x_dark.png new file mode 100644 index 000000000000..b0abb99e23be Binary files /dev/null and b/python/edu/resources/tips/images/showUsages@2x_dark.png differ diff --git a/python/edu/resources/tips/images/showUsages_dark.png b/python/edu/resources/tips/images/showUsages_dark.png new file mode 100644 index 000000000000..b6ebb3e27c8a Binary files /dev/null and b/python/edu/resources/tips/images/showUsages_dark.png differ diff --git a/python/edu/resources/tips/images/show_applied_styles.png b/python/edu/resources/tips/images/show_applied_styles.png new file mode 100644 index 000000000000..1f6988b933a8 Binary files /dev/null and b/python/edu/resources/tips/images/show_applied_styles.png differ diff --git a/python/edu/resources/tips/images/show_applied_styles@2x.png b/python/edu/resources/tips/images/show_applied_styles@2x.png new file mode 100644 index 000000000000..e0720cb54e71 Binary files /dev/null and b/python/edu/resources/tips/images/show_applied_styles@2x.png differ diff --git a/python/edu/resources/tips/images/show_applied_styles@2x_dark.png b/python/edu/resources/tips/images/show_applied_styles@2x_dark.png new file mode 100644 index 000000000000..8fa79d6e0ba0 Binary files /dev/null and b/python/edu/resources/tips/images/show_applied_styles@2x_dark.png differ diff --git a/python/edu/resources/tips/images/show_applied_styles_dark.png b/python/edu/resources/tips/images/show_applied_styles_dark.png new file mode 100644 index 000000000000..f403cd166cb2 Binary files /dev/null and b/python/edu/resources/tips/images/show_applied_styles_dark.png differ diff --git a/python/edu/resources/tips/images/show_hide_tool_window_bars.png b/python/edu/resources/tips/images/show_hide_tool_window_bars.png new file mode 100644 index 000000000000..bf752ceb6d93 Binary files /dev/null and b/python/edu/resources/tips/images/show_hide_tool_window_bars.png differ diff --git a/python/edu/resources/tips/images/show_hide_tool_window_bars@2x.png b/python/edu/resources/tips/images/show_hide_tool_window_bars@2x.png new file mode 100644 index 000000000000..994df8775783 Binary files /dev/null and b/python/edu/resources/tips/images/show_hide_tool_window_bars@2x.png differ diff --git a/python/edu/resources/tips/images/show_hide_tool_window_bars@2x_dark.png b/python/edu/resources/tips/images/show_hide_tool_window_bars@2x_dark.png new file mode 100644 index 000000000000..822975130fcc Binary files /dev/null and b/python/edu/resources/tips/images/show_hide_tool_window_bars@2x_dark.png differ diff --git a/python/edu/resources/tips/images/show_hide_tool_window_bars_dark.png b/python/edu/resources/tips/images/show_hide_tool_window_bars_dark.png new file mode 100644 index 000000000000..083029cb687e Binary files /dev/null and b/python/edu/resources/tips/images/show_hide_tool_window_bars_dark.png differ diff --git a/python/edu/resources/tips/images/sidebyside.png b/python/edu/resources/tips/images/sidebyside.png new file mode 100644 index 000000000000..8d004bc81c3a Binary files /dev/null and b/python/edu/resources/tips/images/sidebyside.png differ diff --git a/python/edu/resources/tips/images/sidebyside@2x.png b/python/edu/resources/tips/images/sidebyside@2x.png new file mode 100644 index 000000000000..9cf631a6b302 Binary files /dev/null and b/python/edu/resources/tips/images/sidebyside@2x.png differ diff --git a/python/edu/resources/tips/images/sidebyside@2x_dark.png b/python/edu/resources/tips/images/sidebyside@2x_dark.png new file mode 100644 index 000000000000..c64e919e14de Binary files /dev/null and b/python/edu/resources/tips/images/sidebyside@2x_dark.png differ diff --git a/python/edu/resources/tips/images/sidebyside_dark.png b/python/edu/resources/tips/images/sidebyside_dark.png new file mode 100644 index 000000000000..c55c6e3ff9a6 Binary files /dev/null and b/python/edu/resources/tips/images/sidebyside_dark.png differ diff --git a/python/edu/resources/tips/images/speed_search.png b/python/edu/resources/tips/images/speed_search.png new file mode 100644 index 000000000000..2e58d3300b31 Binary files /dev/null and b/python/edu/resources/tips/images/speed_search.png differ diff --git a/python/edu/resources/tips/images/speed_search@2x.png b/python/edu/resources/tips/images/speed_search@2x.png new file mode 100644 index 000000000000..60b5f2e4c87b Binary files /dev/null and b/python/edu/resources/tips/images/speed_search@2x.png differ diff --git a/python/edu/resources/tips/images/speed_search@2x_dark.png b/python/edu/resources/tips/images/speed_search@2x_dark.png new file mode 100644 index 000000000000..112b38107a58 Binary files /dev/null and b/python/edu/resources/tips/images/speed_search@2x_dark.png differ diff --git a/python/edu/resources/tips/images/speed_search_dark.png b/python/edu/resources/tips/images/speed_search_dark.png new file mode 100644 index 000000000000..86642ce0e899 Binary files /dev/null and b/python/edu/resources/tips/images/speed_search_dark.png differ diff --git a/python/edu/resources/tips/images/switcher.png b/python/edu/resources/tips/images/switcher.png new file mode 100644 index 000000000000..2a4cbcdd1e04 Binary files /dev/null and b/python/edu/resources/tips/images/switcher.png differ diff --git a/python/edu/resources/tips/images/switcher@2x.png b/python/edu/resources/tips/images/switcher@2x.png new file mode 100644 index 000000000000..1fb023f79dd0 Binary files /dev/null and b/python/edu/resources/tips/images/switcher@2x.png differ diff --git a/python/edu/resources/tips/images/switcher@2x_dark.png b/python/edu/resources/tips/images/switcher@2x_dark.png new file mode 100644 index 000000000000..b36a0e6c0daf Binary files /dev/null and b/python/edu/resources/tips/images/switcher@2x_dark.png differ diff --git a/python/edu/resources/tips/images/switcher_dark.png b/python/edu/resources/tips/images/switcher_dark.png new file mode 100644 index 000000000000..0549a5a147be Binary files /dev/null and b/python/edu/resources/tips/images/switcher_dark.png differ diff --git a/python/edu/resources/tips/images/tagNameCompletion.png b/python/edu/resources/tips/images/tagNameCompletion.png new file mode 100644 index 000000000000..e711aa8c0093 Binary files /dev/null and b/python/edu/resources/tips/images/tagNameCompletion.png differ diff --git a/python/edu/resources/tips/images/tagNameCompletion@2x.png b/python/edu/resources/tips/images/tagNameCompletion@2x.png new file mode 100644 index 000000000000..2942719bedb8 Binary files /dev/null and b/python/edu/resources/tips/images/tagNameCompletion@2x.png differ diff --git a/python/edu/resources/tips/images/tagNameCompletion@2x_dark.png b/python/edu/resources/tips/images/tagNameCompletion@2x_dark.png new file mode 100644 index 000000000000..71bd316fe677 Binary files /dev/null and b/python/edu/resources/tips/images/tagNameCompletion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/tagNameCompletion_dark.png b/python/edu/resources/tips/images/tagNameCompletion_dark.png new file mode 100644 index 000000000000..1e6971d5cb6e Binary files /dev/null and b/python/edu/resources/tips/images/tagNameCompletion_dark.png differ diff --git a/python/edu/resources/tips/images/terminal.png b/python/edu/resources/tips/images/terminal.png new file mode 100644 index 000000000000..f71774350ae8 Binary files /dev/null and b/python/edu/resources/tips/images/terminal.png differ diff --git a/python/edu/resources/tips/images/terminal@2x.png b/python/edu/resources/tips/images/terminal@2x.png new file mode 100644 index 000000000000..2d75b4fcb1d5 Binary files /dev/null and b/python/edu/resources/tips/images/terminal@2x.png differ diff --git a/python/edu/resources/tips/images/terminal@2x_dark.png b/python/edu/resources/tips/images/terminal@2x_dark.png new file mode 100644 index 000000000000..9cdd82ef538b Binary files /dev/null and b/python/edu/resources/tips/images/terminal@2x_dark.png differ diff --git a/python/edu/resources/tips/images/terminal_dark.png b/python/edu/resources/tips/images/terminal_dark.png new file mode 100644 index 000000000000..54ae051d777b Binary files /dev/null and b/python/edu/resources/tips/images/terminal_dark.png differ diff --git a/python/edu/resources/tips/images/todo_preview.png b/python/edu/resources/tips/images/todo_preview.png new file mode 100644 index 000000000000..8475624cfa8b Binary files /dev/null and b/python/edu/resources/tips/images/todo_preview.png differ diff --git a/python/edu/resources/tips/images/todo_preview@2x.png b/python/edu/resources/tips/images/todo_preview@2x.png new file mode 100644 index 000000000000..9962b2b0e0fc Binary files /dev/null and b/python/edu/resources/tips/images/todo_preview@2x.png differ diff --git a/python/edu/resources/tips/images/todo_preview@2x_dark.png b/python/edu/resources/tips/images/todo_preview@2x_dark.png new file mode 100644 index 000000000000..6caef92066ef Binary files /dev/null and b/python/edu/resources/tips/images/todo_preview@2x_dark.png differ diff --git a/python/edu/resources/tips/images/todo_preview_dark.png b/python/edu/resources/tips/images/todo_preview_dark.png new file mode 100644 index 000000000000..a0c50ebbd9a8 Binary files /dev/null and b/python/edu/resources/tips/images/todo_preview_dark.png differ diff --git a/python/edu/resources/tips/images/todo_scopes.png b/python/edu/resources/tips/images/todo_scopes.png new file mode 100644 index 000000000000..8121347bd5c1 Binary files /dev/null and b/python/edu/resources/tips/images/todo_scopes.png differ diff --git a/python/edu/resources/tips/images/todo_scopes@2x.png b/python/edu/resources/tips/images/todo_scopes@2x.png new file mode 100644 index 000000000000..e395360dd5e8 Binary files /dev/null and b/python/edu/resources/tips/images/todo_scopes@2x.png differ diff --git a/python/edu/resources/tips/images/todo_scopes@2x_dark.png b/python/edu/resources/tips/images/todo_scopes@2x_dark.png new file mode 100644 index 000000000000..ec8a30107d12 Binary files /dev/null and b/python/edu/resources/tips/images/todo_scopes@2x_dark.png differ diff --git a/python/edu/resources/tips/images/todo_scopes_dark.png b/python/edu/resources/tips/images/todo_scopes_dark.png new file mode 100644 index 000000000000..2a2a056f756d Binary files /dev/null and b/python/edu/resources/tips/images/todo_scopes_dark.png differ diff --git a/python/edu/resources/tips/images/try_except.png b/python/edu/resources/tips/images/try_except.png new file mode 100644 index 000000000000..918275f1b883 Binary files /dev/null and b/python/edu/resources/tips/images/try_except.png differ diff --git a/python/edu/resources/tips/images/try_except@2x.png b/python/edu/resources/tips/images/try_except@2x.png new file mode 100644 index 000000000000..6336bbcb3f62 Binary files /dev/null and b/python/edu/resources/tips/images/try_except@2x.png differ diff --git a/python/edu/resources/tips/images/try_except@2x_dark.png b/python/edu/resources/tips/images/try_except@2x_dark.png new file mode 100644 index 000000000000..32f100a97b39 Binary files /dev/null and b/python/edu/resources/tips/images/try_except@2x_dark.png differ diff --git a/python/edu/resources/tips/images/try_except_dark.png b/python/edu/resources/tips/images/try_except_dark.png new file mode 100644 index 000000000000..5c12670caaf5 Binary files /dev/null and b/python/edu/resources/tips/images/try_except_dark.png differ diff --git a/python/edu/resources/tips/images/vcsQuickList.png b/python/edu/resources/tips/images/vcsQuickList.png new file mode 100644 index 000000000000..61209a6428fd Binary files /dev/null and b/python/edu/resources/tips/images/vcsQuickList.png differ diff --git a/python/edu/resources/tips/images/vcsQuickList@2x.png b/python/edu/resources/tips/images/vcsQuickList@2x.png new file mode 100644 index 000000000000..e4735101dc8a Binary files /dev/null and b/python/edu/resources/tips/images/vcsQuickList@2x.png differ diff --git a/python/edu/resources/tips/images/vcsQuickList@2x_dark.png b/python/edu/resources/tips/images/vcsQuickList@2x_dark.png new file mode 100644 index 000000000000..074919081f65 Binary files /dev/null and b/python/edu/resources/tips/images/vcsQuickList@2x_dark.png differ diff --git a/python/edu/resources/tips/images/vcsQuickList_dark.png b/python/edu/resources/tips/images/vcsQuickList_dark.png new file mode 100644 index 000000000000..0c8cbe495068 Binary files /dev/null and b/python/edu/resources/tips/images/vcsQuickList_dark.png differ diff --git a/python/edu/resources/tips/images/wildcard_goto.png b/python/edu/resources/tips/images/wildcard_goto.png new file mode 100644 index 000000000000..3486682a805d Binary files /dev/null and b/python/edu/resources/tips/images/wildcard_goto.png differ diff --git a/python/edu/resources/tips/images/wildcard_goto@2x.png b/python/edu/resources/tips/images/wildcard_goto@2x.png new file mode 100644 index 000000000000..557f5b22be48 Binary files /dev/null and b/python/edu/resources/tips/images/wildcard_goto@2x.png differ diff --git a/python/edu/resources/tips/images/wildcard_goto@2x_dark.png b/python/edu/resources/tips/images/wildcard_goto@2x_dark.png new file mode 100644 index 000000000000..06d01e57548b Binary files /dev/null and b/python/edu/resources/tips/images/wildcard_goto@2x_dark.png differ diff --git a/python/edu/resources/tips/images/wildcard_goto_dark.png b/python/edu/resources/tips/images/wildcard_goto_dark.png new file mode 100644 index 000000000000..1f7340e1691f Binary files /dev/null and b/python/edu/resources/tips/images/wildcard_goto_dark.png differ diff --git a/python/edu/resources/tips/images/word_completion.png b/python/edu/resources/tips/images/word_completion.png new file mode 100644 index 000000000000..ae32b93e7030 Binary files /dev/null and b/python/edu/resources/tips/images/word_completion.png differ diff --git a/python/edu/resources/tips/images/word_completion@2x.png b/python/edu/resources/tips/images/word_completion@2x.png new file mode 100644 index 000000000000..2bfed89e18b6 Binary files /dev/null and b/python/edu/resources/tips/images/word_completion@2x.png differ diff --git a/python/edu/resources/tips/images/word_completion@2x_dark.png b/python/edu/resources/tips/images/word_completion@2x_dark.png new file mode 100644 index 000000000000..bcdc5582f8e0 Binary files /dev/null and b/python/edu/resources/tips/images/word_completion@2x_dark.png differ diff --git a/python/edu/resources/tips/images/word_completion_dark.png b/python/edu/resources/tips/images/word_completion_dark.png new file mode 100644 index 000000000000..199bcfbd3d6f Binary files /dev/null and b/python/edu/resources/tips/images/word_completion_dark.png differ diff --git a/python/edu/resources/tips/moveFileToChangelist.html b/python/edu/resources/tips/moveFileToChangelist.html new file mode 100644 index 000000000000..7ec305ed0a19 --- /dev/null +++ b/python/edu/resources/tips/moveFileToChangelist.html @@ -0,0 +1,16 @@ + + + + + + + +

+You can move any file to a changelist of your choice. To do that, just choose +Move to Changelist on the file context menu in the Changes tool window: +

+ +

+ + + diff --git a/python/edu/src/META-INF/IdeTipsAndTricks.xml b/python/edu/src/META-INF/IdeTipsAndTricks.xml new file mode 100644 index 000000000000..e920175552b6 --- /dev/null +++ b/python/edu/src/META-INF/IdeTipsAndTricks.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/python/edu/src/META-INF/PyCharmEduPlugin.xml b/python/edu/src/META-INF/PyCharmEduPlugin.xml new file mode 100644 index 000000000000..48ac4b6fde03 --- /dev/null +++ b/python/edu/src/META-INF/PyCharmEduPlugin.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/python/edu/src/META-INF/pycharm-edu.xml b/python/edu/src/META-INF/pycharm-edu.xml new file mode 100644 index 000000000000..0f422901e076 --- /dev/null +++ b/python/edu/src/META-INF/pycharm-edu.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + com.jetbrains.python.PyCharmInitialConfigurator + + + + + + com.intellij.internal.statistic.updater.SendStatisticsProjectComponent + + + com.jetbrains.python.PyModuleListener + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/python/helpers/pycharm/behave_runner.py b/python/helpers/pycharm/behave_runner.py index e66805cfafb2..4a1b2f6557c5 100644 --- a/python/helpers/pycharm/behave_runner.py +++ b/python/helpers/pycharm/behave_runner.py @@ -141,7 +141,11 @@ class _BehaveRunner(_bdd_utils.BddRunner): elif element.status == 'passed': self._test_passed(element.name, element.duration) elif element.status == 'failed': - self._test_failed(element.name, element.error_message, traceback.format_exc()) + try: + trace = traceback.format_exc() + except Exception: + trace = "".join(traceback.format_tb(element.exc_traceback)) + self._test_failed(element.name, element.error_message, trace) elif element.status == 'undefined': self._test_undefined(element.name, element.location) else: @@ -231,7 +235,7 @@ if __name__ == "__main__": if not my_config.paths: # No path provided, trying to load dit manually if os.path.isfile(what_to_run): # File is provided, load it my_config.paths = [what_to_run] - else: # Dir is provided, find subdirs ro run + else: # Dir is provided, find subdirs ro run my_config.paths = _get_dirs_to_run(base_dir) _BehaveRunner(my_config, base_dir).run() diff --git a/python/src/com/jetbrains/python/PyAddImportFix.java b/python/src/com/jetbrains/python/PyAddImportFix.java new file mode 100644 index 000000000000..c13fed13fdcb --- /dev/null +++ b/python/src/com/jetbrains/python/PyAddImportFix.java @@ -0,0 +1,55 @@ +package com.jetbrains.python; + +import com.intellij.codeInspection.LocalQuickFix; +import com.intellij.codeInspection.ProblemDescriptor; +import com.intellij.openapi.project.Project; +import com.intellij.psi.PsiElement; +import com.jetbrains.python.codeInsight.imports.AddImportHelper; +import com.jetbrains.python.psi.LanguageLevel; +import com.jetbrains.python.psi.PyElementGenerator; +import com.jetbrains.python.psi.PyFile; +import com.jetbrains.python.psi.PyImportStatementBase; +import org.jetbrains.annotations.NotNull; + +/** + * Quick fix that adds import to file + * + * @author Ilya.Kazakevich + */ +public class PyAddImportFix implements LocalQuickFix { + @NotNull + private final String myImportToAdd; + @NotNull + private final PyFile myFile; + + /** + * @param importToAdd string representing what to add (i.e. "from foo import bar") + * @param file where to add + */ + public PyAddImportFix(@NotNull final String importToAdd, @NotNull final PyFile file) { + myImportToAdd = importToAdd; + myFile = file; + } + + @NotNull + @Override + public String getName() { + return PyBundle.message("QFIX.add.import", myImportToAdd); + } + + @NotNull + @Override + public String getFamilyName() { + return getName(); + } + + @Override + public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) { + final PyElementGenerator generator = PyElementGenerator.getInstance(project); + final PyImportStatementBase statement = + generator.createFromText(LanguageLevel.forElement(myFile), PyImportStatementBase.class, myImportToAdd); + final PsiElement recommendedPosition = AddImportHelper.getFileInsertPosition(myFile); + myFile.addAfter(statement, recommendedPosition); + } +} + diff --git a/python/src/com/jetbrains/python/PyBundle.properties b/python/src/com/jetbrains/python/PyBundle.properties index 5d29d3f79d50..482daa88b66c 100644 --- a/python/src/com/jetbrains/python/PyBundle.properties +++ b/python/src/com/jetbrains/python/PyBundle.properties @@ -32,6 +32,8 @@ QFIX.create.property=Create property QFIX.add.encoding=Add encoding declaration +QFIX.add.import=Add "''{0}''" + QFIX.NAME.parameters=Parameters of functions and methods QFIX.rename.parameter.to.$0=Rename to ''{0}'' diff --git a/python/src/com/jetbrains/python/psi/PyUtil.java b/python/src/com/jetbrains/python/psi/PyUtil.java index 877da8df6dd9..f1dd16078696 100644 --- a/python/src/com/jetbrains/python/psi/PyUtil.java +++ b/python/src/com/jetbrains/python/psi/PyUtil.java @@ -1645,6 +1645,11 @@ public class PyUtil { return Collections2.filter(pyMemberInfos, new ObjectPredicate(false)); } + public static boolean isStarImportableFrom(@NotNull String name, @NotNull PyFile file) { + final List dunderAll = file.getDunderAll(); + return dunderAll != null ? dunderAll.contains(name) : !name.startsWith("_"); + } + /** * Filters only pyclass object (new class) */ diff --git a/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java b/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java index 030fcfe3d7e5..02b790622fe7 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyFileImpl.java @@ -477,8 +477,9 @@ public class PyFileImpl extends PsiFileBase implements PyFile, PyExpression { if (starImportSource != null) { starImportSource = PyUtil.turnDirIntoInit(starImportSource); if (starImportSource instanceof PyFile) { - final PsiElement result = ((PyFile)starImportSource).getElementNamed(name); - if (result != null) { + final PyFile file = (PyFile)starImportSource; + final PsiElement result = file.getElementNamed(name); + if (result != null && PyUtil.isStarImportableFrom(name, file)) { return result; } } diff --git a/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java b/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java index 4011c233e38d..88c3134481a8 100644 --- a/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java +++ b/python/src/com/jetbrains/python/psi/impl/PyStarImportElementImpl.java @@ -52,11 +52,8 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo for (PsiElement importedFile : new HashSet(importedFiles)) { // resolver gives lots of duplicates final PsiElement source = PyUtil.turnDirIntoInit(importedFile); if (source instanceof PyFile) { - Iterable declaredNames = ((PyFile)source).iterateNames(); - if (((PyFile)source).getDunderAll() == null) { - declaredNames = excludeUnderscoredNames(declaredNames); - } - chain.add(declaredNames); + final PyFile sourceFile = (PyFile)source; + chain.add(filterStarImportableNames(sourceFile.iterateNames(), sourceFile)); } } return chain; @@ -64,15 +61,13 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo return Collections.emptyList(); } - private static Iterable excludeUnderscoredNames(Iterable declaredNames) { + @NotNull + private static Iterable filterStarImportableNames(@NotNull Iterable declaredNames, @NotNull final PyFile file) { return Iterables.filter(declaredNames, new Predicate() { @Override public boolean apply(@Nullable PyElement input) { final String name = input != null ? input.getName() : null; - if (name != null && name.startsWith("_")) { - return false; - } - return true; + return name != null && PyUtil.isStarImportableFrom(name, file); } }); } @@ -93,11 +88,7 @@ public class PyStarImportElementImpl extends PyElementImpl implements PyStarImpo final List results = moduleType.resolveMember(name, null, AccessDirection.READ, PyResolveContext.defaultContext()); final PsiElement result = results != null && !results.isEmpty() ? results.get(0).getElement() : null; - if (result != null) { - final List all = sourceFile.getDunderAll(); - if (all != null ? !all.contains(name) : name.startsWith("_")) { - continue; - } + if (result != null && PyUtil.isStarImportableFrom(name, sourceFile) ) { return result; } } diff --git a/python/src/com/jetbrains/python/run/PythonCommandLineState.java b/python/src/com/jetbrains/python/run/PythonCommandLineState.java index 17fda94437d0..a4d1718bb006 100644 --- a/python/src/com/jetbrains/python/run/PythonCommandLineState.java +++ b/python/src/com/jetbrains/python/run/PythonCommandLineState.java @@ -141,7 +141,7 @@ public abstract class PythonCommandLineState extends CommandLineState { protected void addTracebackFilter(Project project, ConsoleView consoleView, ProcessHandler processHandler) { if (PySdkUtil.isRemote(myConfig.getSdk())) { assert processHandler instanceof RemoteProcessHandlerBase; - consoleView.addMessageFilter(new PyRemoteTracebackFilter(project, null, (RemoteProcessHandlerBase) processHandler)); + consoleView.addMessageFilter(new PyRemoteTracebackFilter(project, myConfig.getWorkingDirectory(), (RemoteProcessHandlerBase) processHandler)); } else { consoleView.addMessageFilter(new PythonTracebackFilter(project, myConfig.getWorkingDirectory())); diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/a.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/a.py new file mode 100644 index 000000000000..6d444960ee9d --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/a.py @@ -0,0 +1,3 @@ +import b +from p1 import * +print(b) diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/b.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/b.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/__init__.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/__init__.py new file mode 100644 index 000000000000..31f7e1aa969c --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/__init__.py @@ -0,0 +1 @@ +from p1.m1 import * diff --git a/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/m1.py b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/m1.py new file mode 100644 index 000000000000..3f8018db03f2 --- /dev/null +++ b/python/testData/inspections/PyUnresolvedReferencesInspection/UnusedImportBeforeStarDunderAll/p1/m1.py @@ -0,0 +1,2 @@ +import b +__all__ = [] diff --git a/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java b/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java index 176708421fcd..a0a2a1232b2e 100644 --- a/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/inspections/PyUnresolvedReferencesInspectionTest.java @@ -376,6 +376,11 @@ public class PyUnresolvedReferencesInspectionTest extends PyInspectionTestCase { doMultiFileTest(); } + // PY-13585 + public void testUnusedImportBeforeStarDunderAll() { + doMultiFileTest(); + } + @NotNull @Override protected Class getInspectionClass() { diff --git a/resources/src/idea/RichPlatformActions.xml b/resources/src/idea/RichPlatformActions.xml index 12a8d342c956..562f7c4177c7 100644 --- a/resources/src/idea/RichPlatformActions.xml +++ b/resources/src/idea/RichPlatformActions.xml @@ -389,12 +389,6 @@
- - - - - -