├── _config.yml ├── resources ├── idea-theme │ ├── Emacs.jar │ ├── Ergo.jar │ ├── Gvim.jar │ ├── Igor.jar │ ├── Cobalt.jar │ ├── Pastel.jar │ ├── TauCeti.jar │ ├── BlocksDark.jar │ ├── BlueHippo.jar │ ├── Brackets.jar │ ├── Havenjark.jar │ ├── Monokai_2.jar │ ├── NicePython.jar │ ├── Solarized.jar │ ├── Sunburst.jar │ ├── Dreamweaver.jar │ ├── FadeComments.jar │ ├── EasyEyesYellow.jar │ ├── Notepad++Like.jar │ ├── SublimeMonoKai.jar │ ├── XcodeMidnight.jar │ ├── AptanaByAlexmeia.jar │ ├── DarkFlashBuilder.jar │ ├── TextMateTwilight.jar │ ├── GeditForElegantGnome.jar │ ├── SublimeMonokaiTrue.jar │ └── VibrantUnknown(Darcula).jar └── plugins │ └── MavenRunHelper.zip ├── images ├── difficult-cases │ ├── .DS_Store │ ├── java-source │ │ ├── .DS_Store │ │ ├── modules.png │ │ ├── project.png │ │ └── error-jdk.png │ ├── keymap-delete │ │ ├── keymap.png │ │ ├── tools-vim.png │ │ └── choose-code.png │ ├── java-launch-helper │ │ ├── idea-help.png │ │ ├── preferences.png │ │ ├── console-fold.png │ │ └── idea-no-launcher.png │ ├── maven-pom-unrecognized │ │ ├── pom-xml.png │ │ └── as-maven-project.png │ └── unable-import-maven-project │ │ ├── event-log.png │ │ ├── show-log.png │ │ ├── maven-config.png │ │ ├── unable-create-injector.png │ │ └── unable-import-maven-project.png ├── basic-course │ ├── idea-icon │ │ ├── icons.png │ │ ├── tiny-1.png │ │ ├── tiny-2.png │ │ ├── common-1.png │ │ ├── common-2.png │ │ ├── common-3.png │ │ ├── file-types-1.png │ │ ├── file-types-2.png │ │ ├── file-types-3.png │ │ ├── file-types-4.png │ │ ├── file-types-5.png │ │ ├── file-types-6.png │ │ ├── file-types-7.png │ │ ├── data-sources-1.png │ │ ├── data-sources-2.png │ │ └── data-sources-3.png │ ├── use-face │ │ ├── tool-show.png │ │ ├── idea-begin.png │ │ ├── new-project.png │ │ ├── welcome-idea.png │ │ ├── new-project-2.png │ │ ├── project-go-go.png │ │ └── toolbar-toolbuttons.png │ ├── compile-method │ │ ├── build.png │ │ ├── settings-1.png │ │ ├── settings-2.png │ │ ├── settings-3.png │ │ └── run-debug-configuration.png │ ├── hello-world │ │ ├── idea-iml.png │ │ ├── hello-world.png │ │ ├── new-package.png │ │ ├── new-project.png │ │ ├── com-hit-demo.png │ │ ├── create-new-class.png │ │ ├── new-project-next.png │ │ ├── welcome-to-idea.png │ │ ├── hello-world-class.png │ │ ├── hello-world-go-go.png │ │ ├── new-project-finish.png │ │ ├── hide-empty-middle-package.png │ │ ├── compact-empty-middle-packge.png │ │ ├── create-project-from-template.png │ │ ├── select-home-directory-for-jdk.png │ │ └── select-home-directory-for-jdk-2.png │ ├── install-jdk-win10 │ │ ├── cmd.png │ │ ├── accept.png │ │ ├── system.png │ │ ├── unaccept.png │ │ ├── edit-path.png │ │ ├── oracle-jdk.png │ │ ├── environment.png │ │ ├── download-jdk-1.png │ │ ├── download-jdk-2.png │ │ ├── download-jdk-3.png │ │ ├── download-jdk-4.png │ │ ├── download-jdk-5.png │ │ ├── hello-world-txt.png │ │ ├── new-environment.png │ │ ├── system-property.png │ │ ├── java-hello-world.png │ │ └── user-think-javac.png │ ├── maven-project │ │ ├── gitcode.png │ │ ├── modules.png │ │ ├── modules-2.png │ │ ├── modules-3.png │ │ ├── modules-4.png │ │ ├── modules-5.png │ │ ├── modules-6.png │ │ ├── modules-7.png │ │ ├── new-project.png │ │ ├── new-project-2.png │ │ ├── new-project-3.png │ │ ├── new-project-4.png │ │ ├── gitcode-success.png │ │ ├── project-structure.png │ │ └── create-new-project.png │ ├── theme-and-font │ │ ├── face-1.png │ │ ├── face-2.png │ │ ├── face-3.png │ │ ├── font-1.png │ │ ├── font-2.png │ │ ├── editor-1.png │ │ ├── editor-2.png │ │ ├── console-1.png │ │ ├── console-2.png │ │ ├── default-theme.png │ │ ├── editor-font-1.png │ │ └── editor-font-2.png │ ├── index-and-cache │ │ ├── warning.png │ │ └── file-caches-restart.png │ ├── version-control │ │ ├── commit.png │ │ ├── test-git.png │ │ ├── preferences.png │ │ ├── test-github.png │ │ ├── code-analysis.png │ │ ├── common-buttons.png │ │ ├── ignored-files.png │ │ ├── tips-checkout.png │ │ ├── clone-repository.png │ │ ├── mybatis-tutorial.png │ │ ├── git-version-control.png │ │ ├── idea-version-control.png │ │ ├── subversion-general.png │ │ ├── github-version-control.png │ │ ├── settings-version-control.png │ │ ├── check-from-version-control.png │ │ └── import-into-version-control.png │ ├── first-run-idea │ │ ├── customize.png │ │ ├── ui-themes.png │ │ ├── ultimate-over.png │ │ ├── feature-plugins.png │ │ ├── privacy-policy.png │ │ ├── intellij-idea-icon.png │ │ ├── license-activation.png │ │ ├── license-agreement.png │ │ ├── complete-installation.png │ │ └── license-activation-2.png │ ├── plugins │ │ ├── markdown-plugins.png │ │ ├── preferences-plugins.png │ │ ├── test-markdown-plugins.png │ │ └── alibaba-java-coding-guidelines.png │ ├── project-module │ │ ├── more-module.png │ │ ├── new-module.png │ │ ├── new-project.png │ │ ├── more-module-package.png │ │ ├── user-hessian-module.png │ │ └── user-modules-project.png │ ├── core-file-talk │ │ ├── idea-properties.png │ │ ├── idea64-vmoptions.png │ │ └── intellij-idea-bin.png │ ├── modify-user-template │ │ ├── bin-idea.png │ │ ├── settings.png │ │ ├── test-bin-idea.png │ │ ├── test-settings.png │ │ └── default-template.png │ ├── run-maven-springmvc │ │ ├── run-project.png │ │ ├── tomcat-lib-ls.png │ │ ├── gitcode-project.png │ │ ├── http-status-500.png │ │ ├── configuration-tomcat.png │ │ ├── modules-dependencies.png │ │ └── configuration-tomcat-2.png │ ├── debug-skills │ │ ├── debug-common-button.png │ │ ├── evaluate-expression.png │ │ ├── double-click-right-key.png │ │ └── show-breakpoints-control.png │ ├── install-pycharm-on-mac │ │ ├── mac-pycharm.png │ │ ├── pycharm-icon.png │ │ ├── pycharm-over.png │ │ ├── pycharm-web.png │ │ ├── download-pycharm.png │ │ ├── pycharm-activation.png │ │ ├── pycharm-installation.png │ │ └── pycharm-configuration.png │ └── install-intellij-idea-on-windows │ │ ├── download-process.png │ │ ├── intellij-idea-web.png │ │ ├── intellij-idea-setup.png │ │ ├── downloading-intellij-idea.png │ │ ├── intellig-idea-choose-menu.png │ │ ├── intellig-idea-install-over.png │ │ ├── intellig-idea-choose-location.png │ │ ├── intellig-idea-choose-location-d.png │ │ └── intellig-idea-choose-location-next.png └── practical-skills │ ├── color-code │ ├── Gvim.png │ ├── Havenjark.png │ ├── NicePython.png │ ├── Solarized.png │ ├── assignment.png │ ├── idea-theme.png │ ├── preferences.png │ ├── FadeComments.png │ ├── colors-fonts.png │ ├── VibrantUnknown.png │ ├── import-settings.png │ └── GeditForElegantGnome.png │ ├── compare-code │ ├── show-diff.png │ ├── compare-with.png │ ├── local-project.png │ └── show-history.png │ ├── recovery-code │ ├── revert.png │ ├── subversion.png │ ├── equalsAndHD.png │ ├── revert-result.png │ ├── reverted-to-ago.png │ ├── equalsAndHD-system.png │ ├── local-show-history.png │ └── compare-history-current.png │ ├── schedule │ ├── schedule-open.png │ ├── commit-changes.png │ └── schedule-newfile.png │ ├── code-analysis │ ├── subversion.png │ └── code-analysis.png │ ├── conflict-jar │ ├── actual-size.png │ ├── exclude-jar.png │ ├── jar-picture.png │ ├── maven-project.png │ ├── test-exclude-jar.png │ └── show-dependencies.png │ ├── serialVersionUID │ ├── plugins.png │ ├── generate-uid.png │ ├── inspections.png │ ├── preferences.png │ ├── test-generate-uid.png │ └── browse-repositories.png │ ├── solve-garbled-questions │ ├── idea-bin.png │ ├── configurations.png │ ├── idea-vmoptions.png │ └── edit-idea-vmoptions.png │ ├── version-control-color-tips │ ├── success.png │ ├── new-node.png │ ├── preferences.png │ └── version-control.png │ └── the-method-of-remote-debugging-with-idea │ ├── remote.png │ ├── startup.png │ ├── catalina-edit.png │ ├── remote-debug.png │ ├── test-remote-debug.png │ └── edit-configurations.png ├── articles ├── difficult-cases │ ├── .DS_Store │ ├── maven-pom-unrecognized.md │ ├── keymap-delete.md │ ├── java-source.md │ ├── java-launch-helper.md │ └── unable-import-maven-project.md ├── practical-skills │ ├── solve-garbled-questions.md │ ├── code-analysis.md │ ├── schedule.md │ ├── compare-code.md │ ├── version-control-color-tips.md │ ├── conflict-jar.md │ ├── serialVersionUID.md │ ├── recovery-code.md │ ├── color-code.md │ ├── the-method-of-remote-debugging-with-idea.md │ ├── keymap-mac.md │ └── keymap-windows.md ├── basic-course │ ├── index-and-cache.md │ ├── modify-user-template.md │ ├── debug-skills.md │ ├── install-pycharm-on-mac.md │ ├── use-face.md │ ├── compile-method.md │ ├── core-file-talk.md │ ├── install-intellij-idea-on-windows.md │ ├── idea-icon.md │ ├── plugins.md │ ├── first-run-idea.md │ ├── project-module.md │ ├── install-jdk-win10.md │ ├── theme-and-font.md │ ├── maven-project.md │ ├── hello-world.md │ ├── version-control.md │ └── run-maven-springmvc.md └── idea-active-code.md ├── .gitignore ├── LICENSE └── README.md /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /resources/idea-theme/Emacs.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Emacs.jar -------------------------------------------------------------------------------- /resources/idea-theme/Ergo.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Ergo.jar -------------------------------------------------------------------------------- /resources/idea-theme/Gvim.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Gvim.jar -------------------------------------------------------------------------------- /resources/idea-theme/Igor.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Igor.jar -------------------------------------------------------------------------------- /images/difficult-cases/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/.DS_Store -------------------------------------------------------------------------------- /resources/idea-theme/Cobalt.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Cobalt.jar -------------------------------------------------------------------------------- /resources/idea-theme/Pastel.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Pastel.jar -------------------------------------------------------------------------------- /resources/idea-theme/TauCeti.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/TauCeti.jar -------------------------------------------------------------------------------- /articles/difficult-cases/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/articles/difficult-cases/.DS_Store -------------------------------------------------------------------------------- /resources/idea-theme/BlocksDark.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/BlocksDark.jar -------------------------------------------------------------------------------- /resources/idea-theme/BlueHippo.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/BlueHippo.jar -------------------------------------------------------------------------------- /resources/idea-theme/Brackets.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Brackets.jar -------------------------------------------------------------------------------- /resources/idea-theme/Havenjark.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Havenjark.jar -------------------------------------------------------------------------------- /resources/idea-theme/Monokai_2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Monokai_2.jar -------------------------------------------------------------------------------- /resources/idea-theme/NicePython.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/NicePython.jar -------------------------------------------------------------------------------- /resources/idea-theme/Solarized.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Solarized.jar -------------------------------------------------------------------------------- /resources/idea-theme/Sunburst.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Sunburst.jar -------------------------------------------------------------------------------- /resources/idea-theme/Dreamweaver.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Dreamweaver.jar -------------------------------------------------------------------------------- /resources/idea-theme/FadeComments.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/FadeComments.jar -------------------------------------------------------------------------------- /resources/plugins/MavenRunHelper.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/plugins/MavenRunHelper.zip -------------------------------------------------------------------------------- /images/basic-course/idea-icon/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/icons.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/tiny-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/tiny-1.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/tiny-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/tiny-2.png -------------------------------------------------------------------------------- /resources/idea-theme/EasyEyesYellow.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/EasyEyesYellow.jar -------------------------------------------------------------------------------- /resources/idea-theme/Notepad++Like.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/Notepad++Like.jar -------------------------------------------------------------------------------- /resources/idea-theme/SublimeMonoKai.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/SublimeMonoKai.jar -------------------------------------------------------------------------------- /resources/idea-theme/XcodeMidnight.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/XcodeMidnight.jar -------------------------------------------------------------------------------- /images/basic-course/idea-icon/common-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/common-1.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/common-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/common-2.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/common-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/common-3.png -------------------------------------------------------------------------------- /images/basic-course/use-face/tool-show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/tool-show.png -------------------------------------------------------------------------------- /resources/idea-theme/AptanaByAlexmeia.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/AptanaByAlexmeia.jar -------------------------------------------------------------------------------- /resources/idea-theme/DarkFlashBuilder.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/DarkFlashBuilder.jar -------------------------------------------------------------------------------- /resources/idea-theme/TextMateTwilight.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/TextMateTwilight.jar -------------------------------------------------------------------------------- /images/basic-course/compile-method/build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/compile-method/build.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/idea-iml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/idea-iml.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/cmd.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/gitcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/gitcode.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/face-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/face-1.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/face-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/face-2.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/face-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/face-3.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/font-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/font-1.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/font-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/font-2.png -------------------------------------------------------------------------------- /images/basic-course/use-face/idea-begin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/idea-begin.png -------------------------------------------------------------------------------- /images/basic-course/use-face/new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/new-project.png -------------------------------------------------------------------------------- /images/basic-course/use-face/welcome-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/welcome-idea.png -------------------------------------------------------------------------------- /images/difficult-cases/java-source/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-source/.DS_Store -------------------------------------------------------------------------------- /images/practical-skills/color-code/Gvim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/Gvim.png -------------------------------------------------------------------------------- /resources/idea-theme/GeditForElegantGnome.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/GeditForElegantGnome.jar -------------------------------------------------------------------------------- /resources/idea-theme/SublimeMonokaiTrue.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/SublimeMonokaiTrue.jar -------------------------------------------------------------------------------- /images/basic-course/hello-world/hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/hello-world.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/new-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/new-package.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/new-project.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-1.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-2.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-3.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-4.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-5.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-6.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/file-types-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/file-types-7.png -------------------------------------------------------------------------------- /images/basic-course/index-and-cache/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/index-and-cache/warning.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-2.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-3.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-4.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-5.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-6.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/modules-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/modules-7.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/editor-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/editor-1.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/editor-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/editor-2.png -------------------------------------------------------------------------------- /images/basic-course/use-face/new-project-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/new-project-2.png -------------------------------------------------------------------------------- /images/basic-course/use-face/project-go-go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/project-go-go.png -------------------------------------------------------------------------------- /images/basic-course/version-control/commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/commit.png -------------------------------------------------------------------------------- /images/difficult-cases/java-source/modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-source/modules.png -------------------------------------------------------------------------------- /images/difficult-cases/java-source/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-source/project.png -------------------------------------------------------------------------------- /images/difficult-cases/keymap-delete/keymap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/keymap-delete/keymap.png -------------------------------------------------------------------------------- /images/basic-course/compile-method/settings-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/compile-method/settings-1.png -------------------------------------------------------------------------------- /images/basic-course/compile-method/settings-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/compile-method/settings-2.png -------------------------------------------------------------------------------- /images/basic-course/compile-method/settings-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/compile-method/settings-3.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/customize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/customize.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/ui-themes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/ui-themes.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/com-hit-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/com-hit-demo.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/data-sources-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/data-sources-1.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/data-sources-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/data-sources-2.png -------------------------------------------------------------------------------- /images/basic-course/idea-icon/data-sources-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/idea-icon/data-sources-3.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/accept.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/system.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/unaccept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/unaccept.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/new-project.png -------------------------------------------------------------------------------- /images/basic-course/plugins/markdown-plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/plugins/markdown-plugins.png -------------------------------------------------------------------------------- /images/basic-course/project-module/more-module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/more-module.png -------------------------------------------------------------------------------- /images/basic-course/project-module/new-module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/new-module.png -------------------------------------------------------------------------------- /images/basic-course/project-module/new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/new-project.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/console-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/console-1.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/console-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/console-2.png -------------------------------------------------------------------------------- /images/basic-course/version-control/test-git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/test-git.png -------------------------------------------------------------------------------- /images/difficult-cases/java-source/error-jdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-source/error-jdk.png -------------------------------------------------------------------------------- /images/difficult-cases/keymap-delete/tools-vim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/keymap-delete/tools-vim.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/Havenjark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/Havenjark.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/NicePython.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/NicePython.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/Solarized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/Solarized.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/assignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/assignment.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/idea-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/idea-theme.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/preferences.png -------------------------------------------------------------------------------- /images/practical-skills/compare-code/show-diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/compare-code/show-diff.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/revert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/revert.png -------------------------------------------------------------------------------- /images/practical-skills/schedule/schedule-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/schedule/schedule-open.png -------------------------------------------------------------------------------- /resources/idea-theme/VibrantUnknown(Darcula).jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/resources/idea-theme/VibrantUnknown(Darcula).jar -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/ultimate-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/ultimate-over.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/create-new-class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/create-new-class.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/new-project-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/new-project-next.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/welcome-to-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/welcome-to-idea.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/edit-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/edit-path.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/oracle-jdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/oracle-jdk.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/new-project-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/new-project-2.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/new-project-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/new-project-3.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/new-project-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/new-project-4.png -------------------------------------------------------------------------------- /images/basic-course/plugins/preferences-plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/plugins/preferences-plugins.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/default-theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/default-theme.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/editor-font-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/editor-font-1.png -------------------------------------------------------------------------------- /images/basic-course/theme-and-font/editor-font-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/theme-and-font/editor-font-2.png -------------------------------------------------------------------------------- /images/basic-course/use-face/toolbar-toolbuttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/use-face/toolbar-toolbuttons.png -------------------------------------------------------------------------------- /images/basic-course/version-control/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/preferences.png -------------------------------------------------------------------------------- /images/basic-course/version-control/test-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/test-github.png -------------------------------------------------------------------------------- /images/difficult-cases/keymap-delete/choose-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/keymap-delete/choose-code.png -------------------------------------------------------------------------------- /images/practical-skills/code-analysis/subversion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/code-analysis/subversion.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/FadeComments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/FadeComments.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/colors-fonts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/colors-fonts.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/actual-size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/actual-size.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/exclude-jar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/exclude-jar.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/jar-picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/jar-picture.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/subversion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/subversion.png -------------------------------------------------------------------------------- /images/practical-skills/schedule/commit-changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/schedule/commit-changes.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/plugins.png -------------------------------------------------------------------------------- /images/basic-course/core-file-talk/idea-properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/core-file-talk/idea-properties.png -------------------------------------------------------------------------------- /images/basic-course/core-file-talk/idea64-vmoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/core-file-talk/idea64-vmoptions.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/feature-plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/feature-plugins.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/privacy-policy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/privacy-policy.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/hello-world-class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/hello-world-class.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/hello-world-go-go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/hello-world-go-go.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/new-project-finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/new-project-finish.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/environment.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/gitcode-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/gitcode-success.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/project-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/project-structure.png -------------------------------------------------------------------------------- /images/basic-course/modify-user-template/bin-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/modify-user-template/bin-idea.png -------------------------------------------------------------------------------- /images/basic-course/modify-user-template/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/modify-user-template/settings.png -------------------------------------------------------------------------------- /images/basic-course/plugins/test-markdown-plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/plugins/test-markdown-plugins.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/run-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/run-project.png -------------------------------------------------------------------------------- /images/basic-course/version-control/code-analysis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/code-analysis.png -------------------------------------------------------------------------------- /images/basic-course/version-control/common-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/common-buttons.png -------------------------------------------------------------------------------- /images/basic-course/version-control/ignored-files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/ignored-files.png -------------------------------------------------------------------------------- /images/basic-course/version-control/tips-checkout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/tips-checkout.png -------------------------------------------------------------------------------- /images/difficult-cases/java-launch-helper/idea-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-launch-helper/idea-help.png -------------------------------------------------------------------------------- /images/practical-skills/code-analysis/code-analysis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/code-analysis/code-analysis.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/VibrantUnknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/VibrantUnknown.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/import-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/import-settings.png -------------------------------------------------------------------------------- /images/practical-skills/compare-code/compare-with.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/compare-code/compare-with.png -------------------------------------------------------------------------------- /images/practical-skills/compare-code/local-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/compare-code/local-project.png -------------------------------------------------------------------------------- /images/practical-skills/compare-code/show-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/compare-code/show-history.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/maven-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/maven-project.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/equalsAndHD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/equalsAndHD.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/revert-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/revert-result.png -------------------------------------------------------------------------------- /images/practical-skills/schedule/schedule-newfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/schedule/schedule-newfile.png -------------------------------------------------------------------------------- /images/basic-course/core-file-talk/intellij-idea-bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/core-file-talk/intellij-idea-bin.png -------------------------------------------------------------------------------- /images/basic-course/debug-skills/debug-common-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/debug-skills/debug-common-button.png -------------------------------------------------------------------------------- /images/basic-course/debug-skills/evaluate-expression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/debug-skills/evaluate-expression.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/intellij-idea-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/intellij-idea-icon.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/license-activation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/license-activation.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/license-agreement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/license-agreement.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/download-jdk-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/download-jdk-1.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/download-jdk-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/download-jdk-2.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/download-jdk-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/download-jdk-3.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/download-jdk-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/download-jdk-4.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/download-jdk-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/download-jdk-5.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/hello-world-txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/hello-world-txt.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/new-environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/new-environment.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/system-property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/system-property.png -------------------------------------------------------------------------------- /images/basic-course/maven-project/create-new-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/maven-project/create-new-project.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/tomcat-lib-ls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/tomcat-lib-ls.png -------------------------------------------------------------------------------- /images/basic-course/version-control/clone-repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/clone-repository.png -------------------------------------------------------------------------------- /images/basic-course/version-control/mybatis-tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/mybatis-tutorial.png -------------------------------------------------------------------------------- /images/difficult-cases/java-launch-helper/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-launch-helper/preferences.png -------------------------------------------------------------------------------- /images/difficult-cases/maven-pom-unrecognized/pom-xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/maven-pom-unrecognized/pom-xml.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/test-exclude-jar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/test-exclude-jar.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/reverted-to-ago.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/reverted-to-ago.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/generate-uid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/generate-uid.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/inspections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/inspections.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/preferences.png -------------------------------------------------------------------------------- /images/basic-course/debug-skills/double-click-right-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/debug-skills/double-click-right-key.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/complete-installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/complete-installation.png -------------------------------------------------------------------------------- /images/basic-course/first-run-idea/license-activation-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/first-run-idea/license-activation-2.png -------------------------------------------------------------------------------- /images/basic-course/index-and-cache/file-caches-restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/index-and-cache/file-caches-restart.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/java-hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/java-hello-world.png -------------------------------------------------------------------------------- /images/basic-course/install-jdk-win10/user-think-javac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-jdk-win10/user-think-javac.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/mac-pycharm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/mac-pycharm.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-icon.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-over.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-web.png -------------------------------------------------------------------------------- /images/basic-course/modify-user-template/test-bin-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/modify-user-template/test-bin-idea.png -------------------------------------------------------------------------------- /images/basic-course/modify-user-template/test-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/modify-user-template/test-settings.png -------------------------------------------------------------------------------- /images/basic-course/project-module/more-module-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/more-module-package.png -------------------------------------------------------------------------------- /images/basic-course/project-module/user-hessian-module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/user-hessian-module.png -------------------------------------------------------------------------------- /images/basic-course/project-module/user-modules-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/project-module/user-modules-project.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/gitcode-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/gitcode-project.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/http-status-500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/http-status-500.png -------------------------------------------------------------------------------- /images/basic-course/version-control/git-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/git-version-control.png -------------------------------------------------------------------------------- /images/basic-course/version-control/idea-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/idea-version-control.png -------------------------------------------------------------------------------- /images/basic-course/version-control/subversion-general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/subversion-general.png -------------------------------------------------------------------------------- /images/difficult-cases/java-launch-helper/console-fold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-launch-helper/console-fold.png -------------------------------------------------------------------------------- /images/practical-skills/color-code/GeditForElegantGnome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/color-code/GeditForElegantGnome.png -------------------------------------------------------------------------------- /images/practical-skills/conflict-jar/show-dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/conflict-jar/show-dependencies.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/equalsAndHD-system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/equalsAndHD-system.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/local-show-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/local-show-history.png -------------------------------------------------------------------------------- /images/practical-skills/solve-garbled-questions/idea-bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/solve-garbled-questions/idea-bin.png -------------------------------------------------------------------------------- /images/basic-course/compile-method/run-debug-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/compile-method/run-debug-configuration.png -------------------------------------------------------------------------------- /images/basic-course/debug-skills/show-breakpoints-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/debug-skills/show-breakpoints-control.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/hide-empty-middle-package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/hide-empty-middle-package.png -------------------------------------------------------------------------------- /images/basic-course/modify-user-template/default-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/modify-user-template/default-template.png -------------------------------------------------------------------------------- /images/basic-course/plugins/alibaba-java-coding-guidelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/plugins/alibaba-java-coding-guidelines.png -------------------------------------------------------------------------------- /images/basic-course/version-control/github-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/github-version-control.png -------------------------------------------------------------------------------- /images/difficult-cases/java-launch-helper/idea-no-launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/java-launch-helper/idea-no-launcher.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/test-generate-uid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/test-generate-uid.png -------------------------------------------------------------------------------- /images/practical-skills/version-control-color-tips/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/version-control-color-tips/success.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/compact-empty-middle-packge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/compact-empty-middle-packge.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/create-project-from-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/create-project-from-template.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/select-home-directory-for-jdk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/select-home-directory-for-jdk.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/download-pycharm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/download-pycharm.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-activation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-activation.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/configuration-tomcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/configuration-tomcat.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/modules-dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/modules-dependencies.png -------------------------------------------------------------------------------- /images/basic-course/version-control/settings-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/settings-version-control.png -------------------------------------------------------------------------------- /images/difficult-cases/unable-import-maven-project/event-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/unable-import-maven-project/event-log.png -------------------------------------------------------------------------------- /images/difficult-cases/unable-import-maven-project/show-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/unable-import-maven-project/show-log.png -------------------------------------------------------------------------------- /images/practical-skills/recovery-code/compare-history-current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/recovery-code/compare-history-current.png -------------------------------------------------------------------------------- /images/practical-skills/serialVersionUID/browse-repositories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/serialVersionUID/browse-repositories.png -------------------------------------------------------------------------------- /images/practical-skills/version-control-color-tips/new-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/version-control-color-tips/new-node.png -------------------------------------------------------------------------------- /images/basic-course/hello-world/select-home-directory-for-jdk-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/hello-world/select-home-directory-for-jdk-2.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-installation.png -------------------------------------------------------------------------------- /images/basic-course/run-maven-springmvc/configuration-tomcat-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/run-maven-springmvc/configuration-tomcat-2.png -------------------------------------------------------------------------------- /images/basic-course/version-control/check-from-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/check-from-version-control.png -------------------------------------------------------------------------------- /images/basic-course/version-control/import-into-version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/version-control/import-into-version-control.png -------------------------------------------------------------------------------- /images/difficult-cases/maven-pom-unrecognized/as-maven-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/maven-pom-unrecognized/as-maven-project.png -------------------------------------------------------------------------------- /images/difficult-cases/unable-import-maven-project/maven-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/unable-import-maven-project/maven-config.png -------------------------------------------------------------------------------- /images/practical-skills/solve-garbled-questions/configurations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/solve-garbled-questions/configurations.png -------------------------------------------------------------------------------- /images/practical-skills/solve-garbled-questions/idea-vmoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/solve-garbled-questions/idea-vmoptions.png -------------------------------------------------------------------------------- /images/practical-skills/version-control-color-tips/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/version-control-color-tips/preferences.png -------------------------------------------------------------------------------- /images/basic-course/install-pycharm-on-mac/pycharm-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-pycharm-on-mac/pycharm-configuration.png -------------------------------------------------------------------------------- /images/practical-skills/version-control-color-tips/version-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/version-control-color-tips/version-control.png -------------------------------------------------------------------------------- /images/practical-skills/solve-garbled-questions/edit-idea-vmoptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/solve-garbled-questions/edit-idea-vmoptions.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/download-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/download-process.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellij-idea-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellij-idea-web.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/remote.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellij-idea-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellij-idea-setup.png -------------------------------------------------------------------------------- /images/difficult-cases/unable-import-maven-project/unable-create-injector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/unable-import-maven-project/unable-create-injector.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/startup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/startup.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/downloading-intellij-idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/downloading-intellij-idea.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-menu.png -------------------------------------------------------------------------------- /images/difficult-cases/unable-import-maven-project/unable-import-maven-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/difficult-cases/unable-import-maven-project/unable-import-maven-project.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/catalina-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/catalina-edit.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/remote-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/remote-debug.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellig-idea-install-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellig-idea-install-over.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/test-remote-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/test-remote-debug.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-d.png -------------------------------------------------------------------------------- /images/practical-skills/the-method-of-remote-debugging-with-idea/edit-configurations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/practical-skills/the-method-of-remote-debugging-with-idea/edit-configurations.png -------------------------------------------------------------------------------- /images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guobinhit/intellij-idea-tutorial/HEAD/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-next.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | *.jar 19 | *.class 20 | 21 | ### NetBeans ### 22 | /nbproject/private/ 23 | /build/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | **/target/ 29 | 30 | *.DS_Store 31 | -------------------------------------------------------------------------------- /articles/difficult-cases/maven-pom-unrecognized.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 遇到 Maven 项目 pom.xml 文件没有识别的解决方法 2 | 3 | ## 问题现象 4 | 5 | 有的时候,我们可能会遇到 IDEA 没有识别 Maven 项目`pom.xml`的问题,其表现出来的现象就是: 6 | 7 | ![pom-xml](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/maven-pom-unrecognized/pom-xml.png) 8 | 9 | 究其原因,就是 IDEA 把`pom.xml`文件当成了普通的`xml`格式文件。 10 | 11 | ## 解决方法 12 | 13 | 这个问题的解决方法比较简单,IDEA 已经提供了相应的功能。 14 | 15 | ![as-maven-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/maven-pom-unrecognized/as-maven-project.png) 16 | 17 | 如上图所示,鼠标右键点击`pom.xml`文件,呼出菜单栏,点击上图标记出来的`Add as Maven Project`按钮即可。 18 | 19 | 20 | ---------- 21 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Charies Gavin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /articles/difficult-cases/keymap-delete.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 遇到快捷键以及删除键不好使的解决方法 2 | 3 | ## 问题背景 4 | 5 | 在 IntelliJ IDEA 的使用过程中,尤其是在我们安装后首次使用的时候,我们可以会遇到两个问题: 6 | 7 | - **常用的快捷键不好使** 8 | - **选中多行代码,按删除键不好使** 9 | 10 | ![choose-code](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/keymap-delete/choose-code.png) 11 | 12 | 如上图所示,这就是选中了多行代码,但按删除键不好使的情况。 13 | 14 | 15 | ## 解决方法 16 | ### 第一个问题:快捷键不好使 17 | 18 | 对于这个问题,常见于我们首次安装 IDEA,其默认的快捷键模式并不一定是我们习惯的,因此修改快捷键模式即可。 19 | 20 | ![keymap](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/keymap-delete/keymap.png) 21 | 22 | 如上图所示,依次进入`IntelliJ IDEA -> Preferences -> Keymap`配置页面,然后选择我们常用的快捷键模式就可以了。 23 | 24 | ### 第二个问题:删除键不好使 25 | 26 | 对于这个问题,实际上,它并不一定是问题,因为在我们选择了不同的编辑模式后,就有可能出现快捷键以及删除键“不好使”的情况。 27 | 28 | ![tools-vim](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/keymap-delete/tools-vim.png) 29 | 30 | 如上图所示,我们设置了`Vim Emulator`编辑模式,这时我们常用的非`vim`编辑器模式下的快捷键自然也就是失效了。 31 | 32 | 既然我们知道了出现问题的原因,那么通过`Tools`菜单栏取消该编辑模式即可。 33 | 34 | ---------- 35 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 36 | -------------------------------------------------------------------------------- /articles/practical-skills/solve-garbled-questions.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 控制台输出中文乱码问题的解决方法 2 | 3 | 首先,找到 IntelliJ IDEA 的安装目录,进入`bin`目录下,定位到`idea.vmoptions`文件,如下图所示: 4 | 5 | ![idea-bin](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/solve-garbled-questions/idea-bin.png) 6 | 7 | 双击打开`idea.vmoptions`文件,如下图所示: 8 | 9 | ![idea-vmoptions](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/solve-garbled-questions/idea-vmoptions.png) 10 | 11 | 然后,在其中追加`-Dfile.encoding=UTF-8`代码,如下图所示: 12 | 13 | ![edit-idea-vmoptions](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/solve-garbled-questions/edit-idea-vmoptions.png) 14 | 15 | 最后,在 IntelliJ IDEA 中的`Run/Debug Configurations`中,修改虚拟机参数`VM options`,内容与在文件`idea.vmoptions`中追加的内容相同,皆为`-Dfile.encoding=UTF-8`,具体如下图所示: 16 | 17 | ![configurations](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/solve-garbled-questions/configurations.png) 18 | 19 | 到这里,IntelliJ IDEA 控制台输出中文乱码的问题就得到解决啦! 20 | 21 | 22 | 23 | ---------- 24 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 25 | -------------------------------------------------------------------------------- /articles/difficult-cases/java-source.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 遇到 java -source 1.3 中不支持某某操作的解决方法 2 | 3 | ## 问题背景 4 | 在一个新的 Mac Pro 电脑中,安装 IntelliJ IDEA,并且配置了 JDK 1.8,打开测试项目,运行后,报出如下问题: 5 | 6 | ![error-jdk](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-source/error-jdk.png) 7 | 8 | 通过问题描述,显然 IDEA 并没有使用我配置的 JDK 1.8,而是使用了 JDK 1.3,这是为什么呢? 9 | 10 | 实际上,IDEA 默认是使用 JDK 1.3 进行编译,而在配置 JDK 的时候,我们有可能忽然了该配置。 11 | 12 | ## 解决方法 13 | ### 方法一 14 | 15 | - `File -> Project Structure -> Modules` 16 | 17 | ![modules](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-source/modules.png) 18 | 19 | 如上图所示,进入该目录,修改当前模块的`Language level`,默认为`1.3`,修改为`8`即可。 20 | 21 | ### 方法二 22 | 23 | - `File -> Project Structure -> Project` 24 | 25 | ![project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-source/project.png) 26 | 27 | 如上图所示,进入该目录,修改当前项目的`Language level`,默认为`1.3`,修改为`8`即可。 28 | 29 | 无论是 **方法一** 还是 **方法二**,都是修改默认的`Language level`,其区别就是一个是对当前模块生效,一个是对当前项目生效。而有时,因为某种需要,我们可能会在一个项目里面建立多个模块,当然,常见的还是单模块项目。 30 | 31 | 32 | 33 | ---------- 34 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 35 | -------------------------------------------------------------------------------- /articles/practical-skills/code-analysis.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 提交代码前的 Code Analysis 机制 2 | 3 | 在我们用 IntelliJ IDEA 向 SVN 或者 Git 提交代码的时候,IntelliJ IDEA 提供了一个自动分析代码的功能,即`Perform code analysis`: 4 | 5 | ![subversion](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/code-analysis/subversion.png) 6 | 7 | 如上图所示,当我们勾选`Perform code analysis`之后,点击`commit`,IntelliJ IDEA 就会在提交代码之前对项目的代码进行分析检查,并将检查结果以错误和警告的形式展示出来: 8 | 9 | ![code-analysis](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/code-analysis/code-analysis.png) 10 | 11 | 如上图所示,这是`Code Analysis`的结果示例,为`No errors and 6 warnings`. 如果我们想进一步查看`Code Analysis`的结果,即`errors`和`warnings`的详情,可以点击`Review`,点击`Review`之后, IntelliJ IDEA 会展示出一系列具体发生错误和警告的类及位置,这有助于我们解决问题。 12 | 13 | 在这里,有一点需要着重说明,那就是:**IntelliJ IDEA 的`Code Analysis`机制比较敏感,就算我们在文本注释中用错了标签或者注释时方法的参数与实际参数不一致,在`Code Analysis`的时候,都会以错误和警告的形式给出**。因此我们常常会遇到这样的情况,就算代码中一点错误(提示)都没有(至少看起来是这样,没有飘红啊),当我们提交代码并进行`Code Analysis`的时候,仍然会收到一大堆的错误和警告提示,虽然这些错误和警告并不影响代码的运行。 14 | 15 | 此外,在我们提交代码之前和之后都可以利用 IntelliJ IDEA 的自动化机制执行一些操作,例如勾选: 16 | 17 | - `Reformat code`,提交代码之前对代码进行格式化; 18 | - `Optimize imports`,提交代码之前对代码进行导入包的优化; 19 | - `Upload files`,提交代码之后上传文件。 20 | - …… 21 | 22 | IntelliJ IDEA 还有很多功能等待我们去探索,接触的越多,我们越能发现她的优雅。 23 | 24 | ---------- 25 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](http://blog.csdn.net/qq_35246620/article/details/61191375) —— ☆☆☆ ———— 26 | -------------------------------------------------------------------------------- /articles/practical-skills/schedule.md: -------------------------------------------------------------------------------- 1 | # 关于 IntelliJ IDEA 中 Schedule for Addition 的问题 2 | 3 | 在我们使用 IntelliJ IDEA 的时候,经常会遇到这种情况,即: 4 | 5 | - 从 SVN 检出项目之后,并用 IDEA 首次打开项目,IDEA 会弹出如下选择框: 6 | 7 | 8 | ![schedule-open](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/schedule/schedule-open.png) 9 | 10 | 如上图所示,让我们选择是否将`XXX.iml`文件添加到 SVN 版本中。在这里,我们唯一有些疑惑的就是`XXX.iml`文件是什么鬼?在项目中,原本并就没有这个文件啊!实际上,`XXX.iml`文件是 IDEA 自动为我们(首次)打开的项目生成的配置文件,例如我们的项目名为`accounting-hessian`,那么 IDEA 就自动为我们的项目生产了一个名为`accounting-hessian.iml`的配置文件。 11 | 12 | 无论我们选择`No`还是`Yes`,IDEA 都会自动在项目中添加此配置文件,两者的区别就在于:如果我们选择`No`,那么在我们向 SVN 提交代码的时候,IDEA 在检索项目版本变更的时候会自动忽略此文件;如果我们选择`Yes`,那么在我们向 SVN 提交代码的时候,IDEA 会将其添加到项目的版本变更中。同理,当我们在项目中新建文件时,IDEA 也会弹出选择框: 13 | 14 | ![schedule-newfile](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/schedule/schedule-newfile.png) 15 | 16 | 如上图所示,当我们创建了一个名为`IdeaTest`的 Java 类的时候,IDEA 给出了同样的提示。当然,前提是我们并没有选择`Remember,don't ask again`,如果勾选了此内容,则不会再给出提示,并默认我们当时的选择。最后,我们尝试提交代码,测试 IDEA 的表现: 17 | 18 | ![commit-changes](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/schedule/commit-changes.png) 19 | 20 | 如上图所示,当我们对第一次弹框选择了`No`,对第二个弹框选择了`Yes`,则在提交代码的时候,IDEA 忽略了自动创建的`XXX.iml`文件,并将我们创建的`IdeaTest`包含进了项目的版本变更之中。此外,观察右下角的`New:1 Unversioned: 0 of 174`,我们也能看出来 IDEA 的检索结果,仅显示了一个`New`,即新建了一个文件。 21 | 22 | 23 | ---------- 24 | 25 | **温馨提示**:对于 IDEA 自动生成的`XXX.iml`配置文件,强烈建议不要随代码一起提交到 SVN! 26 | 27 | -------------------------------------------------------------------------------- /articles/practical-skills/compare-code.md: -------------------------------------------------------------------------------- 1 | # 利用 IntelliJ IDEA 进行代码对比的方法 2 | 3 | Sometimes,我们会有这样的需求,即:**想对比出两个不同版本代码的区别**。如何实现? 4 | 5 | - **第 1 种**:如果我们是从 SVN 检出的项目,并且想比较本地代码与从 SVN 检出时的代码相比都有那些区别,可以按如下步骤操作, 6 | 7 | ![show-history](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/compare-code/show-history.png) 8 | 9 | 如上图所示,在代码编辑区,`右键`唤出功能菜单,然后选择`Subversion`,进而会展示出更多的可选项,例如: 10 | 11 | - `Compare with the Same Repository Version`,与 SVN 仓库相同版本做对比; 12 | - `Compare with Latest Repository Version`,与 SVN 仓库最新版本做对比; 13 | - `Compare with...`,点击后选择本分支的不同版本做对比; 14 | - `Compare with Branch`,点击后需要先配置具体要对比的分支,然后与指定分支做比对; 15 | - `Show History`,同`Compare with...`类似,只不过是先展示出此分支的版本历史。 16 | 17 | 通过上述方法,已经可以满足我们比较线上分支代码的需求啦! 18 | 19 | - **第 2 种**:比较本地两份代码的区别,可以按如下步骤操作, 20 | 21 | ![compare-with](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/compare-code/compare-with.png) 22 | 23 | 首先,选中目标文件夹(图中选择`src`文件夹),`右键`唤出功能菜单,然后点击`Compare With`: 24 | 25 | ![local-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/compare-code/local-project.png) 26 | 27 | 如上图所示,选中本地另一份想要与之对比的代码的相同目录,然后点击`Open`或者`打开`、`确定`按钮: 28 | 29 | ![show-diff](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/compare-code/show-diff.png) 30 | 31 | 如上图所示,清晰明了的展示了两份代码的区别。 32 | 33 | ---------- 34 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 35 | -------------------------------------------------------------------------------- /articles/practical-skills/version-control-color-tips.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 版本控制不显示颜色提示的解决方法 2 | 3 | 在使用 IntelliJ IDEA 版本控制功能的时候,有一个功能点特别好,那就是对于新增文件或者修改文件,IDEA 会给出颜色提示,以区分文件类型,如新增、修改或者未加入版本控制。但偶尔会出现导入新`check out`到本地的项目的时候,不显示颜色提示的问题! 4 | 5 | ![new-node](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/version-control-color-tips/new-node.png) 6 | 7 | 如上图所示,这是一个基于 Git 进行版本控制的名为`leetcodes`的项目。我们新建了一个名为`NewNode`的类文件,但是未显示任何颜色提示,以区分新增文件和原有文件的区别,即是否与远程仓库中的文件版本一致。现在,我们就来解决这个问题。 8 | 9 | ![preferences](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/version-control-color-tips/preferences.png) 10 | 11 | 如上图所示,以 Mac 版本的 IDEA 为例,点击`ItelliJ IDEA -> Preferences`按钮。 12 | 13 | ![version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/version-control-color-tips/version-control.png) 14 | 15 | - **标注 1**:`Version Control`,版本控制按钮; 16 | - **标注 2**:未注册的项目根路径; 17 | - **标注 3**:`Add`,新增按钮,即注册版本控制; 18 | - **标注 4**:`Apply`,应用设置按钮。 19 | 20 | 如上图所示,进入`Preferences`页面,按顺序点击 **标注 1 ~ 4**,将未出注册到版本控制的项目根路径注册到 IDEA 的版本控制中,即可解决本文所述的问题。 21 | 22 | ![success](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/version-control-color-tips/success.png) 23 | 24 | 如上图所示,IDEA 的版本控制提示已经启动。 25 | 26 | 特别地,在上述操作中,有可能出现`Schedule for Addition`的问题,详见「[此篇](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/schedule.md)」文章。 27 | 28 | 29 | -------- 30 | 31 | 32 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 33 | -------------------------------------------------------------------------------- /articles/practical-skills/conflict-jar.md: -------------------------------------------------------------------------------- 1 | # 详述使用 IntelliJ IDEA 解决 jar 包冲突的问题 2 | 3 | 在实际的 Maven 项目开发中,由于项目引入的依赖过多,遇到 jar 冲突算是一个很常见的问题了。在本文中,我们就一起来看看,如何使用 IntelliJ IDEA 解决 jar 包冲突的问题!简单粗暴,直接上示例: 4 | 5 | ![maven-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/maven-project.png) 6 | 7 | - **标注 1**: `Maven Project`,Maven 项目选项; 8 | - **标注 2**:`Dependencies`,项目依赖; 9 | - **标注 3**:`Show Dependencies`,展示项目依赖图。 10 | 11 | 其中,只有在点击 **标注 2** 所示的`Dependencies`之后,才会显示 **标注 3** 所示的`Show Dependencies`按钮。在这里,我们点击`Show Dependencies`按钮: 12 | 13 | ![show-dependencies](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/show-dependencies.png) 14 | 15 | 如上图所示,展示了我们项目的依赖图。But,依赖图太小了,根本没法看啊?好办,点击鼠标右键,呼出右键菜单栏,然后点击`Actual Size`: 16 | 17 | ![actual-size](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/actual-size.png) 18 | 19 | 如上图所示,项目依赖图的尺寸放大了,这回利于我们排除 jar 包冲突的问题啦! 20 | 21 | ![jar-picture](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/jar-picture.png) 22 | 23 | 如果我们仔细观察上图,会发现在项目依赖图中,有一些红色标记的线,实际上,这些红色标记出来的线所指向的 jar 包,就是项目中冲突的 jar 包!且在我们点击 jar 包之后,还会显示出多条指向 jar 包的红色虚线,其代表着该 jar 包被多次引用,及具体引用路径。 24 | 25 | ![exclude-jar](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/exclude-jar.png) 26 | 27 | 如上图所示,想要排除冲突的 jar 包,其方法为:**点击冲突的 jar 包,右键呼出菜单栏,点击`Exclude`选项**。 28 | 29 | ![test-exclude-jar](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/conflict-jar/test-exclude-jar.png) 30 | 31 | 如上图所示,在排除冲突的 jar 包之后,`pom.xml`文件会自动更新,添加排除语句。 32 | 33 | 34 | 35 | ---------- 36 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 37 | -------------------------------------------------------------------------------- /articles/basic-course/index-and-cache.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 缓存和索引的介绍及清理方法 2 | 3 | 在博文「[详述 IntelliJ IDEA 的使用界面](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/use-face.md)」中,博主说过这样一句话“**对于首次创建或打开的新项目,IntelliJ IDEA 都会创建项目索引,大型项目在创建索引的过程中可能会出现卡顿的现象,因此强烈建议在 IntelliJ IDEA 创建索引的过程中不要动项目**。”那么,索引到底是干什么用的呢?在本篇博文中,就让我们一起了解索引的用途,对了,还有缓存。 4 | 5 | IntelliJ IDEA 的缓存和索引主要是用来加快文件查询的速度,从而提高各种查找、代码提示等操作的速度,因此索引对 IntelliJ IDEA 的高效性来说,具有至关重要的作用。但是,IntelliJ IDEA 的缓存和索引并不一定总是起到积极的作用,有的时候,反而会因为缓存和索引的损坏,例如突然断电、蓝屏引起的强制关机等等,造成 IntelliJ IDEA 出现一些莫名其妙的问题,例如项目打不开、个性化设置还原等等。现在,大家不用愁了,接下来,就让我们一起看一看如何清理缓存和索引: 6 | 7 | ![file-caches-restart](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/index-and-cache/file-caches-restart.png) 8 | 9 | 如上图所示,`File`下的`Invalidate Caches / Restart`就是清理缓存和索引的入口,表示“**无效缓存或者重新启动**”,点击进入如下界面: 10 | 11 | ![warning](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/index-and-cache/warning.png) 12 | 13 | - **标注 1**:无效并重启; 14 | - **标注 2**:无效缓存; 15 | - **标注 3**:重新启动; 16 | - **标注 4**:警告提示。 17 | 18 | 如上图所示,一般建议点击` Invalidate and Restart`,这样会清理的比较干净。但是,有一点需要注意,那就是:**标记 4** 所示的`WARNING`表示如果我们选择清理缓存和索引,那么 IntelliJ IDEA 的`Local History`也会被一并清理掉。因此,如果我们的项目没有加入到版本控制,而我们又需要项目文件的历史更改记录,那最好备份下该目录,其地址为`C:\Users\当前登录的系统用户名\\.IntelliJIdea\system\LocalHistory`。 19 | 20 | 通过上面的方式清除缓存和索引的本质其实就是删除`C`盘下的`system`目录下的对应的文件,因此如果我们不用上述的方法,也可以直接删除整个`system`目录,这样的话,当 IntelliJ IDEA 再次启动项目的时候就会重新创建新的`system`目录以及对应项目缓存和索引。如果我们遇到了因为缓存或者索引出现问题以至于打不开项目的时候,建议直接删除`system`目录,一般这样都可以很好地解决我们的问题。 21 | 22 | 此外,还有一点需要我们注意,那就是:**在安装 IntelliJ IDEA 的时候,默认是不启用`system`目录的,因此想要记录`Local History`,就得我们手动设置啦**!具体如何设置,可以参考「[IntelliJ IDEA 安装目录的核心文件讲解](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/core-file-talk.md)」这篇文章。 23 | 24 | 25 | 26 | ---------- 27 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 28 | 29 | -------------------------------------------------------------------------------- /articles/difficult-cases/java-launch-helper.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 遇到 JavaLaunchHelper 多种实现的解决方法 2 | 3 | ## 问题背景 4 | 5 | 在 IntelliJ IDEA 中,运行项目,报出如下问题: 6 | 7 | > objc[2150]: Class JavaLaunchHelper is implemented in both 8 | > /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/java (0x1081bc4c0) and 9 | > /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1091d44e0). 10 | > One of the two will be used. Which one is undefined. 11 | 12 | 该问题主要出现于 Mac 版本的 IntelliJ IDEA 之中,而引起该问题的原因,则是 Mac 中 JDK 的一个 BUG,它是由启动应用程序时 IDE 使用的 Java 代理触发的,此警告是无害的,我们可以安全地忽略,并且该问题已经在后续的 JDK 中得到了解决。 13 | 14 | 但如果我们在实际的开发中遇到了该问题,我们可以通过下面的两种方法进行解决。 15 | 16 | ## 解决方法 17 | ### 方法一 18 | 19 | 既然该问题是由于 IDEA 启用代理引起的,那么我们禁止 IDEA 启动代理,即可解决该问题。 20 | 21 | ![idea-help](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-launch-helper/idea-help.png) 22 | 23 | 如上图所示,依次点击`Help -> Edit Custom Properties`,打开`idea.properties`配置文件。 24 | 25 | ![idea-no-launcher](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-launch-helper/idea-no-launcher.png) 26 | 27 | 如上图所示,在`idea.properties`配置文件添加`idea.no.launcher=true`语句,即可禁止 IDEA 启用代理,**该配置会在重启 IDEA 后生效**。 28 | 29 | ### 方法二 30 | 31 | 如果我们不想为了修复一条无害的警告消息而禁止 IDEA 启用代理,我们可以选择将此消息折叠,即隐藏起来。 32 | 33 | ![preferences](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-launch-helper/preferences.png) 34 | 35 | 如上图所示,依次点击`IntelliJ IDEA -> Preferences`,进入`Preferences`配置页面。 36 | 37 | ![console-fold](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/java-launch-helper/console-fold.png) 38 | 39 | 如上图所示,选择`Editor -> General -> Console`,进行`Console` 配置页面。 40 | 41 | 在此页面,点击标注的`+`按钮,将`Class JavaLaunchHelper is implemented in both`这条语句配置上,点击`Apply`后,即可生效。 42 | 43 | 44 | 45 | ---------- 46 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 47 | -------------------------------------------------------------------------------- /articles/basic-course/modify-user-template.md: -------------------------------------------------------------------------------- 1 | # 修改 IntelliJ IDEA 模板注释的内容 2 | 3 | 在博文「[设置 IntelliJ IDEA 主题和字体的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/theme-and-font.md)」中,我们进一步了解了 IntelliJ IDEA 的个性化设置功能,包括主题和字体的常用设置等,修改后,具体的效果,如下图所示: 4 | 5 | ![default-template](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/modify-user-template/default-template.png) 6 | 7 | 观察上图,不知道大家有没有注意到:IntelliJ IDEA 自带模板注释的功能。如上图所示,在创建 Java 类的时候,其自带的模板注释内容如下: 8 | 9 | ``` 10 | /** 11 | * Created by think on 2017/3/16. 12 | */ 13 | ``` 14 | 查看`Settings`之后,我们会发现,其内容来自于: 15 | 16 | ``` 17 | /** 18 | * Created by ${USER} on ${DATE}. 19 | */ 20 | ``` 21 | * `${USER}`:表示主机名; 22 | * `${DATE}`:表示创建文件的时间。 23 | 24 | 两者相对比,我们发现:`${USER}`被设置成了`think`;`${DATE}`被设置成了`2017/3/16`。其中,`${DATE}`没什么问题,表示我们创建类的时间,但是`${USER}`设置成`think`看着不太爽啊!那该怎么办啊?啥也别说了,直接动手改了它呗!接下来,博主将演示两种修改模板注释中 user 内容的方法。 25 | 26 | > 在`Settings`中进行修改 27 | 28 | ![settings](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/modify-user-template/settings.png) 29 | 30 | 如上图所示,我们定位到`Editor > File and Code Templates`界面,然后选择`Includes`中的`File Header`,将其中的`${USER}`直接修改成我们自己定义的名称,例如,博主将其设置为`维C果糖`,然后点击`Apply`。接下来,在`demo`目录下,创建测试类`CeshiUser`,其效果如下图所示: 31 | 32 | ![test-settings](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/modify-user-template/test-settings.png) 33 | 34 | 如上图所示,显然咱们的设置生效啦! 35 | 36 | > 在`bin`目录下修改`idea.exe`配置文件 37 | 38 | ![bin-idea](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/modify-user-template/bin-idea.png) 39 | 40 | 如上图所示,我们打开了 IntelliJ IDEA 安装目录中`bin`目录下的`idea.exe`配置文件,并且添加了一行内容`-Duser.name=charies`,接下来,保存该配置文件,重新启动 IntelliJ IDEA,在`demo`目录下,创建测试类`CeshiUser2`,其效果如下图所示: 41 | 42 | ![test-bin-idea](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/modify-user-template/test-bin-idea.png) 43 | 44 | 如上图所示,显然我们的设置生效啦!不过在这里,有两点需要注意,那就是: 45 | 46 | - **① 在`idea.exe`配置文件中修改模板注释中 user 内容的时候,我们不能将其设置为中文,否则会出现中文乱码的情况。** 47 | - **② 修改`idea.exe`配置文件之后,需要重启 IntelliJ IDEA ,只有在重启之后,这些最新配置才能生效。** 48 | 49 | 50 | 51 | ---------- 52 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 53 | 54 | -------------------------------------------------------------------------------- /articles/basic-course/debug-skills.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 之 Debug 篇 2 | 3 | 4 | 在我们的编程生涯中,调试代码是免不了的,而如何调试代码就显得尤为重要了,其中利用 IDE 自带的调试工具,是我们快速定位问题的重要手段之一。在此,我们就一起来了解一下 IntelliJ IDEA 自带的调试工具,熟悉常用的`Debug`技巧。 5 | 6 | ![debug-common-button](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/debug-skills/debug-common-button.png) 7 | 8 | - **标注 1**:`Show Execution Point `,显示执行端点(`Alt + F10`); 9 | - **标注 2**:`Step Over`,跳到下一步(`F8`); 10 | - **标注 3**:`Step Into`,进入代码或者说进入到方法内部(`F7`); 11 | - **标注 4**:`Force Step Into`,强制进入代码或者说进入到方法内部(`Alt + Shift + F7`); 12 | - **标注 5**:`Step Out`,跳到下一个断点或者跳出方法(`Shift + F8`); 13 | - **标注 6**:`Drop Frame`,放弃当前 debug,重新执行 debug; 14 | - **标注 7**:`Run to Cursor`,运行到光标处(`Alt + F9`); 15 | - **标注 8**:`Evaluate Expression`,评估表达式; 16 | - **标注 9**:`View Breakpoints`,查看断点,展示更多高级设置; 17 | - **标注 10**:`Mute Breakpoints`,置灰所有断点,再次点击,恢复; 18 | - **标注 11**:`Get thread dunp `,获得当前的线程堆栈。 19 | 20 | 如上述所示,都是一些常用的功能。其中,点击 **标注 9** 所示的`View Breakpoints`按钮,如下图所示: 21 | 22 | ![show-breakpoints-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/debug-skills/show-breakpoints-control.png) 23 | 24 | - **标注 1**:`View Breakpoints`,查看断点,展示更多高级设置; 25 | - **标注 2**:`Java Line Breakpoints`,展示项目中设置的所有断点; 26 | - **标注 3**:`Conditions`,设置条件断点; 27 | - **标注 4**:`Remove once hit`,设置击中一次断点后,取消该断点; 28 | - **标注 5**:`Pass count `,设置当循环若干次后,进入断点,常用于循环语句。 29 | 30 | 在上述的标注中,通过 **标注 3** 我们可以很方便的设置条件断点;通过 **标注 4** 我们可以设置一次性断点,不用我们每次手动的设置和取消断点;通过 **标注 5** 我们可以设置更加高级的断点击中条件。特别地,在`Debug`模式下,我们也可以双击鼠标右键,唤出常用的工具菜单,其效果如下图红框标记所示,提供了评估表达式、进入光标位置、强制进入光标位置和添加`Watches`等快捷按钮: 31 | 32 | ![double-click-right-key](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/debug-skills/double-click-right-key.png) 33 | 34 | 当我们点击`Evaluate Expression`按钮之后,会弹出如下界面: 35 | 36 | ![evaluate-expression](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/debug-skills/evaluate-expression.png) 37 | 38 | - **标注 1**:`Condition expression`,待评估的表达式; 39 | - **标注 2**:`Evaluate`,评估按钮,点击后进行评估。 40 | 41 | 此外,在评估表达式的时候,我们并不一定非得输入代码中的现有的表达式,可以按实际需要,自定义表达式,而且 IntelliJ IDEA 提供了代码提示功能,很方便。熟练的使用上述功能,可以有效的提高我们的调试效率,祝大家好运! 42 | 43 | 44 | ---------- 45 | 46 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 47 | 48 | 49 | -------------------------------------------------------------------------------- /articles/practical-skills/serialVersionUID.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 中自动生成 serialVersionUID 的方法 2 | 3 | 当我们用 IntelliJ IDEA 编写类并实现 Serializable(序列化)接口的时候,可能会遇到这样一个问题,那就是: 4 | 5 | - **无法自动生成`serialVersionUID`**. 6 | 7 | 而`serialVersionUID`又是一个非常重要的字段,因为 Java 的序列化机制是通过在运行时判断类的`serialVersionUID`来验证版本一致性的。在进行反序列化时,JVM 会把传来的字节流中的`serialVersionUID`与本地相应实体(类)的`serialVersionUID`进行比较,如果相同就认为是一致的,可以进行反序列化,否则就会出现序列化版本不一致的异常。 8 | 9 | 一般来说,定义`serialVersionUID`的方式有两种,分别为: 10 | 11 | - 采用默认的`1L`,具体为`private static final long serialVersionUID = 1L;` 12 | - 根据类名、接口名、成员方法及属性等来生成一个`64`位的哈希字段,例如 `private static final long serialVersionUID = XXXL;` 13 | 14 | 而 Java 类进行序列化也两个主要目的,分别为: 15 | 16 | - 把对象的字节序列永久地保存到硬盘上,通常存放在一个文件中; 17 | - 在网络上传送对象的字节序列。 18 | 19 | 在这里,我们就一起来看看如何利用 IntelliJ IDEA 自动生成`serialVersionUID`. 20 | 21 | **第 1 步:安装`GenerateSerialVersionUID`插件** 22 | 23 | ![preferences](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/preferences.png) 24 | 25 | 如上图所示,点击`Preferences`,进入如下界面: 26 | 27 | ![plugins](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/plugins.png) 28 | 29 | 在这里,选择`Plugins`,并搜索`GenerateSerialVersionUID`,如果没有发现此插件,则可以点击`Search in repositories`进行搜索: 30 | 31 | ![browse-repositories](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/browse-repositories.png) 32 | 33 | 如上图所示,点击`install`,即可安装此插件。 34 | 35 | **第 2 步:设置`Inspections`功能** 36 | 37 | ![inspections](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/inspections.png) 38 | 39 | 如上图所示,进入`Default Settings`,在`Inspections`设置页面中,勾选`Serializable class without 'serialVersionUID'`,并且还可以在`Severity`中设置提示级别,如`Warning`、`Error`等,默认为`Warning`,也建议选择`Warning`级别的提示。 40 | 41 | ![generate-uid](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/generate-uid.png) 42 | 43 | 如上图所示,创建一个类并实现`Serializable`接口,然后按`alt`+`Enter`键,即可收到提示,然后选择`SerialVersionUID`: 44 | 45 | ![test-generate-uid](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/serialVersionUID/test-generate-uid.png) 46 | 47 | 如上图所示,显然我们已经利用 IntelliJ IDEA 中自动生成`serialVersionUID`啦! 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | ---------- 57 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 58 | -------------------------------------------------------------------------------- /articles/basic-course/install-pycharm-on-mac.md: -------------------------------------------------------------------------------- 1 | # 在 Mac 系统下安装 PyCharm 的方法 2 | 3 | 首先,进入 PyCharm 的官网,[PyCharm: Python IDE for Professional Developers by JetBrains](https://www.jetbrains.com/pycharm/). 4 | 5 | ![pycharm-web](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-web.png) 6 | 7 | 如上图所示,直接点击`DOWNLOAD NOW`,立即下载: 8 | 9 | ![download-pycharm](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/download-pycharm.png) 10 | 11 | 如上图所示,JetBrains 提供了三个版本的 PyCharm,分别为:`Windows`、`macOS`和`Linux`. 在此,我们选择`macOS`,点击`DOWNLOAD`: 12 | 13 | ![mac-pycharm](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/mac-pycharm.png) 14 | 15 | 如上图所示,下载完成后,打开安装包,拽动 PyCharm 图标到文件夹: 16 | 17 | ![pycharm-icon](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-icon.png) 18 | 19 | 如上图所示,启动 PyCharm: 20 | 21 | ![pycharm-installation](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-installation.png) 22 | 23 | 如上图所示,如果我们之前安装过 PyCharm 并且保存过配置文件,那么再次安装时,可以导入之前的配置文件;否则的话,如果我们是首次安装,则选择`Do not imports settins`: 24 | 25 | ![pycharm-activation](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-activation.png) 26 | 27 | 如上图所示,输入激活码,即可激活 PyCharm!至于 PyCharm 的激活码,可以通过「[IntelliJ IDEA 最新注册码(截止到2020年3月11日)](https://guobinhit.blog.csdn.net/article/details/89040919)」获取,由于 IntelliJ IDEA 和 PyCharm 都属于 JetBrains,因此其激活码可以共用。 28 | 29 | ![pycharm-over](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-over.png) 30 | 31 | 如上图所示,PyCharm 世界的大门已经打开。Next,it's your time!此外,在我们首次启动 PyCharm 的时候,PyCharm 会进行初始化配置,如下图所示: 32 | 33 | ![pycharm-configuration](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-pycharm-on-mac/pycharm-configuration.png) 34 | 35 | - **标注 1**:键盘 scheme; 36 | - **标注 2**:IDE 主题; 37 | - **标注 3**:编辑器颜色及字体; 38 | - **标注 4**:存储脚本的路径。 39 | 40 | 如上图所示,`PyCharm initial Configuration`包含数个个性化设置选择,我们可以根据个人喜好进行选择。在此,我们就不赘言啦! 41 | 42 | ---------- 43 | 44 | **相关文章**:[详述 Mac 系统下安装及卸载 Python 的方法](https://blog.csdn.net/qq_35246620/article/details/78252549) 45 | 46 | 47 | ---------- 48 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /articles/practical-skills/recovery-code.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 中恢复代码的方法 2 | 3 | 在我们日常开发项目的时候,难免遇到在开发过程中由于某种原因,想要将代码恢复到前一版本的情景。特别地,在我们删除了某些代码,想要恢复之前删除的代码的时候,了解这个在 IntelliJ IDEA 中恢复代码的方法就显得尤为重要啦!现在,以博主之前写的测试代码为例,进行详细的讲解: 4 | 5 | ![equalsAndHD](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/equalsAndHD.png) 6 | 7 | 如上图所示,这是博主之前写的测试恒等运算符和`equals()`区别的测试类。接下来,我们在这段代码中添加一条输出语句: 8 | 9 | ![equalsAndHD-system](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/equalsAndHD-system.png) 10 | 11 | 如上图所示,我们添加了一条输出`hello world`的代码。现在嘛,有这样一个场景,那就是:**要求我们仅输出`==`和`equal()`的区别即可,不需要添加额外的输出语句**。这就要求我们将代码恢复到之前的状态啦!在此忽略直接删除代码的方法,那该怎么办呢? 12 | 13 | ![local-show-history](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/local-show-history.png) 14 | 15 | 如上图所示,我们只需要选择对应的类文件,点击鼠标右键,然后依次选择`Local History`和`Show History`,进入如下界面: 16 | 17 | ![compare-history-current](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/compare-history-current.png) 18 | 19 | 如上图所示,最左边展示了版本记录,由于博主仅进行过这一次修改,因此这里只显示了`2 minutes ago`的版本记录;在往右看,依次展示了前一版本与当前版本的代码,并给出了区别,可谓是清晰简洁: 20 | 21 | ![revert](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/revert.png) 22 | 23 | 然后,选择我们想要恢复的版本,呃,好吧,现在我们仅有一个版本可以选择,点击鼠标右键,选择`Revert`: 24 | 25 | ![reverted-to-ago](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/reverted-to-ago.png) 26 | 27 | 如上图所示,当我们点击`Revert`之后,右侧的两个版本同步至“前一版本”,并给出了恢复提示。最后,我们再回到代码编辑区检查一下是否真的恢复到前一版本了呢? 28 | 29 | ![revert-result](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/revert-result.png) 30 | 31 | 如上图所示,显然我们的操作成功了,代码已经恢复至前一版本啦!But,通过`Local History`恢复代码有的时候并不方便,例如我们将项目中的代码进行了多处修改,这时通过`Local History`恢复代码就显得很麻烦,因为它更倾向于恢复某一个文件的修改。在这里,如果我们的项目是通过`Subversion`也就是`SVN`检出的,那么我们就多了一种恢复代码的方法,即通过`Subversion`进行`Revert`操作。 32 | 33 | **操作步骤**: 34 | 35 | ![subversion](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/recovery-code/subversion.png) 36 | 37 | - **标注 1**:项目名称; 38 | - **标注 2**:`Subversion`; 39 | - **标注 3**:`Revert`. 40 | 41 | 如上图所示,先鼠标右键点击项目名称,然后选择`Subversion`,再选择`Revert`,即可进行选择恢复代码的页面。但是,在这里有一点需要我们注意,那就是:**此`Revert`为直接将代码恢复至从`SVN`检出时的状态,需谨慎使用**。 42 | 43 | 44 | ---------- 45 | 46 | **温馨提示**:不要纠结于为啥上图中的`Revert`为灰色,因为这个项目根本就不是从`SVN`上检出的,而且也没有进行过任何的修改。 47 | 48 | ---------- 49 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 50 | -------------------------------------------------------------------------------- /articles/practical-skills/color-code.md: -------------------------------------------------------------------------------- 1 | # 手把手教你设置 IntelliJ IDEA 彩色代码主题 2 | 3 | 首先,给出一系列 IntelliJ IDEA 代码的彩色主题,供大家选择: 4 | 5 | - `VibrantUnknown(Darcula)` 6 | 7 | ![VibrantUnknown](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/VibrantUnknown.png) 8 | 9 | - `FadeComments` 10 | 11 | ![FadeComments](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/FadeComments.png) 12 | 13 | - `NicePython` 14 | 15 | ![NicePython](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/NicePython.png) 16 | 17 | - `Solarized` 18 | 19 | ![Solarized](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/Solarized.png) 20 | 21 | - `Havenjark` 22 | 23 | ![Havenjark](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/Havenjark.png) 24 | 25 | - `GeditForElegantGnome` 26 | 27 | ![GeditForElegantGnome](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/GeditForElegantGnome.png) 28 | 29 | - `Gvim` 30 | 31 | ![Gvim](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/Gvim.png) 32 | 33 | 在选完我们中意的主题之后,需要大家到「[intellij-idea-tutorial](https://github.com/guobinhit/intellij-idea-tutorial/tree/master/resources/idea-theme)」中下载相应的主题。以「[SublimeMonoKai](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/resources/idea-theme/SublimeMonoKai.jar)」主题为例: 34 | 35 | ![idea-theme](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/idea-theme.png) 36 | 37 | 如上图所示,到 GitHub 中下载`jar`包,备用。然后, 38 | 39 | ![import-settings](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/import-settings.png) 40 | 41 | 依次选择`File -> Import Settings`,导入我们已经下载完的「SublimeMonoKai」主题的`jar`包。 42 | 43 | ![preferences](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/preferences.png) 44 | 45 | 以 Mac 为例,再选择`IntelliJ IDEA -> Preferences`,进入`Preferences`: 46 | 47 | ![colors-fonts](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/colors-fonts.png) 48 | 49 | 然后选择`Colors & Fonts`,设置`Scheme`为`SublimeMonoKai`即可。在我们完成以上操作,重新启动 IntelliJ IDEA 之后(必须重新启动才能生效),效果如下图所示: 50 | 51 | ![assignment](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/color-code/assignment.png) 52 | 53 | 最后,希望大家在编程的时候都能够有一个愉悦的心情! 54 | 55 | -------- 56 | 57 | - 有关更多 IDEA 主题样式,可以访问:http://www.riaway.com/ 58 | 59 | -------- 60 | 61 | 62 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 63 | -------------------------------------------------------------------------------- /articles/basic-course/use-face.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 的使用界面 2 | 3 | ![welcome-idea](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/welcome-idea.png) 4 | 5 | 是否还记得在博文「[IntelliJ IDEA 安装目录的核心文件讲解](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/first-run-idea.md)」中,这张充满神秘色彩的图片呢?进入她,让我们一起感受她的魅力吧! 6 | 7 | ![idea-begin](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/idea-begin.png) 8 | 9 | 如上图所示,打开 IntelliJ IDEA 后,首先迎接我们的就是这个界面: 10 | 11 | - **标注 1**:`Create New Project`创建一个新的项目; 12 | - **标注 2**:`Import Project`导入一个已有的项目; 13 | - **标注 3**: `Open`打开一个已有的项目; 14 | - **标注 4**:`Check out from Version Control`可以通过服务器上的项目地址 Checkout(俗称:检出) 项目。 15 | 16 | 在这里,为了进一步介绍 IntelliJ IDEA,我们创建一个 Static Web 项目,点击`Create New Project`,进入如下界面: 17 | 18 | ![new-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/new-project.png) 19 | 20 | - **标注 1**:IntelliJ IDEA 支持的框架及语言; 21 | - **标注 2**:与 **标注 1** 相对应的框架或语言的进一步分类。 22 | 23 | 在这里,我们选择`Static Web-->Static Web`,然后点击`Next`,进入下一步: 24 | 25 | ![new-project-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/new-project-2.png) 26 | 27 | - **标注 1**:项目名称(自定义,一般都小写,多个单词用下划线连接); 28 | - **标注 2**:项目存储地址; 29 | - **标注 3**:模块名称(默认与项目名称相同); 30 | - **标注 4**:内容根路径; 31 | - **标注 5**:模块文件存储地址; 32 | - **标注 6**:项目格式。 33 | 34 | 在这里,有一点需要说明,那就是:**在 IntelliJ IDEA 中,`Project`是最大单元,没有类似于 Eclipse 的工作空间(`Workspace`)的概念,但是我们可以在一个 `Project`下创建多个`Module`,默认是一个`Project`下创建一个`Module`,因此才出现项目名称与模块名称默认相同的现象**。一般情况下,我们是不需要在`More Settings `中进行修改的。接下来,点击`Finish`,完成项目的创建: 35 | 36 | ![project-go-go](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/project-go-go.png) 37 | 38 | - **标注 1**:项目结构图; 39 | - **标注 2**:在编辑区没有内容的时候,默认显示常用快捷键。 40 | 41 | 对于首次创建或打开的新项目,IntelliJ IDEA 都会创建项目索引,大型项目在创建索引的过程中可能会出现卡顿的现象,因此强烈建议在 IntelliJ IDEA 创建索引的过程中不要动项目。此外,IntelliJ IDEA 的默认界面是隐藏`Toolbar`和`Tool Buttons`的,博主比较喜欢把两者显示出来,大家可以按自己的个人爱好选择开启与否。但是无论我们是否选择开启,都要知道如何开启啊,省的在我们想开启的时候却不知道如何开启不是,那岂不是尴尬啦?因此,在这里,我们选择开启`Toolbar`和`Tool Buttons`,点击`View`,如下图所示: 42 | 43 | ![toolbar-toolbuttons](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/toolbar-toolbuttons.png) 44 | 45 | 如上图所示,`Toolbar`和`Tool Buttons`默认是没有选择的,我们分别点击`Toolbar`和`Tool Buttons`进行开启(出现对勾标记): 46 | 47 | ![tool-show](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/use-face/tool-show.png) 48 | 49 | - **标注 1**:Toolbar 50 | - **标注 2**:Tool Buttons 51 | 52 | 如上图所示,`Toolbar`和`Tool Buttons`开启成功!至此,IntelliJ IDEA 的使用界面介绍完毕。 53 | 54 | 55 | ---------- 56 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 57 | -------------------------------------------------------------------------------- /articles/basic-course/compile-method.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 编译方式介绍及编译器的设置和选择 2 | 3 | 相对于 Eclipse 的实时自动编译,IntelliJ IDEA 的编译更加手动化,虽然 IntelliJ IDEA 也可以通过设置开启实时编译,但是太浪费资源了,因此不建议这样做。IntelliJ IDEA 编译方式除了手工点击编译按钮进行编译之外,还可以在“容器”运行之前配置一个编译事件,先编译后运行。在默认情况下,IntelliJ IDEA 也都是这样设置的,因此在实际开发中,我们也不用太注意编译这件事。虽然 IntelliJ IDEA 没有实时编译(未设置时),但是这并不影响代码的自动检查。但是对于多个类之间的关联关系,还是要等`Build`或`Rebuild`触发的时候才会做相关检查的。 4 | 5 | ![build](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/compile-method/build.png) 6 | 7 | - **标注 1**:`Build Project`,编译项目; 8 | - **标注 2**:`Build Module`,编译模块; 9 | - **标注 3**:`Recomplie`,重新编译类文件; 10 | - **标注 4**:`Rebuild Project`,重新编译项目。 11 | 12 | 如上图所示,在 IntelliJ IDEA 中,编译方式有以上 3 种,分别为: 13 | 14 | - `Build`:对选定的目标(Project 或 Module)进行编译,但只编译修改过的文件,没有修改过的文件则不会进行编译。 15 | - `Recompile`:对选定的目标(Java 类文件),进行强制性编译,不管目标是否是被修改过。 16 | - `Rebuild`:对选定的目标(Project),进行强制性编译,不管目标是否是被修改过,由于 Rebuild 的目标只有 Project,因此每次 Rebuild 花的时间都比较长。 17 | 18 | 接下来,我们一起看看运行之前的编译情况: 19 | 20 | ![run-debug-configuration](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/compile-method/run-debug-configuration.png) 21 | 22 | 如上图所示,IntelliJ IDEA 默认在运行项目之前先进行`Build`操作。那么,我们再一起看看 IntelliJ IDEA 编译器的设置和选择: 23 | 24 | ![settings-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/compile-method/settings-1.png) 25 | 26 | - **标注 1**:设置自动编译项目; 27 | - **标注2**:设置编译时`heap`大小; 28 | - **标注 3**:设置编译时的`VM`参数。 29 | 30 | 如上图所示,我们定位到`Build、Execution、Deployment > Complie`页面,通过勾选 **标注 1** 所示的`Build project automatically`,我们可以设置 IntelliJ IDEA 进行自动编译;**标注 2** 表示设置编译`heap`大小,默认为 700,如果使用 64 位的机器,在内存足够的情况下,可以尝试修改为 1500 或以上,此外,如果我们在编译的时候报出`OutOfMemoryError`的错误,也可以来修改(减小)这个参数;**标注 3** 表示设置编译时的虚拟机参数,这个可以根据需求进行个性化设置,一般情况下,默认就可以。 31 | 32 | ![settings-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/compile-method/settings-2.png) 33 | 34 | 如上图所示,我们定位到`Build、Execution、Deployment > Compiler > Excludes`页面,可以通过点击 **标注 1** 所示的`+`和`-`,任意添加或删减目录(或文件)进行编译排除。在编译项目的时候,如果任何一个可编译的文件没有编译通过,那么 IntelliJ IDEA 就无法运行起来,必须等全部问题解决并且编译通过之后,IntelliJ IDEA 才能运行起来。不过有可能在开发过程中,某一个包目录的文件编译无法通过,但是我们又不急着改,这时我们就可以考虑把该包加入到排除编译列表中,这样的话,项目就可以运行起来啦! 35 | 36 | ![settings-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/compile-method/settings-3.png) 37 | 38 | - **标注 1**:`Use compile`; 39 | - **标注 2**:`Project bytecode version`; 40 | - **标注 3**:`Per-module bytecode version`. 41 | 42 | 如上图所示,我们定位到`Build、Execution、Deployment > Compiler > Java Compiler`页面,**标注 1** 所示为 IntelliJ IDEA 支持的编译器,包括`Javac`、`Eclipse`、`Ajc`等,默认是`Javac`,也推荐使用`Javac`;**标注 2** 所示为针对项目字节码编译版本,一般选择的是当前项目主 JDK 的版本;**标注 3** 表示可以针对`Project`下各个`Module`的特殊需求单独设置不同的`bytecode version`,当然,前提是我们的电脑上必须事先安装对应的 JDK 版本。 43 | 44 | 45 | ---------- 46 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 47 | -------------------------------------------------------------------------------- /articles/basic-course/core-file-talk.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 安装目录的核心文件讲解 2 | 3 | 首先,我们回顾一下前两篇关于 IntelliJ IDEA 的博文的内容: 4 | 5 | - 在「[在 Windows 系统下安装 IntelliJ IDEA 的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/install-intellij-idea-on-windows.md)」中,我们知道了在 Windows 系统下如何下载并安装 IntelliJ IDEA 的方法; 6 | - 在「[首次运行 IntelliJ IDEA 示例](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/first-run-idea.md)」中,我们体验了首次运行 IntelliJ IDEA 的向导功能,并完成了初步的配置。 7 | 8 | 在本篇博文中,我们主要讲解一下 IntelliJ IDEA 安装目录中的一些核心文件的功能及用法: 9 | 10 | ![intellij-idea-bin](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/core-file-talk/intellij-idea-bin.png) 11 | 12 | 如上图所示,我们定位到了 IntelliJ IDEA 安装目录的`bin`目录下,`bin`是 binary 的缩写,代表的意思是二进制,因此`bin`目录就是用来存放二进制文件的。在这里,我们主要了解上图中被红色方框圈出来的五个文件: 13 | 14 | - `idea.exe`文件是 IntelliJ IDEA 32 位的可行执行文件,IntelliJ IDEA 安装完默认发送到桌面的就是这个执行文件的快捷方式; 15 | - `idea.exe.vmoptions`文件是 IntelliJ IDEA 32 位的可执行文件的 VM 配置文件; 16 | - `idea.properties`文件是 IntelliJ IDEA 的一些属性配置文件; 17 | - `idea64.exe`文件是 IntelliJ IDEA 64 位的可行执行文件,要求电脑上必须装有 JDK 64 位版本,64 位的系统也是建议使用该文件; 18 | - `idea64.exe.vmoptions`文件是 IntelliJ IDEA 64 位的可执行文件的 VM 配置文件。 19 | 20 | 接下来,我们详细了解上述配置文件的作用: 21 | 22 | ![idea64-vmoptions](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/core-file-talk/idea64-vmoptions.png) 23 | 24 | 如上图所示,我们打开了`idea64.exe.vmoptions`配置文件。如果我们的电脑是 32 位系统,则应该打开`idea.exe.vmoptions`配置文件,但是由于 32 位系统内存一般都是 2G 左右,也没有多大空间可以调整,所以一般不需要修改。修改 JVM 配置文件的原则就是根据我们机器的内存情况来判断,个人建议 8G 以下的机器或是静态页面开发者无需修改,如果我们要开发大型的 Java 项目或是 Android 项目,并且内存大于 8G,建议进行修改,而且经常修改的也就是下面 4 个参数。在此处,我们以 16G 内存的机器为例: 25 | 26 | - `-Xms128m`,可尝试设置为`-Xms512m` 27 | - `-Xmx750m`,可尝试设置为`-Xmx1500m` 28 | - `-XX:ReservedCodeCacheSize=240m`,可尝试设置为`-XX:ReservedCodeCacheSize=500m` 29 | - `-XX:SoftRefLRUPolicyMSPerMB=50` ,可尝试设置为`-XX:SoftRefLRUPolicyMSPerMB=100` 30 | 31 | 32 | 在这里,我们只是举个修改示例,由于每台机器的配置不一样,因此每台机器的最佳的配置参数也是不一样的,最好的调整方式是根据 JConsole 这类工具进行观察后个性化调整。 33 | 34 | ![idea-properties](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/core-file-talk/idea-properties.png) 35 | 36 | 如上图所示,我们打开了`idea.properties`配置文件,其没有 32 位和 64 位之分,修改的原则主要是根据个人对 IntelliJ IDEA 的个性化配置情况来分析,经常修改的是下面 4 个参数: 37 | 38 | - `idea.config.path=${user.home}/.IntelliJIdea/config`,该属性主要用于指向 IntelliJ IDEA 的个性化配置目录,默认是被注释,打开注释之后才算启用该属性,这里需要特别注意的是斜杠方向,这里用的是正斜杠; 39 | - `idea.system.path=${user.home}/.IntelliJIdea/system`,该属性主要用于指向 IntelliJ IDEA 的系统文件目录,默认是被注释,打开注释之后才算启用该属性,这里需要特别注意的是斜杠方向,这里用的是正斜杠,如果咱们的项目很多,则该目录会很大,如果咱们的 C 盘空间不够的时候,还是建议把该目录转移到其他盘中; 40 | - `idea.max.intellisense.filesize=2500`,该属性主要用于提高在编辑大文件时候的代码帮助,IntelliJ IDEA 在编辑大文件的时候还是很容易卡顿的; 41 | - `idea.cycle.buffer.size=1024`,该属性主要用于控制控制台输出缓存。如果遇到项目开启很多输出的话,那么控制台很快就被刷满了,没办法再自动输出后面内容,这种项目建议增大该值或是直接禁用掉,禁用语句为 `idea.cycle.buffer.size=disabled`。 42 | 43 | 由于屏幕大小的关系,上面所示的配置文件的内容并没有显示完全,我们只需要滑动鼠标就可以看到上面我们经常修改的配置信息啦!至此,IntelliJ IDEA 安装目录的核心文件讲解完毕。 44 | 45 | 46 | ---------- 47 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 48 | -------------------------------------------------------------------------------- /articles/basic-course/install-intellij-idea-on-windows.md: -------------------------------------------------------------------------------- 1 | # 在 Windows 系统下安装 IntelliJ IDEA 的方法 2 | 3 | 首先,进入官网下载 IntelliJ IDEA 可执行文件:https://www.jetbrains.com/idea/ 4 | 5 | ![intellij-idea-web](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellij-idea-web.png) 6 | 7 | 如上图所示,进入 Download IntelliJ IDEA 页面,我们可以看到 IntelliJ IDEA 分为两个版本,分别为: 8 | 9 | - 旗舰版(Ultimate) 10 | - 社区版(Community) 11 | 12 | 其中,旗舰版是收费的,社区版则是免费的。如果你想用 IntelliJ IDEA 进行大型项目开发的的话,啥也别说了,下载旗舰版就没错了;如果你只是想体验一下开发的乐趣,下载社区版就足够了。 13 | 14 | 言归正传,点击`Download`之后,将会进入如下页面: 15 | 16 | ![downloading-intellij-idea](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/downloading-intellij-idea.png) 17 | 18 | 正常情况下,网页会自动弹出下载提示框的,如下图所示: 19 | 20 | ![download-process](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/download-process.png) 21 | 22 | 然后直接`下载`就可以啦!但是还有一种不正常的情况,那就是网页没有自动弹出下载提示框,这也不用着急,我们手动点击`direct link`,同样可以弹出下载提示框,然后下载即可。下载完成后,双击可执行文件,以博主为例,双击下载的`ideaIU-2016.3.5`可执行文件,将会进入 IntelliJ IDEA 的安装页面,如下图所示: 23 | 24 | ![intellij-idea-setup](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellij-idea-setup.png) 25 | 26 | 在这一步,毫无疑问,点击`Next`,进入如下界面: 27 | 28 | ![intellig-idea-choose-location](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location.png) 29 | 30 | 在这里,需要说明一下,IntelliJ IDEA 默认是安装到 C 盘的`Program Files (x86)`目录下的,如果我们想安装到 C 盘的该目录下,点击`Next`即可;如果想修改 IntelliJ IDEA 的安装目录,则需要点击`Browse`进行修改,如博主修改 IntelliJ IDEA 的安装目录后,如下图所示: 31 | 32 | ![intellig-idea-choose-location-d](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-d.png) 33 | 34 | 如上图所示,博主将 IntelliJ IDEA 安装到了 D 盘的`Program Files (x86)`目录下,点击`Next`,进入如下界面: 35 | 36 | ![intellig-idea-choose-location-next](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-location-next.png) 37 | 38 | 如上面所示,博主标记了两个记号,接下来,分别讲述其作用: 39 | 40 | - **标注 1**:表示在桌面上创建一个 IntelliJ IDEA 的快捷方式,这个建议勾选上,不然我们每次启动 IntelliJ IDEA 都要到安装目录下启动,岂不要累死? 41 | - **标注 2**:表示关联`.java`、`.jGrooy`和`.kt`文件,建议不要勾选,否则我们每次打开以上三种类型的文件,都要启动 IntelliJ IDEA,速度比较慢,而且如果我们仅仅是为了查看文件内容,用 EditPlus 这类轻便的编辑器打开,岂不更加方便? 42 | 43 | 接下来,点击`Next`,进入如下界面: 44 | 45 | ![intellig-idea-choose-menu](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellig-idea-choose-menu.png) 46 | 47 | 在这里,选择默认的`JetBrains`文件夹就可以,点击`Install`,进行安装: 48 | 49 | ![intellig-idea-install-over](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-intellij-idea-on-windows/intellig-idea-install-over.png) 50 | 51 | 截止到此处,我们已经在 Windows 系统下将 IntelliJ IDEA 安装成功啦! 52 | 53 | ---------- 54 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 55 | -------------------------------------------------------------------------------- /articles/basic-course/idea-icon.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 常见文件类型的图标介绍 2 | 3 | 在之前的「[史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md)」系列博文中,我们已经了解了很多关于 IntelliJ IDEA 的内容啦,例如,在 Windows 系统下安装 IntelliJ IDEA、运行 IntelliJ IDEA 、创建 Java 项目以及修改 IntelliJ IDEA 主题等等,可以说,我们已经初步掌握了 IntelliJ IDEA 的使用方法啦!不过,有一个现象不知道大家注意到没有,那就是:**在我们使用 IntelliJ IDEA 创建文件的时候, 随着文件类型的不同,其显示的图标也不相同。**例如,我们分别创建`Java`、`Interface`、`Enum`和`JavaScript`文件,如下图所示: 4 | 5 | ![icons](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/icons.png) 6 | 7 | 如上图所示,显然不同的文件类型,其显示的图标也不相同。为了能够更好的掌握 IntelliJ IDEA,在这里,我们更进一步,了解一下 IntelliJ IDEA 各种文件类型的图标,主要分为三类:`Common`、`Data Sources`和`File Types`. 8 | 9 | > **Common** 10 | 11 | ![common-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/common-1.png) 12 | ![common-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/common-2.png) 13 | ![common-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/common-3.png) 14 | 15 | > **Data Sources** 16 | 17 | ![data-sources-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/data-sources-1.png) 18 | ![data-sources-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/data-sources-2.png) 19 | ![data-sources-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/data-sources-3.png) 20 | 21 | > **File Types** 22 | 23 | IntelliJ IDEA 识别众多的文件类型,每一个文件类型都用一个特殊图标表示,也允许自定义的文件类型。每个文件类型与一个或多个特定的模式进行关联扩展。文件类型及其扩展可以在文件类型的对话框中进行配置。默认的文件类型包括: 24 | 25 | ![file-types-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-1.png) 26 | ![file-types-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-2.png) 27 | ![file-types-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-3.png) 28 | ![file-types-4](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-4.png) 29 | ![file-types-5](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-5.png) 30 | ![file-types-6](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-6.png) 31 | ![file-types-7](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/file-types-7.png) 32 | 33 | 对于各种文件类型的图标,上面的`Description`已经介绍的非常详细啦,但是还有两个图标需要特别的说明一下,分别为: 34 | 35 | - ![tiny-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/tiny-1.png)`Source root`,我们可以理解为源目录,其作用就是用来专门存放 Java 类文件的,相对于编译出来的`class`文件而言,它就是源。一般默认名字叫`src`的目录就是源目录,但是在 IntelliJ IDEA 中,即使叫`srcs`也是可以设置为`Source root`的,所以源目录跟目录命名是没有关系的,因为 IntelliJ IDEA 支持将任意目录设置为`Source root`,其作用就是标记该目录下的文件是可编译的。 36 | - ![tiny-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/idea-icon/tiny-2.png)`Java class located out of the source root`,我们已经知道`Source root`目录是用来告诉 IntelliJ IDEA 这是存放可编译文件的目录,而如果我们的 Java 类文件没有放在该目录或是该目录的子包下,那么该 Java 类文件就无法进行编译,其前面就会显示这个图标。 37 | 38 | 39 | ---------- 40 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 41 | -------------------------------------------------------------------------------- /articles/basic-course/plugins.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 插件的安装及使用方法 2 | 3 | > **温馨提示**:IntelliJ IDEA 支持非常多的插件,熟练的使用插件,能够有效提高我们的开发效率以及用户体验。 4 | 5 | ## 正文 6 | 7 | 首先,进入插件安装界面: 8 | 9 | - Mac:`IntelliJ IDEA` -> `Preferences` -> `Plugins`; 10 | - Windows:`File` -> `Settings` -> `Plugins`. 11 | 12 | ![preferences-plugins](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/plugins/preferences-plugins.png) 13 | 14 | - **标注 1**:显示 IntelliJ IDEA 的插件分类, 15 | - `All plugins`:显示 IntelliJ IDEA 支持的所有插件; 16 | - `Enabled`:显示当前以前启用的插件; 17 | - `Disabled`:显示当前未启用的插件; 18 | - `Bundled`:显示 IntelliJ IDEA 所有自带的插件; 19 | - `Custom`:显示我们自己安装的插件。 20 | - **标注 2**:打钩`√`表示为已经启用的插件; 21 | - **标注 3**:安装 JetBrains 开发的插件; 22 | - **标注 4**:安装插件仓库提供的插件; 23 | - **标注 5**:安装本地已经下载完的插件。 24 | 25 | 如上图所示,显示了 IntelliJ IDEA 对插件的良好支持。以阿里巴巴最近新推出的「阿里巴巴代码规范检查插件」为例,在搜索区输入`Alibaba`,就会显示出相近名称的插件(如果显示`No Plugins found`,则点击`Serach in repositories`进行仓库搜索),然后点击`Install`,即可安装此插件。在此,需要注意的是:**插件安装成功后,需要重新启动 IntelliJ IDEA 使插件生效**。 26 | 27 | ![alibaba-java-coding-guidelines](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/plugins/alibaba-java-coding-guidelines.png) 28 | 29 | 此外,当我们创建一个 IntelliJ IDEA 当前配置并不支持的文件格式时,IntelliJ IDEA 会自动识别此文件,并提示我们下载对应的插件,对其进行支持。如下图所示,我们创建了一个名为`MarkdownPlugins.md`的 Markdown 格式的文件,但当前我们的 IntelliJ IDEA 并没有支持 Markdown 的插件,这时 IntelliJ IDEA 就会自动提示我们安装 Markdown 插件: 30 | 31 | ![markdown-plugins](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/plugins/markdown-plugins.png) 32 | 33 | 如上图所示,当我们点击`Install plugins`之后,选择对应的插件下载并安装(自动),然后重新启动 IntelliJ IDEA,并输入 Markdown 格式的内容,进行测试: 34 | 35 | ![test-markdown-plugins](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/plugins/test-markdown-plugins.png) 36 | 37 | 如上图所示,显然 Markdown 插件安装成功,IntelliJ IDEA 已经能够识别 Markdown 的语法啦! 38 | 39 | ### 常用插件推荐 40 | 41 | | 插件名称 | 插件介绍 | 官网地址 | 42 | | ------------- |:-------------| :-----| 43 | |Alibaba Java Coding Guidelines| 阿里巴巴代码规范检查插件 |https://plugins.jetbrains.com/plugin/10046-alibaba-java-coding-guidelines| 44 | |Key promoter |快捷键提示插件 |https://plugins.jetbrains.com/plugin/4455?pr=idea| 45 | |Grep Console |自定义控制台输出格式插件| https://plugins.jetbrains.com/idea/plugin/7125-grep-console| 46 | |CheckStyle-IDEA| 代码规范检查插件 |https://plugins.jetbrains.com/plugin/1065?pr=idea| 47 | |FindBugs-IDEA | 潜在 Bug 检查 |https://plugins.jetbrains.com/plugin/3847?pr=idea| 48 | |MetricsReloaded |代码复杂度检查 |https://plugins.jetbrains.com/plugin/93?pr=idea| 49 | |Statistic |代码统计插件| https://plugins.jetbrains.com/plugin/4509?pr=idea| 50 | |JRebel Plugin |热部署插件| https://plugins.jetbrains.com/plugin/?id=4441| 51 | |CodeGlance |显示代码地图插件 |https://plugins.jetbrains.com/plugin/7275?pr=idea| 52 | |Markdown Navigator| Markdown 编辑器插件| https://plugins.jetbrains.com/plugin/7896?pr=idea| 53 | |Eclipse Code Formatter| Eclipse 代码风格格式化插件 |https://plugins.jetbrains.com/plugin/6546?pr=idea| 54 | |Jindent-Source Code Formatter |自定义模板插件 |http://plugins.jetbrains.com/plugin/2170?pr=idea| 55 | |Maven Helper| Maven 辅助插件 |https://plugins.jetbrains.com/plugin/7179-maven-helper| 56 | |Properties to YAML Converter| Properties 转 YAML 格式插件 |https://plugins.jetbrains.com/plugin/8000-properties-to-yaml-converter| 57 | |Git Flow Integration| Git Flow 集成插件 |https://plugins.jetbrains.com/plugin/7315-git-flow-integration| 58 | 59 | 60 | 61 | 62 | 63 | 64 | ---------- 65 | 66 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 67 | -------------------------------------------------------------------------------- /articles/basic-course/first-run-idea.md: -------------------------------------------------------------------------------- 1 | # 首次运行 IntelliJ IDEA 示例 2 | 3 | 首先,双击打开 IntelliJ IDEA 的快捷方式: 4 | 5 | ![intellij-idea-icon](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/intellij-idea-icon.png) 6 | 7 | 在此,需要说明: 8 | 9 | - 如果我们的电脑曾经安装过 IntelliJ IDEA,并且我们在卸载 IntelliJ IDEA 的时候没有删除其配置文件目录,那么在安装新版本后是不会出现首次运行的功能向导的; 10 | - 如果我们的电脑没有安装过 IntelliJ IDEA,或者是卸载 IntelliJ IDEA 的时候删除了 IntelliJ IDEA 的配置文件目录,那么当我们首次打开 IntelliJ IDEA 的时候,将会进入向导界面。 11 | 12 | 进入向导界面,如下图所示: 13 | 14 | ![complete-installation](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/complete-installation.png) 15 | 16 | - **标注 1**:如果我们的电脑曾经安装过 IntelliJ IDEA 并且保留了其配置文件目录的话,则可以通过此按钮进行导入; 17 | - **标注 2**:如果我们的电脑没有安装过早期任何版本的 IntelliJ IDEA 的话,则可以通过此按钮让 IntelliJ IDEA 生成一份新的配置文件。 18 | 19 | 此外,如果我们的电脑不是首次安装 IntelliJ IDEA 的话,则还会在 **标注 1** 的上面多出现一个按钮选项,为: 20 | 21 | - `I want to import my settings from a previous version.` 22 | 23 | 其功能为**自动识别曾经安装过的 IntelliJ IDEA 旧版本的配置**,如果我们选择了此按钮,则 IntelliJ IDEA 将自动把旧版本的配置文件转移到新版本的配置文件目录中。在此处,点击`OK`后,跳转到如下界面: 24 | 25 | ![privacy-policy](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/privacy-policy.png) 26 | 27 | 此页面展示的是 IntelliJ IDEA 的隐私协议,点击`Accept`即可进入“激活许可证”界面: 28 | 29 | ![license-activation](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/license-activation.png) 30 | 31 | 如上图所示,默认选择 **标注 1** 的`Activate`,验证 IntelliJ IDEA 的许可证有如图展示的三种方式,在这里,我们选择 **标注 2** 的`Evaluate for free`进行演示,默认是免费试用 30 天,选择后进入如下界面: 32 | 33 | ![license-activation-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/license-activation-2.png) 34 | 35 | - **标注 1**:`Evaluate for free`,免费试用,默认 30 天; 36 | - **标注 2**:选择是否发送提示信息和产品特点; 37 | - **标注 3**:勾选 **标注 2** 的选项后,接收资料的邮箱。 38 | 39 | 选择完成后,点击`Evaluate`,进入如下界面: 40 | 41 | ![license-agreement](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/license-agreement.png) 42 | 43 | 如上图所示,展示了 IntelliJ IDEA 的许可协议地址,不用管它是什么鬼,点击`Accept`,将跳转到如下界面: 44 | 45 | ![ui-themes](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/ui-themes.png) 46 | 47 | - **标注 1**:IntelliJ IDEA 默认的 UI 主题; 48 | - **标注 2**:个人比较喜欢的 Darcula 黑色主题; 49 | - **标注 3**:跳过所有向导,选择默认配置(不建议选择)。 50 | 51 | 在此处,我们选择 Darcula 黑色 UI 主题并选择`Next: Default plugins`,进入到插件配置页面: 52 | 53 | ![customize](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/customize.png) 54 | 55 | 如上图所示,展示了 IntelliJ IDEA 支持的一些主要的插件或者说是工具、扩展功能。我们可以根据自己开发的实际需求禁用一些插件,这样可以稍微减轻 IntelliJ IDEA 运行时所占内存,加快运行速度,但是效果并不很明显。在这里,我们选择 Java Frameworks 的`Customize`进行演示,点击后,进入到如下界面: 56 | 57 | ![feature-plugins](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/feature-plugins.png) 58 | 59 | 如上图所示,展示了 IntelliJ IDEA 支持的所有 Java Frameworks,我们可以根据自己的开发需求不启用指定的框架,去掉框架前面的勾选框就表示不启用该框架的支持功能。对于不启用的框架,我们也可以在后期重新进行勾选。选择完成后,点击`Save Changes and Go Back`跳转到前一个界面,然后在点击`Start using IntelliJ IDEA`即表示已经初步配置完 IntelliJ IDEA,进入 IntelliJ IDEA 的启动界面: 60 | 61 | ![ultimate-over](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/first-run-idea/ultimate-over.png) 62 | 63 | 如上图所示,待进度条走完之后,**欢迎进入 IntelliJ IDEA 的编码世界!** 64 | 65 | ---------- 66 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 67 | -------------------------------------------------------------------------------- /articles/practical-skills/the-method-of-remote-debugging-with-idea.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 远程调试 Tomcat 的方法 2 | 3 | > **博主说**:在调试代码的过程中,为了更好的定位及解决问题,有时候需要我们使用远程调试的方法。在本文中,就让我们一起来看看,如何利用 IntelliJ IDEA 进行远程 Tomcat 的调试。 4 | 5 | 首先,配置`remote`: 6 | 7 | ![edit-configurations](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/edit-configurations.png) 8 | 9 | 如上图所示,点击`Edit Configurations`,进入如下界面: 10 | 11 | ![remote](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/remote.png) 12 | 13 | 如上图所示,我们进入了`Run/Debug Configurations`界面,然后点击左上角的`+`,选择`Remote`: 14 | 15 | ![remote-debug](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/remote-debug.png) 16 | 17 | - **标注 1**:运行远程 JVM 的命令行参数; 18 | - **标注 2**:传输方式,默认为`Socket`; 19 | - **标注 3**:调试模式,默认为`Attach`; 20 | - **标注 4**:服务器 IP 地址,默认为`localhost`,需要修改为目标服务器的真实 IP 地址; 21 | - **标注 5**:服务器端口号,默认为`5005`,需要修改为目标服务器的真实端口号; 22 | - **标注 6**:搜索资源是使用的环境变量,默认为``,即整个项目。 23 | 24 | 如上图所示,其中 **标注 2** 和 **标注 3** 又分别有两种分类,对于 **标注 2**, 25 | 26 | - **标注 2**:传输方式,默认为`Socket`; 27 | - `Socket`:macOS 及 Linux 系统使用此种传输方式; 28 | - `Shared memory`: Windows 系统使用此种传输方式。 29 | 30 | 对于 **标注 3**, 31 | 32 | - **标注 3**:调试模式,默认为`Attach`; 33 | - `Attach`:此种模式下,调试服务端(被调试远程运行的机器)启动一个端口等待我们(调试客户端)去连接; 34 | - `Listen`: 此种模式下,是我们(调试客户端)去监听一个端口,当调试服务端准备好了,就会进行连接。 35 | 36 | 然后,复制 **标注 1**,即 IntelliJ IDEA 自动生产的命令行参数,然后导入到 Tomcat 的配置文件中。以 Linux 系统为例,导入语句为: 37 | 38 | - `export JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001'` 39 | 40 | 如果是 Windows 系统,则导入语句为: 41 | 42 | - `set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001` 43 | 44 | 两者的区别在于导入语句的关键字不同以及有无引号,Linux 系统的导入关键字为`export`,Windows 为`set`;Linux 的导入值需要用单引号`''`括起来,而 Windows 则不用。 45 | 46 | 接下来,修改 Tomcat 的 bin 目录下的`catalina.sh`文件(如果是 Windows 系统则修改`catalina.bat`文件),将上述的导入语句添加到此文件中即可: 47 | 48 | ![catalina-edit](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/catalina-edit.png) 49 | 50 | 至此,IntelliJ IDEA 远程调试 Tomcat 的配置已经完成了,调试的后续步骤按正常的调试技巧进行就可以啦! 51 | 52 | ---------- 53 | 54 | 如果我们的项目是基于 Spring Boot 搭建的,那么上述直接修改 Tomcat 的 bin 目录下的`catalina.sh`文件就行不通了。但是这时,在部署 Spring Boot 的时候,我们通常要为其写一个启动脚本,我们只需要将上述配置语句添加到 Spring Boot 项目的启动脚本里面,同样可以实现远程调试的目的。例如, 55 | 56 | ![startup](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/startup.png) 57 | 58 | ---------- 59 | 60 | **+++++ 题外话:我是一个大彩蛋 +++++** 61 | 62 | 63 |   在这里,我们假设服务器的 IP 地址为`10.11.12.39`,端口号为`16203`,设置完成后,进入`Debug`模式,如果连接成功,则会出现如下提示: 64 | 65 | ![test-remote-debug](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/practical-skills/the-method-of-remote-debugging-with-idea/test-remote-debug.png) 66 | 67 |   此外,如果我们是跨多个系统进行调试,则只需要在想要调试的系统中配置`Remote`,打上断点,启动`Debug`模式,然后在服务开始的地方执行程序即可进入到我们设置的断点。而且,如果我们在本地配置`Remote`并关联到某个 Tomcat,在`Debug`模式下,所有涉及到断点所在代码的功能,都会进入我们设置的断点。 68 | 69 |   例如,对于服务器上的 Tomcat A,多个系统都用到了这个 Tomcat,如订单子系统、账户子系统、路由子系统等,并且多个系统间互相调用,如订单子系统调了账户子系统,账户子系统又调了路由子系统,则当我们在这三个子系统中配置`Remote`并在对应的代码(如在订单子系统中查询商户的账户信息,则调到账户子系统;在账户子系统中又通过路由子系统调到其他底层服务查询商户的账户余额等)上打上断点,启动`Debug`模式之后,通过单元测试或者页面操作触发订单子系统中的查询商户的账户信息功能,则会依次进入到在上述三个子系统中设置的断点。 70 | 71 |   此外,在我们配置完远程调试之后,就算别人启动相关服务,也会进入到我们的断点,而且会受到我们设置的断点的影响,只有在我们执行完测试之后,服务才会继续执行下去。最后,远程调试的功能真的很强大,善用远程调试,远离 Bug! 72 | 73 | ---------- 74 | 75 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 76 | -------------------------------------------------------------------------------- /articles/basic-course/project-module.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 中 Project 和 Module 的概念及区别 2 | 3 | 在 IntelliJ IDEA 中,没有类似于 Eclipse 工作空间(`Workspace`)的概念,而是提出了`Project`和`Module`这两个概念。接下来,就让我们一起看看 IntelliJ IDEA 官方是如何描述两者的吧!**对于 Project,IntelliJ IDEA 官方是这样介绍的**: 4 | 5 | `A project is a top-level organizational unit for your development work in IntelliJ IDEA. In its finished form, a project may represent a complete software solution. A project is a collection of:` 6 | 7 | - `Your work results: source code, build scripts, configuration files, documentation, artifacts, etc.` 8 | - `SDKs and libraries that you use to develop, compile, run and test your code.` 9 | - `Project settings that represent your working preferences in the context of a project.` 10 | 11 | `A project has one or more modules as its parts.` 12 | 13 | **对于 Module,IntelliJ IDEA 官方是这样介绍的**: 14 | 15 | - `A module is a part of a project that you can compile, run, test and debug independently.` 16 | - `Modules are a way to reduce complexity of large projects while maintaining a common (project) configuration.` 17 | - `Modules are reusable: if necessary, a module can be included in more than one project.` 18 | 19 | 通过上面的介绍,我们知道:在 IntelliJ IDEA 中`Project`是最顶级的结构单元,然后就是`Module`,一个`Project`可以有多个`Module`。目前,主流的大型项目结构基本都是多`Module`的结构,这类项目一般是按功能划分的,比如:`user-core-module`、`user-facade-module`和`user-hessian-module`等等,模块之间彼此可以相互依赖。通过这些`Module`的命名可以看出,它们都是处于同一个项目中的模块,彼此之间是有着不可分割的业务关系。因此,我们可以大致总结出:一个`Project`是由一个或多个`Module`组成, 20 | 21 | - 当为单`Module`项目的时候,这个单独的`Module`实际上就是一个`Project`; 22 | - 当为多`Module`项目的时候,多个模块处于同一个`Project`之中,此时彼此之间具有互相依赖的关联关系。 23 | 24 | 此外, IntelliJ IDEA 的`Project`是一个不具备任何编码设置、构建等开发功能的概念,其主要作用就是起到一个项目定义、范围约束、规范类型的效果,或许,我们也可以简单地理解`Project`就是一个单纯的目录,只是这个目录在命名上必须有其代表性的意义。在缺省情况下,IntelliJ IDEA 是默认单`Project`单`Module`的,这时`Project`和`Module`合二为一,在没有修改存储路径的时候,显然`Project`对`Module`具有强约束作用!不过说实话,这里就是将`Module`的内容放在了`Project`的目录下,实际上还是`Module`自己约束自己。 25 | 26 | ![new-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/new-project.png) 27 | 28 | - **标注 1**:`Project name`,项目名称; 29 | - **标注 2**:`Project location`,项目存储地址; 30 | - **标注 3**:`Module name`,模块名称; 31 | - **标注 4**:`Module file location`,模块存储地址。 32 | 33 | 如上图所示,通过观察`Project`和`Module`的存储地址,我们可以发现,IntelliJ IDEA 在此处建立了一个名为`user-core-module`的目录,并将其放在了名为`user-modules-project`的目录下,而没有将两个目录合二为一,也就为我们建立多`Module`的`Project`作了准备。 34 | 35 | ![user-modules-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/user-modules-project.png) 36 | 37 | 如上图所示,显然`user-modules-project`仅表现为一个目录而已。 38 | 39 | ![new-module](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/new-module.png) 40 | 41 | 如上图所示,依次点击`File -> New -> Module`,进入如下界面: 42 | 43 | ![user-hessian-module](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/user-hessian-module.png) 44 | 45 | 如上图所示,输入`Module name`之后,`Content root`和`Module file location`自动发生改变,然后点击`Finish`,完成: 46 | 47 | ![more-module](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/more-module.png) 48 | 49 | 如上图所示,我们在项目`user-modules-project`中,建立了两个`Module`,分别为`user-core-module`和`user-hessian-module`,然后我们再来看看存储目录: 50 | 51 | ![more-module-package](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/project-module/more-module-package.png) 52 | 53 | 如上图所示,显然在`user-modules-project`目录中,又多了一个名为`user-hessian-module`的目录。 54 | 55 | 至此,多`Module`的`Project`构建完成! 56 | 57 | 58 | ---------- 59 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 60 | -------------------------------------------------------------------------------- /articles/basic-course/install-jdk-win10.md: -------------------------------------------------------------------------------- 1 | # 在 Win10 系统下安装 JDK 及配置环境变量的方法 2 | 3 | 首先,在官网下载 JDK:[Oracle 官网](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 4 | 5 | ![oracle-jdk](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/oracle-jdk.png) 6 | 7 | 如上图所示,在 Oracle 官网下载 JDK,有一点需要注意,那就是在我们下载合适的 JDK 之前,需要先点击 **标记 1** 所在的按钮,选择接受。否则的话,直接点击 JDK 进行下载的时候,将会弹出如下界面: 8 | 9 | ![unaccept](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/unaccept.png) 10 | 11 | 选择`Accept License Agreement`之后,再点击 JDK 进行下载就会弹出下载提示框了,如下图所示: 12 | 13 | ![accept](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/accept.png) 14 | 15 | 下载完成后,双击可执行文件,以博主为例,双击`jdk-8u121-windows-x64`可执行文件,将会进入 JDK 的安装界面: 16 | 17 | ![download-jdk-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/download-jdk-1.png) 18 | 19 | 如上图所示,点击“下一步”,进入如下界面: 20 | 21 | ![download-jdk-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/download-jdk-2.png) 22 | 23 | 在这里有一点需要注意,那就是 JDK 默认安装在`C`盘的`Program Files`目录下,如果需要修改安装路径,则可以点击 **标记 1** 所示的“更改”,一般情况下,选择默认路径就可以,点击“下一步”,进入如下界面: 24 | 25 | ![download-jdk-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/download-jdk-3.png) 26 | 27 | 如上图所示,这个界面是安装与 JDK 同版本的 JRE,其实在 JDK 中已经包含 JRE 了,因此这个 JRE 实际上并没有起什么作用,安装也没有什么问题,在这里,我们选择安装,点击“下一步”,进入如下界面: 28 | 29 | ![download-jdk-4](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/download-jdk-4.png) 30 | 31 | 如上图所示,显示的是 JRE 正在安装中的界面,安装完成后,将会进入如下界面: 32 | 33 | ![download-jdk-5](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/download-jdk-5.png) 34 | 35 | 如上图所示,如果有需要的话,点击“后续步骤”,将会访问教程、API 文档和开发人员指南等内容;否则的话,直接点击“关闭”就可以啦!至此,在 Win10 系统下安装 JDK 完成。接下来,配置环境变量,使 JDK 全局生效。首先,找到 JDK 的安装目录,以博主为例,进入这一层 `C:\Program Files\Java\jdk1.8.0_121`目录,复制以备后用。然后,通过“控制面板”进入“系统”属性,实际上直接选择“此电脑”点击右键选择“属性”即可: 36 | 37 | ![system](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/system.png) 38 | 39 | 如上图所示,点击“高级系统设置”,进入如下界面: 40 | 41 | ![system-property](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/system-property.png) 42 | 43 | 再点击“环境变量”,进入如下界面: 44 | 45 | ![environment](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/environment.png) 46 | 47 | 在这里,就需要我们特别注意了,选择“系统变量”区域的“新建”功能,点击后,进入如下界面: 48 | 49 | ![new-environment](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/new-environment.png) 50 | 51 | 设置系统变量名为`JAVA_HOME`,变量值为`C:\Program Files\Java\jdk1.8.0_121`,点击“确定”,然后打开“系统变量”区域的`Path`,将这条语句`;%JAVA_HOME%\bin`追加到`Path`变量值的最后面,如下图所示: 52 | 53 | ![edit-path](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/edit-path.png) 54 | 55 | 至此,环境变量就已经设置完啦!但是空口无凭啊,我们再验证一下,用事实说话。因此,打开“命令行窗口”,输入命令`java`,结果如下图所示: 56 | 57 | ![cmd](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/cmd.png) 58 | 59 | 再输入命令`javac`,结果如下图所示: 60 | 61 | ![user-think-javac](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/user-think-javac.png) 62 | 63 | 如上图所示的结果,已经可以证明我们的环境变量配置成功啦!不过说实话,我们在`C`盘验证不是很好,因为配置环境变量就是为了在其它位置(如`D`盘)也可以运行 JDK,我们都把 JDK 安装到`C`盘了,再在`C`盘进行验证就有些取巧了,因为就算环境变量没有配置成功,如果我们进入相应的安装目录下,也是可以运行 JDK 的。因此,我们来一个狠的,直接在`D`盘的根目录下创建一个`.java`文件,然后在“命令行窗口”编译并运行,如果这样做还能成功的话,那毫无疑问,环境变量我们肯定配置成功啦! 64 | 65 | ![hello-world-txt](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/hello-world-txt.png) 66 | 67 | 如上图所示,我们先在`D`盘的根目录下创建一个名为`HelloWorld.txt`文件,输入以上代码,然后我们再修改文件的后缀`.txt`为`.java`即可。最后,在“命令行窗口”输入以下命令: 68 | 69 | ![java-hello-world](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/install-jdk-win10/java-hello-world.png) 70 | 71 | 观察运行结果,显然我们的环境变量配置成功啦! 72 | 73 | ---------- 74 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 75 | -------------------------------------------------------------------------------- /articles/basic-course/theme-and-font.md: -------------------------------------------------------------------------------- 1 | # 设置 IntelliJ IDEA 主题和字体的方法 2 | 3 | ## 1 前言 4 | 5 | 在博文「[HelloWorld 项目创建及相关配置文件介绍](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/hello-world.md)」中,我们已经用 IntelliJ IDEA 创建了第一个 Java 项目 HelloWorld,如下图所示: 6 | 7 | ![default-theme](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/default-theme.png) 8 | 9 | 观察上图,大家有没有发现一些问题,例如,整个界面的字体是不是都太小了一点啊?不知道大家感受如何,反正博主看到这么小的字体,当真是头晕眼花啊!因此,接下来,就让我们一起尝试着把 IntelliJ IDEA 的主题和字体都重新设置一遍,看看到底什么样的模式我们看着最舒服。 10 | 11 | ## 2 主题修改 12 | 13 | ### 2.1 界面主题修改 14 | 15 | ![face-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/face-1.png) 16 | 17 | 如上图所示,依次点击`Files -> Settings`,进入如下界面: 18 | 19 | ![face-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/face-2.png) 20 | 21 | - **标注 1**:主题选择区; 22 | - **标注 2**:`Darcula`、`IntelliJ`和`Windows`,三个主题。 23 | 24 | 如上图所示,我们定位到`Appearance & Behavior > Appearance`界面,在 Windows 系统上 IntelliJ IDEA 默认提供三个主题,分别为:`Darcula`、`IntelliJ`和`Windows`。其中,除了`Darcula`是黑色背景的主题,其余两个都是白色背景的主题。在这里,以`Windows`主题为例,演示一下修改后的效果: 25 | 26 | ![face-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/face-3.png) 27 | 28 | 如上图所示,这是在选择`Windows`主题、点击`Apply`之后的效果,为纯白色主题。 29 | 30 | ### 2.2 代码编辑区主题修改 31 | 32 | 33 | ![editor-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/editor-1.png) 34 | 35 | - **标注 1**:主题选择区; 36 | - **标注 2**:`Default`和`Darcula`,两个主题。 37 | 38 | 如上图所示,我们定位到`Editor > Colors & Fonts`界面,在 Windows 系统上 IntelliJ IDEA 默认提供两个编辑区主题,分别为:`Default`和`Darcula`。其中,`Default`为默认主题;`Darcula`为黑色主题。在这里,我们以`Darcula`主题为例,演示一下修改后的效果: 39 | 40 | ![editor-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/editor-2.png) 41 | 42 | 如上图所示,这是在选择`Darcula`主题、点击`Apply`之后的效果,为黑色编辑区主题。通过以上的演示,我们已经知道了,无论是界面还是编辑区的主题都是可以修改的,具体如何修改,这就看我们的心情啦!对于博主来说,比较喜欢`Darcula`主题,因此在接下来的内容中,我们都在`Darcula`主题下进行演示。 43 | 44 | ## 3 字体修改 45 | 46 | ### 3.1 界面主题字体修改 47 | 48 | ![font-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/font-1.png) 49 | 50 | - **标注 1**:重写默认字体(必选); 51 | - **标注 2**:具体可以修改字体大小的数值。 52 | 53 | 如上图所示,我们定位到`Appearance & Behavior > Appearance`界面,如果确定要修改字体大小的话,**标注 1** 所示的`Override default fonts by XXX`为必选项,否则的话,不能修改字体,因为 IntelliJ IDEA 默认是不推荐修改的;**标注 2** 所示的为我们具体可以修改字体大小的数值。在这里,选择`Size`为`14`,演示一下修改后的效果: 54 | 55 | ![font-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/font-2.png) 56 | 57 | 如上图所示,这是在选择`Size`为`14`、点击`Apply`之后的效果,显然界面主题的字体明显都变大了很多。在这里,有一点需要注意,那就是:**有的字体是包含中文的,有的字体则是不包含中文的**。一般情况下,使用英文的国家是不需要额外担心乱码问题的,但是我们需要啊!如果我们选择的字体不包含中文的话,很多位置上可能会出现类似于 口口口口口 这样的乱码问题。例如,`Courier New`和`Monaco`就是纯英文字体,而`Microsoft YaHei`就是包含中文的字体。 58 | 59 | ### 3.2 代码编辑区字体修改 60 | 61 | ![editor-font-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/editor-font-1.png) 62 | 63 | - **标注 1**:`Save as`主题(必选); 64 | - **标注 2**:仅展示等宽字体; 65 | - **标注 3**:字体具体大小的数值; 66 | - **标注 4**:行宽(行与行之间的距离); 67 | - **标注 5**:第二字体; 68 | - **标注 6**:字体、大小及行宽的示例展示区。 69 | 70 | 如上图所示,我们定位到`Editor > Colors & Fonts > Font`界面,**标注 1** 所示的`Save As`表示我们需要另外复制一份编辑区主题,然后才能修改,因为 IntelliJ IDEA 是不能直接在默认的代码模板上修改字体的;**标注 2** 所示的`Show only monospaced fonts`表示只显示系统上的等宽字体,取消勾选后,将显示系统上所有已安装的字体。**标注 5** 所示的`Secondary font`表示第二字体,因为 IntelliJ IDEA 的编码字体有「第一字体」和「第二字体」之分,当有些字符在第一字体不能支持的时候,将会自动使用第二字体进行支持。在这里,我们选择`Size`为`16`,演示一下修改后的效果: 71 | 72 | ![editor-font-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/editor-font-2.png) 73 | 74 | 如上图所示,这是在选择`Size`为`16`、点击`Apply`之后的效果,显然编辑区主题的字体明显都变大了很多。 75 | 76 | ### 3.3 控制台输出字体修改 77 | 78 | ![console-1](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/console-1.png) 79 | 80 | 如上图所示,我们定位到`Editor > Colors & Fonts > Console Font`界面,细心观察之下,我们会发现这个界面和`Editor > Colors & Fonts > Font`界面完全相同,因此我们就不重新介绍一遍啦!在这里,我们选择`Size`为`14`,演示一下修改后的效果: 81 | 82 | ![console-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/theme-and-font/console-2.png) 83 | 84 | 如上图所示,这是在选择`Size`为`14`、点击`Apply`之后的效果,运行程序后,控制台的输出字体显示大了,也清晰了很多。 85 | 86 | 87 | ---------- 88 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 89 | -------------------------------------------------------------------------------- /articles/basic-course/maven-project.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 创建 Maven 项目及设置 java 源目录的方法 2 | 3 | Maven 是一个优秀的项目管理工具,它为我们提供了一个构建完整的生命周期框架。现在,就让我们一起看看如何利用 IntelliJ IDEA 快速的创建 Maven 项目吧! 4 | 5 | ![create-new-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/create-new-project.png) 6 | 7 | 如上图所示,点击`Create New Project`: 8 | 9 | ![new-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/new-project.png) 10 | 11 | - **标注 1**:`Maven`选项; 12 | - **标注 2**:`Project SDK`,项目 SDK; 13 | - **标注 3**:`archetype`,Web 项目框架。 14 | 15 | 如上图所示,先点击 Maven 选项,然后选择 SDK,再从框架中选择`maven-archetype-webapp`用于创建 Web 项目。当然,我们也可以根本不同的需求选择不同的框架以便 IDEA 自动为我们生成项目框架。在这里,有一点需要我们特别注意,那就是:**`Maven 3.3.1+`以上的版本需要`JDK 1.7+`以上的版本与之搭配使用**,否则会出现异常,以至于 Maven 项目创建失败。在上述操作完成后,点击`Next`: 16 | 17 | ![new-project-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/new-project-2.png) 18 | 19 | - **标注 1**:`GroupId`,项目坐标,与`ArtifactId`搭配使用,用于标记项目; 20 | - **标注 2**:`ArtifactId`,项目坐标,与`GroupId`搭配使用,用于标记项目; 21 | - **标注 3**:`Version`,项目版本,与`ArtifactId`、`GroupId`搭配使用,用于唯一标记项目。 22 | 23 | 如上图所示,`ArtifactId`、`GroupId`需要我们自己命名,`Version`默认为`1.0-SNAPSHOT`,表示该项目属于不稳定的快照版本,默认即可。输入完成后,点击`Next`: 24 | 25 | ![new-project-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/new-project-3.png) 26 | 27 | - **标注 1**:`Maven home directory`,Maven 主目录,即最外层目录; 28 | - **标注 2**:`User settings file`,Maven 配置文件; 29 | - **标注 3**:`Local repository`,Maven 本地仓库,用于存储依赖包。 30 | 31 | 如上图所示,依次配置完之后,点击`Next`: 32 | 33 | ![new-project-4](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/new-project-4.png) 34 | 35 | - **标注 1**:`Project name`,项目名称; 36 | - **标注 2**:`Project location`,项目保存位置; 37 | - **标注 3**:`More Settings`,更多配置,如配置项目模块位置、项目格式等。 38 | 39 | 如上图所示,我们将`Project name`和`Module name`统一命名为`gitcode`,依次配置完之后,点击`Next`: 40 | 41 | ![gitcode](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/gitcode.png) 42 | 43 | - **标注 1**:`.idea`,自动生成的 IDEA 配置文件; 44 | - **标注 2**:`src`,自动生成的 Maven 目录结构; 45 | - **标注 3**:`BUILD SUCESS`,Maven 项目创建成功的标志。 46 | 47 | 如上图所示,当控制台输出`BUILD SUCESS`的时候,这意味着 Maven 已经创建完成。但是,如果我们仔细观察 IDEA 自动为我们生成的 Maven 目录结构,会发现这与我们认知中的 Maven 项目的目录结构大不相同,它没有与`main`同级的`test`目录、没有`resources`目录、也没有`java`目录,甚至连源目录都没有标记出来,为啥?实际上,Maven 并没有强制我们必须创建`test`、`resources`、`java`这样的目录,之所以建立这样的目录结构,仅仅是出于我们的习惯以及方便管理项目而已。接下来,我们就手动创建`test`、`resources`、`java`这样的结构,并标记`java`为`Sources Root`,即源目录: 48 | 49 | ![project-structure](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/project-structure.png) 50 | 51 | 如上图所示,以 Mac 电脑为例,依次点击`File`、`Project Structure`选项: 52 | 53 | ![modules](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules.png) 54 | 55 | 如上图所示,在最左边的`Project Structure`列表中选择`Modules`,再点击`Sources`进入我们的项目结构视图,然后点击`src`目录,右键呼出菜单栏,点击`New Folder`即可创建新目录: 56 | 57 | ![modules-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-2.png) 58 | 59 | 如上图所示,这就是我们新创建的目录结构。 60 | 61 | ![modules-3](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-3.png) 62 | 63 | 现在,选择`java`目录,点击`Mark as: Sources`即可将`java`目录标记为源目录: 64 | 65 | ![modules-4](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-4.png) 66 | 67 | 如上图所示,以同样的方法,我们相继标记了`Tests`、`Resources`和`Test Resources`目录,其中`webapp`目录比较特殊,需要我们将其标记为 Web 的项目的资源目录。在这里,点击`gitcode`上面的`+`选项: 68 | 69 | ![modules-5](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-5.png) 70 | 71 | - **标注 1**:`+`,`Add`选项; 72 | - **标注 2**:`Web`,项目类型。 73 | 74 | 如上图所示,依次点击`+`选项以及`Web`类型: 75 | 76 | ![modules-6](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-6.png) 77 | 78 | - **标注 1**:修改按钮; 79 | - **标注 2**:快捷目录选项。 80 | 81 | 如上图所示,`Deploy Descriptor`需要指向项目的`web.xml`文件,一般情况下,默认的目录都是不准确,需要我们重新选择。 82 | 83 | ![modules-7](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/modules-7.png) 84 | 85 | - **标注 1**:修改按钮; 86 | - **标注 2**:快捷目录选项。 87 | 88 | 如上图所示,`Web Resources Directories`需要指向项目的资源目录即`webapp`目录,与`Deploy Descriptor`一样,需要我们重新选择。 89 | 90 | ![gitcode-success](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/maven-project/gitcode-success.png) 91 | 92 | 如上图所示,至此 Maven 项目创建完成,`java`源目录设置成功。 93 | 94 | ---------- 95 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 96 | 97 | -------------------------------------------------------------------------------- /articles/basic-course/hello-world.md: -------------------------------------------------------------------------------- 1 | # HelloWorld 项目创建及相关配置文件介绍 2 | 3 | 在博文「[IntelliJ IDEA 的使用界面介绍](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/use-face.md)」中,我们通过创建一个 Static Web 项目大致了解了 IntelliJ IDEA 的使用界面。接下来,趁着这个热乎劲,我们来创建第一个 Java 项目`HelloWorld`,进入如下界面: 4 | 5 | ![welcome-to-idea](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/welcome-to-idea.png) 6 | 7 | 如上图所示,点击`Create New Project`,进入如下界面: 8 | 9 | ![new-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/new-project.png) 10 | 11 | 上面的界面,我们在前一篇博文中已经进行了介绍。在这里,我们选择`Java --> Java EE`进行项目的创建,然后着重看一下第一个红色箭头所指的`Project SDK`,其表示在接下来我们的项目中所使用的 SDK,要想进行设置,这就需要我们在事先下载好 JDK 啦!那么如何下载并安装 JDK 呢?不用怕,在博文「[在 Win10 系统下安装 JDK 及配置环境变量的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/install-jdk-win10.md)」中,我们已经演示了具体的操作过程了,以 Win10 为例,Win7 同理。接下来,点击`Project SDK`后面的`New`进行 JDK 的设置: 12 | 13 | ![select-home-directory-for-jdk](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/select-home-directory-for-jdk.png) 14 | 15 | 如上图所示,IntelliJ IDEA 默认选择其自带的 JRE,我们选择事先下载好的 JDK,如下图所示: 16 | 17 | ![select-home-directory-for-jdk-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/select-home-directory-for-jdk-2.png) 18 | 19 | 如上图所示,我们只需要定位到`jdk 1.8.0_121`这层目录即可,然后点击`OK`确定: 20 | 21 | ![new-project-next](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/new-project-next.png) 22 | 23 | 如上图所示,展示了选择 JDK 后的样子,点击`Next`,进入下一步: 24 | 25 | ![create-project-from-template](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/create-project-from-template.png) 26 | 27 | - **标注 1**:`Command Line App`会自动创建一个带有`main`方法的类; 28 | - **标注 2**:`Java Hello World`会自动创建一个带有`main`方法的并且会打印输出 Hello World 的类。 29 | 30 | 如上图所示,可以选择`Create project from template`快速创建项目,在这里,咱们不勾选使用模板,手工创建,点击`Next`,进入如下界面: 31 | 32 | ![new-project-finish](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/new-project-finish.png) 33 | 34 | 如上图所示,输入项目名称,也不需要修改`More Settings`,直接点击`Finish`,进入如下界面: 35 | 36 | ![hello-world](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/hello-world.png) 37 | 38 | - **标注 1**:项目结构图; 39 | - **标注 2**:外部库。 40 | 41 | 如上图所示,在项目结构图中,`src`目录为默认的`Source root`,我们一般在该目录下创建包和类;在外部库中,显示了我们导入的 JDK 1.8 版本。接下来,我们在`src`目录下创建包和类: 42 | 43 | ![new-package](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/new-package.png) 44 | 45 | 如上图所示,将鼠标移动到`src`目录上,然后点击右键,选择`New`,再选择`Package`,创建包: 46 | 47 | ![com-hit-demo](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/com-hit-demo.png) 48 | 49 | 如上图所示,我们输入包名为`com.hit.demo`,其中用英文状态下的点`.`进行分隔,表示一次创建多个包,具体效果如下图所示: 50 | 51 | ![hide-empty-middle-package](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/hide-empty-middle-package.png) 52 | 53 | - **标注 1**:多个空包叠在一起; 54 | - **标注 2**:齿轮符号,一般表示设置; 55 | - **标注 3**:选择是否把空包叠在一起。 56 | 57 | 如上图所示,我们创建的多个空包默认是重叠在一起的,如果其中某个包非空,则自动拆开包。在这里,如果感觉空包叠在一起不爽的话,可以点击 **标注 2** 所示的齿轮按钮,再点击 **标注 3** 所示的`Hide Empty Middle Packages`把对勾去掉,变为`Compact Empty Middle Packages`,其效果如下图所示: 58 | 59 | ![compact-empty-middle-packge](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/compact-empty-middle-packge.png) 60 | 61 | 接下来,选择`demo`目录,点击鼠标右边,在选择`Java Class`,进入如下界面: 62 | 63 | ![create-new-class](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/create-new-class.png) 64 | 65 | 如上图所示,将类名(`Name`) 设置为`HelloWorld`,一般情况下,如果类名出现多个单词的话,则每个单词的首字母都大写。类创建完之后,在编辑区敲入代码,如下图所示: 66 | 67 | ![hello-world-class](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/hello-world-class.png) 68 | 69 | 接下来,在“编辑区”点击鼠标右键,选择`Run 'HelloWorld.main()'`,运行后,结果如下图所示: 70 | 71 | ![hello-world-go-go](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/hello-world-go-go.png) 72 | 73 | - **标注 1**:运行结果“HelloWorld!” 74 | - **标注 2**:存放`Module`编译文件的`out`目录。 75 | 76 | 在这里,对于 **标注 1** 所示的内容,毫无疑问,其为在控制台上的输出语句;对于 **标注 2** 所示的内容,则需要我们留心啦,其存放的是项目中所有`Module`的编译文件。如果我们细心一点的话,则会发现`out`和`src`目录的层次结构完全相同。最后,我们在来了解一下项目中的相关配置文件,如下图所示: 77 | 78 | ![idea-iml](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/hello-world/idea-iml.png) 79 | 80 | - **标注 1**:`.idea`为`Project`的配置文件目录; 81 | - **标注 2**:`.iml`为`Module`的配置文件。 82 | 83 | 如上图所示,IntelliJ IDEA 的配置文件都存在`.idea`目录下,以 XML 文件的形式存在,因此我们也可以通过了解这些 XML 文件来了解 IntelliJ IDEA 的相关配置。至于`.iml`文件,则为 IntelliJ IDEA 为每个 Module 自动生成的配置文件,一般情况下,我们是不需要动她的,就让她做一个安静的女神吧!**此外,IntelliJ IDEA 是一个没有 Ctrl + S 的 IDE,因此每次修改完代码之后,咱们只管运行或者调试即可,无需担心保存或者丢失代码的问题。** 84 | 85 | 86 | 87 | ---------- 88 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /articles/difficult-cases/unable-import-maven-project.md: -------------------------------------------------------------------------------- 1 | # 详述 IntelliJ IDEA 遇到 Maven 项目打开(Open)或者导入(Import)失败的解决方法 2 | 3 | ## 问题背景 4 | 5 | 现有一个 Maven 项目,通过 IntelliJ IDEA 的`Open`或者`Import Project`来打开或者导入该项目: 6 | 7 | ![unable-import-maven-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/unable-import-maven-project/unable-import-maven-project.png) 8 | 9 | 如上图所示,导入 Maven 项目失败,提示: 10 | 11 | > **Unable to import maven project: See logs for details** 12 | 13 | 就算我们点击`Event Log`,也获取不到详细的错误信息: 14 | 15 | ![event-log](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/unable-import-maven-project/event-log.png) 16 | 17 | 这时,我们需要通过`Help -> Show Log in Finder`来查看错误日志: 18 | 19 | ![show-log](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/unable-import-maven-project/show-log.png) 20 | 21 | 在我们点击`Show Log in Finder`之后,会在弹出的目录中找到一个名为`idea.log`的日志文件,打开该文件,即可查看详细的错误日志: 22 | 23 | ```bash 24 | 2020-03-16 14:40:03,808 [13325330] INFO - ution.rmi.RemoteProcessSupport - Port/ID: 52340/Maven3ServerImpl952a326a 25 | 2020-03-16 14:40:05,385 [13326907] ERROR - #org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector, see the following errors: 26 | 27 | 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. 28 | while locating org.apache.maven.model.path.PathTranslator 29 | for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) 30 | at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 31 | 32 | 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. 33 | while locating org.apache.maven.model.path.UrlNormalizer 34 | for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) 35 | at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 36 | 37 | 2 errors 38 | java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors: 39 | 40 | 1) No implementation for org.apache.maven.model.path.PathTranslator was bound. 41 | while locating org.apache.maven.model.path.PathTranslator 42 | for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.pathTranslator(Unknown Source) 43 | at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 44 | 45 | 2) No implementation for org.apache.maven.model.path.UrlNormalizer was bound. 46 | while locating org.apache.maven.model.path.UrlNormalizer 47 | for field at org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator.urlNormalizer(Unknown Source) 48 | at org.codehaus.plexus.DefaultPlexusContainer$1.configure(DefaultPlexusContainer.java:350) 49 | 50 | 2 errors 51 | at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543) 52 | at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:159) 53 | at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) 54 | at com.google.inject.Guice.createInjector(Guice.java:87) 55 | at com.google.inject.Guice.createInjector(Guice.java:69) 56 | at com.google.inject.Guice.createInjector(Guice.java:59) 57 | at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:344) 58 | at org.codehaus.plexus.DefaultPlexusContainer.addComponent(DefaultPlexusContainer.java:332) 59 | at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customizeComponents(Maven3ServerEmbedderImpl.java:555) 60 | at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.customize(Maven3ServerEmbedderImpl.java:529) 61 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 62 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 63 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 64 | at java.lang.reflect.Method.invoke(Method.java:498) 65 | ... omit some log ... 66 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 67 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) 68 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 69 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 70 | at java.lang.Thread.run(Thread.java:745) 71 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - IntelliJ IDEA 2017.1.6 Build #IU-171.4694.73 72 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - JDK: 1.8.0_112 73 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - VM: Java HotSpot(TM) 64-Bit Server VM 74 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - Vendor: Oracle Corporation 75 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - OS: Mac OS X 76 | 2020-03-16 14:40:05,386 [13326908] ERROR - #org.jetbrains.idea.maven - Last Action: Maven.Reimport 77 | ``` 78 | 79 | 通过错误日志,我们可以知道到底出哪里出现了问题。 80 | 81 | 对于上述问题,实际上就是 Maven 的版本与 IntelliJ IDEA 的版本不兼容的问题。 82 | 83 | 84 | 85 | ## 解决方法 86 | 在本案例中,两者的版本分别为: 87 | 88 | - IntelliJ IDEA(`2017.1.6`) 89 | - Maven(`3.6.3`) 90 | 91 | 当我切换 Maven 的版本为`3.2.5`的时候,该问题解决。 92 | 93 | ![maven-config](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/difficult-cases/unable-import-maven-project/maven-config.png) 94 | 95 | 说实话,无论是 IntelliJ IDEA 还是 Maven 版本更新的都比较快,想要找老版本有的安装包还真不太好找。 96 | 97 | 在此,给大家分享一个下载 Maven 各种版本的「[仓库](https://archive.apache.org/dist/maven/maven-3/)」,**强烈推荐收藏**! 98 | 99 | ---------- 100 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 101 | -------------------------------------------------------------------------------- /articles/idea-active-code.md: -------------------------------------------------------------------------------- 1 | > **温馨提示**:本教程的 GitHub 地址为「[intellij-idea-tutorial](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md)」,欢迎感兴趣的童鞋`Star`、`Fork`,纠错。 2 | 3 | ![guobin-registercode](https://img-blog.csdnimg.cn/20190405102627920.png) 4 | 5 | - 首先,呼吁有条件的同学「[购买正版](https://www.jetbrains.com/idea/buy/#edition=commercial)」,支持正版,人人有责,捂脸! 6 | 7 | > **两个激活码**:一个是可以激活 JetBrains 全部产品最新版本的激活码,另一个是拥有`IntelliJ IDEA(2017.1)`及其回退版本的永久授权的激活码。无论大家选择哪个激活码,都千万不要忘记修改`hosts`文件,以拦截 JetBrains 收集激活码的使用信息。否则的话,我们分享的注册码可能很快就被封掉啦!重要的事情说三遍, 8 | 9 | - **第一遍,修改 hosts 文件** ~~~ 10 | - **第二遍,修改 hosts 文件** ~~~ 11 | - **第三遍,修改 hosts 文件** ~~~ 12 | 13 | 在`hosts`文件中,添加以下映射关系: 14 | 15 | ```java 16 | 0.0.0.0 account.jetbrains.com 17 | 0.0.0.0 www.jetbrains.com 18 | ``` 19 | 20 | 具体的修改`hosts`文件的方法,可以参考「[详述 hosts 文件的作用及修改 hosts 文件的方法](http://blog.csdn.net/qq_35246620/article/details/66970211?locationNum=1&fps=1)」这篇文章。 21 | 22 | ### First Activation Code 23 | 24 | ``` 25 | 56ZS5PQ1RF-eyJsaWNlbnNlSWQiOiI1NlpTNVBRMVJGIiwibGljZW5zZWVOYW1lIjoi5q2j54mI5o6I5p2DIC4iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiRm9yIGVkdWNhdGlvbmFsIHVzZSBvbmx5IiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiQ0wiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJSTSIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IldTIiwicGFpZFVwVG8iOiIyMDIwLTAzLTEwIn0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjAtMDMtMTAifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9LHsiY29kZSI6IlJTVSIsInBhaWRVcFRvIjoiMjAyMC0wMy0xMCJ9XSwiaGFzaCI6IjEyMjkxNDk4LzAiLCJncmFjZVBlcmlvZERheXMiOjAsImF1dG9Qcm9sb25nYXRlZCI6ZmFsc2UsImlzQXV0b1Byb2xvbmdhdGVkIjpmYWxzZX0=-SYSsDcgL1WJmHnsiGaHUWbaZLPIe2oI3QiIneDtaIbh/SZOqu63G7RGudSjf3ssPb1zxroMti/bK9II1ugHz/nTjw31Uah7D0HqeaCO7Zc0q9BeHysiWmBZ+8bABs5vr25GgIa5pO7CJhL7RitXQbWpAajrMBAeZ2En3wCgNwT6D6hNmiMlhXsWgwkw2OKnyHZ2dl8yEL+oV5SW14t7bdjYGKQrYjSd4+2zc4FnaX88yLnGNO9B3U6G+BuM37pxS5MjHrkHqMTK8W3I66mIj6IB6dYXD5nvKKO1OZREBAr6LV0BqRYSbuJKFhZ8nd6YDG20GvW6leimv0rHVBFmA0w==-MIIElTCCAn2gAwIBAgIBCTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBMB4XDTE4MTEwMTEyMjk0NloXDTIwMTEwMjEyMjk0NlowaDELMAkGA1UEBhMCQ1oxDjAMBgNVBAgMBU51c2xlMQ8wDQYDVQQHDAZQcmFndWUxGTAXBgNVBAoMEEpldEJyYWlucyBzLnIuby4xHTAbBgNVBAMMFHByb2QzeS1mcm9tLTIwMTgxMTAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxcQkq+zdxlR2mmRYBPzGbUNdMN6OaXiXzxIWtMEkrJMO/5oUfQJbLLuMSMK0QHFmaI37WShyxZcfRCidwXjot4zmNBKnlyHodDij/78TmVqFl8nOeD5+07B8VEaIu7c3E1N+e1doC6wht4I4+IEmtsPAdoaj5WCQVQbrI8KeT8M9VcBIWX7fD0fhexfg3ZRt0xqwMcXGNp3DdJHiO0rCdU+Itv7EmtnSVq9jBG1usMSFvMowR25mju2JcPFp1+I4ZI+FqgR8gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQAF8uc+YJOHHwOFcPzmbjcxNDuGoOUIP+2h1R75Lecswb7ru2LWWSUMtXVKQzChLNPn/72W0k+oI056tgiwuG7M49LXp4zQVlQnFmWU1wwGvVhq5R63Rpjx1zjGUhcXgayu7+9zMUW596Lbomsg8qVve6euqsrFicYkIIuUu4zYPndJwfe0YkS5nY72SHnNdbPhEnN8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow== 26 | ``` 27 | 28 | ### Second Activation Code 29 | 30 | ``` 31 | MNQ043JMTU-eyJsaWNlbnNlSWQiOiJNTlEwNDNKTVRVIiwibGljZW5zZWVOYW1lIjoiR1VPIEJJTiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiIiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwiZmFsbGJhY2tEYXRlIjoiMjAxOS0wNC0wNSIsInBhaWRVcFRvIjoiMjAyMC0wNC0wNCJ9XSwiaGFzaCI6IjEyNjIxNDIwLzAiLCJncmFjZVBlcmlvZERheXMiOjcsImF1dG9Qcm9sb25nYXRlZCI6ZmFsc2UsImlzQXV0b1Byb2xvbmdhdGVkIjpmYWxzZX0=-tltrJHc5lqCKLnza1bcLhMzDkfJeBqhRWbvcrPF9Gqo+X+iFWeKQXoEUOlrG38uSzzmX05ph//PgXgyVfP5RXKsaRMfrv/thoouS5sA0aTemm3z6uRiFirTDj60KSGr5XZoP/WAXO4nuti6SRKZUbr/VSAtRPQRiCJvevq+3gWPDGu2aZ0AemiNLq4qIVWH3wxTN7lK2h5uJssZsyy35Yy9O703c5PFU0fxCj2HRgXq7H/91X+ZNLvvAZAVU9B7bOqnY4ZzNNV/cjY8B5gNo53Lo6s2szEV7DsZ+8e7k8P4Yo81DKxneCBoe4wiZmRaCIT6wK3/27KrtQTFMcGeZMA==-MIIElTCCAn2gAwIBAgIBCTANBgkqhkiG9w0BAQsFADAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBMB4XDTE4MTEwMTEyMjk0NloXDTIwMTEwMjEyMjk0NlowaDELMAkGA1UEBhMCQ1oxDjAMBgNVBAgMBU51c2xlMQ8wDQYDVQQHDAZQcmFndWUxGTAXBgNVBAoMEEpldEJyYWlucyBzLnIuby4xHTAbBgNVBAMMFHByb2QzeS1mcm9tLTIwMTgxMTAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxcQkq+zdxlR2mmRYBPzGbUNdMN6OaXiXzxIWtMEkrJMO/5oUfQJbLLuMSMK0QHFmaI37WShyxZcfRCidwXjot4zmNBKnlyHodDij/78TmVqFl8nOeD5+07B8VEaIu7c3E1N+e1doC6wht4I4+IEmtsPAdoaj5WCQVQbrI8KeT8M9VcBIWX7fD0fhexfg3ZRt0xqwMcXGNp3DdJHiO0rCdU+Itv7EmtnSVq9jBG1usMSFvMowR25mju2JcPFp1+I4ZI+FqgR8gyG8oiNDyNEoAbsR3lOpI7grUYSvkB/xVy/VoklPCK2h0f0GJxFjnye8NT1PAywoyl7RmiAVRE/EKwIDAQABo4GZMIGWMAkGA1UdEwQCMAAwHQYDVR0OBBYEFGEpG9oZGcfLMGNBkY7SgHiMGgTcMEgGA1UdIwRBMD+AFKOetkhnQhI2Qb1t4Lm0oFKLl/GzoRykGjAYMRYwFAYDVQQDDA1KZXRQcm9maWxlIENBggkA0myxg7KDeeEwEwYDVR0lBAwwCgYIKwYBBQUHAwEwCwYDVR0PBAQDAgWgMA0GCSqGSIb3DQEBCwUAA4ICAQAF8uc+YJOHHwOFcPzmbjcxNDuGoOUIP+2h1R75Lecswb7ru2LWWSUMtXVKQzChLNPn/72W0k+oI056tgiwuG7M49LXp4zQVlQnFmWU1wwGvVhq5R63Rpjx1zjGUhcXgayu7+9zMUW596Lbomsg8qVve6euqsrFicYkIIuUu4zYPndJwfe0YkS5nY72SHnNdbPhEnN8wcB2Kz+OIG0lih3yz5EqFhld03bGp222ZQCIghCTVL6QBNadGsiN/lWLl4JdR3lJkZzlpFdiHijoVRdWeSWqM4y0t23c92HXKrgppoSV18XMxrWVdoSM3nuMHwxGhFyde05OdDtLpCv+jlWf5REAHHA201pAU6bJSZINyHDUTB+Beo28rRXSwSh3OUIvYwKNVeoBY+KwOJ7WnuTCUq1meE6GkKc4D/cXmgpOyW/1SmBz3XjVIi/zprZ0zf3qH5mkphtg6ksjKgKjmx1cXfZAAX6wcDBNaCL+Ortep1Dh8xDUbqbBVNBL4jbiL3i3xsfNiyJgaZ5sX7i8tmStEpLbPwvHcByuf59qJhV/bZOl8KqJBETCDJcY6O2aqhTUy+9x93ThKs1GKrRPePrWPluud7ttlgtRveit/pcBrnQcXOl1rHq7ByB8CFAxNotRUYL9IF5n3wJOgkPojMy6jetQA5Ogc8Sm7RG6vg1yow== 32 | ``` 33 | 34 | 35 | 36 | -------- 37 | 38 | 39 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 史上最简单的 IntelliJ IDEA 教程 2 | 3 | ![author](https://img.shields.io/badge/author-chariesgavin-blueviolet.svg)![issues](https://img.shields.io/github/issues/guobinhit/intellij-idea-tutorial.svg)![stars](https://img.shields.io/github/stars/guobinhit/intellij-idea-tutorial.svg)![forks]( https://img.shields.io/github/forks/guobinhit/intellij-idea-tutorial.svg)![license](https://img.shields.io/github/license/guobinhit/intellij-idea-tutorial.svg) 4 | 5 | ## 前言 6 | 7 |   IntelliJ IDEA(简称 IDEA),是 Java 语言开发的集成环境,IDEA 在业界被公认为最好的 Java 开发工具之一,尤其在智能代码助手、代码自动提示、重构、J2EE 支持、各类版本工具(Git、SVN、GitHub 等)、JUnit、CVS 整合、代码分析和创新的 GUI 设计等方面的功能都值得称道。至于 Eclipse 本人接触的不多,因此也无法比较,但殊途同归,无论选择什么集成开发环境,都是为了辅助咱们编程,所以可以说:**没有最好的工具,只有最适合自己的工具**。因此,撰写本系列文章的目的很简单,就是想把自己的经验整理记录下来,当然,如果能够在此基础上帮助大家快速入门并掌握 Intellij IDEA 那就再好不过啦! 8 | 9 | - **温馨提示**:此教程使用的工具为`IntelliJ IDEA 2017(.1.5)`版本 10 | - **官网地址**:http://www.jetbrains.com/idea/download 11 | 12 | 13 | ## 索引 14 | 15 | - [基础教程](#基础教程) 16 | - [实用技巧](#实用技巧) 17 | - [疑难杂症](#疑难杂症) 18 | - [星路历程](#星路历程) 19 | 20 | 21 | 22 | ## 基础教程 23 | 24 | - 安装 IDE 的方法 25 | - [基于 Windows 系统安装 IntelliJ IDEA 的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/install-intellij-idea-on-windows.md) 26 | - [基于 Mac 系统安装 PyCharm 的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/install-pycharm-on-mac.md) 27 | - 初识 IDEA 的世界 28 | - [首次运行 IntelliJ IDEA 示例](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/first-run-idea.md) 29 | - 核心文件讲解 30 | - [IntelliJ IDEA 安装目录的核心文件讲解](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/core-file-talk.md) 31 | - 使用界面介绍 32 | - [详述 IntelliJ IDEA 的使用界面](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/use-face.md) 33 | - 第一个项目 HelloWorld 34 | - [HelloWorld 项目创建及相关配置文件介绍](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/hello-world.md) 35 | - 设置主题和字体 36 | - [设置 IntelliJ IDEA 主题和字体的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/theme-and-font.md) 37 | - 模板注释 38 | - [修改 IntelliJ IDEA 模板注释的内容](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/modify-user-template.md) 39 | - 常见图标介绍 40 | - [常见文件类型的图标介绍](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/idea-icon.md) 41 | - 缓存及索引 42 | - [缓存和索引的介绍及清理方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/index-and-cache.md) 43 | - 编译方式 44 | - [编译方式介绍及编译器的设置和选择](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/compile-method.md) 45 | - 代码调试 46 | - [详述 IntelliJ IDEA 之 Debug 篇](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/debug-skills.md) 47 | - 多模块项目 48 | - [IntelliJ IDEA 中 Project 和 Module 的概念及区别](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/project-module.md) 49 | - 版本控制 50 | - [详述 IntelliJ IDEA 中的版本控制机制](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/version-control.md) 51 | - 插件 52 | - [详述 IntelliJ IDEA 插件的安装及使用方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/plugins.md) 53 | - 创建 Maven 项目 54 | - [详述 IntelliJ IDEA 创建 Maven 项目及设置 java 源目录的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/maven-project.md) 55 | - 搭建 Spring MVC 框架 56 | - [IntelliJ IDEA 中的 Maven 项目初体验及搭建 Spring MVC 框架](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/run-maven-springmvc.md) 57 | 58 | 59 | ## 实用技巧 60 | 61 | 62 | - 快捷键 63 | - [Mac](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/keymap-mac.md) 64 | - [Windows](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/keymap-windows.md) 65 | - 恢复代码 66 | - [详述 IntelliJ IDEA 中恢复代码的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/recovery-code.md) 67 | - 中文乱码问题 68 | - [IntelliJ IDEA 控制台输出中文乱码问题的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/solve-garbled-questions.md) 69 | - 序列化 70 | - [详述 IntelliJ IDEA 中自动生成 serialVersionUID 的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/serialVersionUID.md) 71 | - 代码审查 72 | - [详述 IntelliJ IDEA 提交代码前的 Code Analysis 机制](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/code-analysis.md) 73 | - 版本管理 74 | - [关于 IntelliJ IDEA 中 Schedule for Addition 的问题](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/schedule.md) 75 | - [详述 IntelliJ IDEA 版本控制不显示颜色提示的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/version-control-color-tips.md) 76 | - 彩色代码主题 77 | - [手把手教你设置 IntelliJ IDEA 彩色代码主题](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/color-code.md) 78 | - 远程调试 79 | - [详述 IntelliJ IDEA 远程调试 Tomcat 的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/the-method-of-remote-debugging-with-idea.md) 80 | - 代码对比 81 | - [利用 IntelliJ IDEA 进行代码对比的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/compare-code.md) 82 | - 依赖冲突 83 | - [详述使用 IntelliJ IDEA 解决 jar 包冲突的问题](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/practical-skills/conflict-jar.md) 84 | 85 | 86 | ## 疑难杂症 87 | 88 | - [详述 IntelliJ IDEA 遇到 java -source 1.3 中不支持某某操作的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/difficult-cases/java-source.md) 89 | - [详述 IntelliJ IDEA 遇到 JavaLaunchHelper 多种实现的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/difficult-cases/java-launch-helper.md) 90 | - [详述 IntelliJ IDEA 遇到快捷键以及删除键不好使的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/difficult-cases/keymap-delete.md) 91 | - [详述 IntelliJ IDEA 遇到 Maven 项目打开(Open)或者导入(Import)失败的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/difficult-cases/unable-import-maven-project.md) 92 | - [详述 IntelliJ IDEA 遇到 Maven 项目 pom.xml 文件没有识别的解决方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/difficult-cases/maven-pom-unrecognized.md) 93 | 94 | 95 | ---------- 96 | 此外,附上一句格言,望共勉:**好学若饥,谦卑若愚。** 97 | 98 | 99 | - [↑↑↑ 返回顶部(RETURN THE TOP) ↑↑↑](#索引) 100 | 101 | -------------------------------------------------------------------------------- /articles/practical-skills/keymap-mac.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 常用快捷键 之 Mac 版 2 | 3 | > **温馨提示**:在 IntelliJ IDEA 中有两个 Mac 版本的快捷键,分别为 Mac OS X 和 Mac OS X 10.5+, 其中 Mac OS X 10.5+ 为 IntelliJ IDEA 默认的快捷键版本。此外,建议将 Mac 系统中与 IntelliJ IDEA 冲突的快捷键取消或更改,不建议改 IntelliJ IDEA 的默认快捷键。 4 | 5 | ### Mac 键盘符号和修饰键说明 6 | 7 | - `⌘` ——> `Command` 8 | - `⇧` ——> `Shift` 9 | - `⌥` ——> `Option` 10 | - `⌃` ——> `Control` 11 | - `↩︎` ——> `Return/Enter` 12 | - `⌫` ——> `Delete` 13 | - `⌦` ——> `向前删除键(Fn + Delete)` 14 | - `↑` ——> `上箭头` 15 | - `↓` ——> `下箭头` 16 | - `←` ——> `左箭头` 17 | - `→` ——> `右箭头` 18 | - `⇞` ——> `Page Up(Fn + ↑)` 19 | - `⇟` ——> `Page Down(Fn + ↓)` 20 | - `⇥` ——> `右制表符(Tab键)` 21 | - `⇤` ——> `左制表符(Shift + Tab)` 22 | - `⎋` ——> `Escape(Esc)` 23 | - `End` ——> `Fn + →` 24 | - `Home` ——> `Fn + ←` 25 | 26 | ### Part 1:Editing(编辑) 27 | 28 | | 快捷键 | 作用 | 29 | | ------------- |:-------------| 30 | | `Control + Space` | 基本的代码补全(补全任何类、方法、变量) | 31 | | `Control + Shift + Space` | 智能代码补全(过滤器方法列表和变量的预期类型) | 32 | | `Command + Shift + Enter` | 自动结束代码,行末自动添加分号 | 33 | | `Command + P` | 显示方法的参数信息 | 34 | | `Control + J` | 快速查看文档 | 35 | | `Shift + F1` | 查看外部文档(在某些代码上会触发打开浏览器显示相关文档) | 36 | | `Command` + 鼠标放在代码上 | 显示代码简要信息 | 37 | | `Command + F1` | 在错误或警告处显示具体描述信息 | 38 | | `Command + N`, `Control + Enter`, `Control + N` | 生成代码(`getter`、`setter`、`hashCode`、`equals`、`toString`、构造函数等) | 39 | | `Control + O` | 覆盖方法(重写父类方法) | 40 | | `Control + I` | 实现方法(实现接口中的方法) | 41 | | `Command + Option + T` | 包围代码(使用`if...else`、`try...catch`、`for`、`synchronized`等包围选中的代码) | 42 | | `Command + /` | 注释 / 取消注释与行注释 | 43 | | `Command + Option + /` | 注释 / 取消注释与块注释 | 44 | | `Option` + 方向键上 | 连续选中代码块 | 45 | | `Option` + 方向键下 | 减少当前选中的代码块 | 46 | | `Control + Shift + Q` | 显示上下文信息 | 47 | | `Option + Enter` | 显示意向动作和快速修复代码 | 48 | |`Command + Option + L` |格式化代码| 49 | |`Control + Option + O` |优化 import| 50 | |`Control + Option + I` |自动缩进线| 51 | |`Tab / Shift + Tab` |缩进代码 / 反缩进代码| 52 | |`Command + X` |剪切当前行或选定的块到剪贴板| 53 | |`Command + C` |复制当前行或选定的块到剪贴板| 54 | |`Command + V` |从剪贴板粘贴| 55 | |`Command + Shift + V` |从最近的缓冲区粘贴| 56 | |`Command + D` |复制当前行或选定的块| 57 | |`Command + Delete` |删除当前行或选定的块的行| 58 | |`Control + Shift + J` |智能的将代码拼接成一行| 59 | |`Command + Enter`| 智能的拆分拼接的行| 60 | |`Shift + Enter` |开始新的一行| 61 | |`Command + Shift + U`| 大小写切换| 62 | |`Command + Shift + ]` / `Command + Shift + [` |选择直到代码块结束 / 开始| 63 | |`Option + Fn + Delete` |删除到单词的末尾| 64 | |`Option + Delete`| 删除到单词的开头| 65 | |`Command` + 加号 / `Command` + 减号| 展开 / 折叠代码块| 66 | |`Command + Shift` + 加号 |展开所以代码块| 67 | |`Command + Shift` + 减号 |折叠所有代码块| 68 | |`Command + W` |关闭活动的编辑器选项卡| 69 | 70 | ### Part 2:Search / Replace(查询/替换) 71 | 72 | | 快捷键 | 作用 | 73 | | ------------- |:-------------| 74 | |`Double Shift`| 查询任何东西| 75 | |`Command + F` |文件内查找| 76 | |`Command + G` |查找模式下,向下查找| 77 | |`Command + Shift + G`| 查找模式下,向上查找| 78 | |`Command + R` |文件内替换| 79 | |`Command + Shift + F`|全局查找(根据路径)| 80 | |`Command + Shift + R`|全局替换(根据路径)| 81 | |`Command + Shift + S`|查询结构(Ultimate Edition 版专用,需要在 Keymap 中设置)| 82 | |`Command + Shift + M` |替换结构(Ultimate Edition 版专用,需要在 Keymap 中设置)| 83 | 84 | ### Part 3:Usage Search(使用查询) 85 | 86 | | 快捷键 | 作用 | 87 | | ------------- |:-------------| 88 | |`Option + F7` / `Command + F7`| 在文件中查找用法 / 在类中查找用法| 89 | |`Command + Shift + F7` |在文件中突出显示的用法| 90 | |`Command + Option + F7`| 显示用法| 91 | 92 | ### Part 4:Compile and Run(编译和运行) 93 | 94 | | 快捷键 | 作用 | 95 | | ------------- |:-------------| 96 | |`Command + F9`| 编译 Project| 97 | |`Command + Shift + F9` |编译选择的文件、包或模块| 98 | |`Control + Option + R` |弹出 Run 的可选择菜单| 99 | |`Control + Option + D` |弹出 Debug 的可选择菜单| 100 | |`Control + R `|运行| 101 | |`Control + D` |调试| 102 | |`Control + Shift + R`, `Control + Shift + D`| 从编辑器运行上下文环境配置| 103 | 104 | ### Part 5:Debugging(调试) 105 | 106 | | 快捷键 | 作用 | 107 | | ------------- |:-------------| 108 | |`F8` |进入下一步,如果当前行断点是一个方法,则不进入当前方法体内| 109 | |`F7` |进入下一步,如果当前行断点是一个方法,则进入当前方法体内,如果该方法体还有方法,则不会进入该内嵌的方法中| 110 | |`Shift + F7` |智能步入,断点所在行上有多个方法调用,会弹出进入哪个方法| 111 | |`Shift + F8` |跳出| 112 | |`Option + F9` |运行到光标处,如果光标前有其他断点会进入到该断点| 113 | |`Option + F8` |计算表达式(可以更改变量值使其生效)| 114 | |`Command + Option + R` |恢复程序运行,如果该断点下面代码还有断点则停在下一个断点上| 115 | |`Command + F8` |切换断点(若光标当前行有断点则取消断点,没有则加上断点)| 116 | |`Command + Shift + F8`| 查看断点信息| 117 | 118 | ### Part 6:Navigation(导航) 119 | 120 | | 快捷键 | 作用 | 121 | | ------------- |:-------------| 122 | | `Command + O`| 查找类文件| 123 | | `Command + Shift + O` |查找所有类型文件、打开文件、打开目录,打开目录需要在输入的内容前面或后面加一个反斜杠`/`| 124 | |`Command + Option + O` |前往指定的变量 / 方法| 125 | |`Control` + 方向键左 / `Control` + 方向键右| 左右切换打开的编辑 tab 页| 126 | |`F12` |返回到前一个工具窗口| 127 | |`Esc` |从工具窗口进入代码文件窗口| 128 | |`Shift + Esc`| 隐藏当前或最后一个活动的窗口,且光标进入代码文件窗口| 129 | |`Command + Shift + F4` |关闭活动 `run/messages/find/... tab` | 130 | |`Command + L`| 在当前文件跳转到某一行的指定处| 131 | |`Command + E` |显示最近打开的文件记录列表| 132 | |`Option` + 方向键左 / `Option` + 方向键右 |光标跳转到当前单词 / 中文句的左 / 右侧开头位置| 133 | |`Command + Option` + 方向键左 / `Command + Option` + 方向键右 |退回 / 前进到上一个操作的地方| 134 | |`Command + Shift + Delete` |跳转到最后一个编辑的地方| 135 | |`Option + F1`| 显示当前文件选择目标弹出层,弹出层中有很多目标可以进行选择(如在代码编辑窗口可以选择显示该文件的 Finder)| 136 | |`Command + B` / `Command` + 鼠标点击 |进入光标所在的方法/变量的接口或是定义处| 137 | |`Command + Option + B` |跳转到实现处,在某个调用的方法名上使用会跳到具体的实现处,可以跳过接口| 138 | |`Option + Space`, `Command + Y` |快速打开光标所在方法、类的定义| 139 | |`Control + Shift + B`| 跳转到类型声明处| 140 | |`Command + U` |前往当前光标所在方法的父类的方法 / 接口定义| 141 | |`Control` + 方向键下 / `Control` + 方向键上 |当前光标跳转到当前文件的前一个 / 后一个方法名位置| 142 | |`Command + ]` / `Command + [` |移动光标到当前所在代码的花括号开始 / 结束位置| 143 | |`Command + F12`| 弹出当前文件结构层,可以在弹出的层上直接输入进行筛选(可用于搜索类中的方法)| 144 | |`Control + H`| 显示当前类的层次结构| 145 | |`Command + Shift + H` |显示方法层次结构| 146 | |`Control + Option + H` |显示调用层次结构| 147 | |`F2` / `Shift + F2`| 跳转到下一个 / 上一个突出错误或警告的位置| 148 | |`F4` / `Command` + 方向键下| 编辑 / 查看代码源| 149 | |`Option + Home` | 显示到当前文件的导航条| 150 | |`F3` | 选中文件 / 文件夹 / 代码行,添加 / 取消书签| 151 | |`Option + F3`| 选中文件 / 文件夹/代码行,使用助记符添加 / 取消书签| 152 | |`Control + 0`...`Control + 9`| 定位到对应数值的书签位置| 153 | |`Command + F3` |显示所有书签| 154 | 155 | ### Part 7:Refactoring(重构) 156 | 157 | | 快捷键 | 作用 | 158 | | ------------- |:-------------| 159 | |`F5`| 复制文件到指定目录| 160 | |`F6`| 移动文件到指定目录| 161 | |`Command + Delete` |在文件上为安全删除文件,弹出确认框| 162 | |`Shift + F6` |重命名文件| 163 | |`Command + F6` |更改签名| 164 | |`Command + Option + N` |一致性| 165 | |`Command + Option + M` |将选中的代码提取为方法| 166 | |`Command + Option + V` |提取变量| 167 | |`Command + Option + F` |提取字段| 168 | |`Command + Option + C` |提取常量| 169 | |`Command + Option + P` |提取参数| 170 | 171 | ### Part 8:VCS / Local History(版本控制 / 本地历史记录) 172 | 173 | | 快捷键 | 作用 | 174 | | ------------- |:-------------| 175 | |`Command + K` |提交代码到版本控制器| 176 | |`Command + T` |从版本控制器更新代码| 177 | |`Option + Shift + C` |查看最近的变更记录| 178 | |`Control + C` |快速弹出版本控制器操作面板| 179 | 180 | ### Part 9:Live Templates(动态代码模板) 181 | 182 | | 快捷键 | 作用 | 183 | | ------------- |:-------------| 184 | |`Command + Option + J` |弹出模板选择窗口,将选定的代码使用动态模板包住| 185 | |`Command + J` |插入自定义动态代码模板| 186 | 187 | ### Part 10:General(通用) 188 | 189 | | 快捷键 | 作用 | 190 | | ------------- |:-------------| 191 | |`Command + 1`...`Command + 9`| 打开相应编号的工具窗口| 192 | |`Command + S` |保存所有| 193 | |`Command + Option + Y` |同步、刷新| 194 | |`Control + Command + F` |切换全屏模式| 195 | |`Command + Shift + F12`| 切换最大化编辑器| 196 | |`Option + Shift + F`| 添加到收藏夹| 197 | |`Option + Shift + I` |检查当前文件与当前的配置文件| 198 | |Control + `| 快速切换当前的 scheme(切换主题、代码样式等)| 199 | |`Command + ,` |打开 IDEA 系统设置| 200 | |`Command + ;` |打开项目结构对话框| 201 | |`Shift + Command + A` |查找动作(可设置相关选项)| 202 | |`Control + Shift + Tab` |编辑窗口标签和工具窗口之间切换(如果在切换的过程加按上 delete,则是关闭对应选中的窗口)| 203 | 204 | 205 | ---------- 206 | 207 | **IntelliJ IDEA DEFAULT KEYMAP**:https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf 208 | 209 | 210 | ---------- 211 | 212 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 213 | 214 | 215 | 216 | -------------------------------------------------------------------------------- /articles/basic-course/version-control.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 中的版本控制机制 2 | 3 | 在之前的「[史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md)」之中,我们已经了解了很多关于 IntelliJ IDEA 的使用方法,至少可以独立的运用 IntelliJ IDEA 进行项目开发啦!但是一个人进行项目开发更趋向于理想化,更多的则是团队协同开发。这时,我们就需要了解一个非常重要的概念啦,那就是“**版本控制**”。 4 | 5 | 在此,我们可以简单回顾“版本控制”的发展史。起初,并没有关于版本控制的概念,在协同开发的时候,大家都是自己保持项目代码,或者互相拷贝代码,这样在合并代码的过程中就难免遇到很多不兼容的问题;这就促使“集中式版本控制系统(CVCS)”的出现,例如 SVN、CVS 等,但这仍然有一个风险,那就是如果源码库出现问题,导致项目代码丢失,那么大家手里的都是部分代码,就算勉强合并到一起,也不能保证项目源码的准确性;因此,这又促使“分布式版本控制系统(DVCS)”的出现,例如 Git,它的好处显而易见,每个人从源码库中检出的代码,都是作为一份独立的、完整的拷贝代码存在,这时就算源码库出现问题,甚至源码丢失,那么任何一个人的代码都可以作为源码进行共享,从而大大提高了协同开发的抗风险能力。 6 | 7 | 因此,在本文中,博主更倾向于推荐大家使用分布式版本控制系统。但是一般情况下,我们仅需要下载一个版本控制系统的客户端即可,在这里,根据操作系统的不同,博主分别推荐一个个人感觉非常好用的版本控制系统客户端: 8 | 9 | - Windows 版本控制系统客户端:**TortoiseSVN**; 10 | - Mac 版本控制系统客户端:**CornerStone**. 11 | 12 | 接下来,我们就进入主题,正式开始介绍 IntelliJ IDEA 中的版本控制机制: 13 | 14 | ![idea-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/idea-version-control.png) 15 | 16 | 如上图所示,点击`Settings`,进行如下界面: 17 | 18 | ![settings-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/settings-version-control.png) 19 | 20 | - **标注 1**:`Plugins`,插件; 21 | - **标注 2**:`Version Control`,版本控制。 22 | 23 | 如上图所示,标记出了“插件”和“版本控制”两个选项。有些人可能会认为 IntelliJ IDEA 自带了 SVN 或者 Git 等版本控制系统,因此只要安装了 IntelliJ IDEA 就可以使用版本控制系统的所有功能,这显然是一个错误的想法。IntelliJ IDEA 只是自带了对这些版本控制系统的支持插件,但是我们想使用什么版本控制系统仍然得安装什么版本控制系统的客户端,否则照样用不了。如上图 **标注 1** 所示,IntelliJ IDEA 对版本控制的支持都是以插件的方式来实现的。旗舰版默认支持目前主流的版本控制软件包括:GitHub、CVS、ClearCase、Git、、Mercurial、Perforce、Subversion(SVN) 和 TFS 等。 24 | 25 | 26 | SVN 27 | --- 28 | 29 | 如果想要在 IntelliJ IDEA 中使用 SVN,则需要事先安装 SVN 客户端或是 TortoiseSVN 这类图形化工具。对于 Windows 系统,推荐大家安装 TortoiseSVN;对于 Mac 系统,则推荐大家安装 CornerStone. 30 | 31 | ![subversion-general](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/subversion-general.png) 32 | 33 | - **标注 1**:`Use command line client`,使用命令行客户端; 34 | - **标注 2**:`Clear Auth Cache`,清除缓存。 35 | 36 | 如上图所示,勾选 **标注 1** 所示的选项后,表示使用 SVN 命令行客户端,在这里,建议 SVN 的路径根据我们安装后的路径进行选择,否则 IntelliJ IDEA 可能无法识别到 SVN,以至于报出:`Cannot run program "svn"`这类错误;在我们使用 SVN 一段时间之后,如果发现 SVN 有些问题无法解决的话,可以考虑点击 **标注 2** 所示的清除缓存按钮。 37 | 38 | 39 | 40 | Git 41 | --- 42 | 如果想要在 IntelliJ IDEA 中使用 Git,同样需要事先安装 Git 客户端,不过在安装 Git 客户端的过程中,我们可以自由选择是否同时使用 Windows 命令行工具。此外,如果大家没有安装过 Git 的话,则可以参考「[Git 的安装流程及步骤](http://blog.csdn.net/qq_35246620/article/details/68951724)」了解具体的安装步骤。 43 | 44 | ![git-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/git-version-control.png) 45 | 46 | 如上图所示,如果我们事先安装了 Git 客户端的话,则会在`Path to Git executable`中自动定位到 Git 的可执行文件,然后点击`Test`: 47 | 48 | ![test-git](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/test-git.png) 49 | 50 | 如上图所示,显示`Git executed successfully`,则表示分布式版本控制系统 Git 可用。 51 | 52 | 53 | GitHub 54 | ------ 55 | 对于一个励志于在互联网浪潮中闯出一番天地的高逼格程序猿来说,如果不知道 GitHub 的话,貌似有些太 low 啦!如果你之前知道 GitHub 的话,那好吧,我感觉很正常;如果你之前不知道 GitHub 的话,那么真心建议你通过「[史上最简单的 GitHub 教程](http://blog.csdn.net/qq_35246620/article/details/66973794)」了解一下 GitHub,就算是注册个账号之后再也不用啦,至少我们也可以淡(装)然(逼)的说“在想当初,我也曾 XXX,只是 XXX”对吧?总不至于当别人问到 GitHub 的时候,我们一脸懵逼啊! 56 | 57 | ![github-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/github-version-control.png) 58 | 59 | - **标注 1**:`Create API Token`,创建 API Token; 60 | - **标注 2**:`Login to GitHub`,登录 GitHub 账号; 61 | - **标注 3**:`Test`,测试连接是否成功。 62 | 63 | 如上图所示,在 IntelliJ IDEA 中,提供了对 GitHub 的支持功能。当我们登录 GitHub 账号之后,点击`Test`进行测试: 64 | 65 | ![test-github](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/test-github.png) 66 | 67 | 如上图所示,显示`Connection successfully for user guobinhit`,表示我们已经将此 IntelliJ IDEA 连接到 GitHub 账号为`guobinhit`的账号之中啦!现在,我们已经简单了解了 IntelliJ IDEA 的版本控制机制,那么接下来,就让我们一起看看在 IntelliJ IDEA 中进行具体的版本控制操作。 68 | 69 | ![check-from-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/check-from-version-control.png) 70 | 71 | - **标注 1**:`Checkout from Version Control`,从版本控制系统中检出项目; 72 | - **标注 2**:IntelliJ IDEA 支持的版本控制系统,包括`GitHub`、`CVS`和`Git`等。 73 | 74 | 如上图所示,我们可以通过`Checkout from Version Control`,从版本控制系统,如`GitHub`、`CVS`和`Git`等中检查项目。相对的,既然我们可以从版本控制系统中检出项目,那么自然也可以将项目上传到版本控制系统之中。 75 | 76 | ![import-into-version-control](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/import-into-version-control.png) 77 | 78 | - **标注 1**:`Import into Version Control`,将项目上传到版本控制系统; 79 | - **标注 2**:IntelliJ IDEA 支持的版本控制系统,包括`GitHub`、`CVS`和`Git`等。 80 | 81 | 如上图所示,通过以上操作,就可以将代码上传到版本控制系统之中。现在,以博主的 GitHub 上面的项目`mybatis-tutorial`为例,检出项目: 82 | 83 | ![clone-repository](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/clone-repository.png) 84 | 85 | 如上图所示,首先选择`Checkout from Version Control -> GitHub`,登录账号,然后选择我们想要检出的项目,点击`Clone`,此“克隆”的概念来自于 Git,表示把远程仓库的项目检出到本地: 86 | 87 | ![tips-checkout](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/tips-checkout.png) 88 | 89 | 如上图所示,点击`Clone`之后,提示我们对将要检出的项目进行确认,点击`Yes`,然后一路`Next`,最后点击`Finish`: 90 | 91 | ![mybatis-tutorial](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/mybatis-tutorial.png) 92 | 93 | 如上图所示,至此,项目`mybatis-tutorial`已经成功从 GitHub 检出到本地啦! 94 | 95 | ![common-buttons](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/common-buttons.png) 96 | 97 | 如上图红色标记所示,皆为进行版本控制的按钮,从左至右分别为: 98 | 99 | - `Update Project`,更新项目,即从检出仓库下载最新版本的代码; 100 | - `Commit changes`,提交此检出版本项目上所有变化的文件; 101 | - `Compare with the Same Repository Version`,比较当前文件与远程仓库版本文件之间的差异; 102 | - `Show history`,显示当前文件的历史记录; 103 | - `Revert`,还原当前被修改的文件到未被修改的版本状态。 104 | 105 | ![commit](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/commit.png) 106 | 107 | - **标注 1**:在检出项目中有过修改的文件; 108 | - **标注 2**:`Comiit Messsage`提交信息,需要我们自己填写; 109 | - **标注 3**:`Diff`,展示文件修改前后对比; 110 | - **标注 4**:展示修改了几个文件,新建了几个文件; 111 | - **标注 5**:`Before Commit`,在提交项目前,进行一些前置操作; 112 | - **标注 6**:`After Commit`,在提交项目后,进行一些后置操作。 113 | 114 | 其中,`Diff`展示了文件修改前后详细的对比,我们需要好好利用;`Before Commit`,默认进行提交前的代码分析,可以检查出一些错误与警告。此外,我们也可以通过双击 **标注 1** 所示的文件,放大文件修改前后的差异对比。接下来,点击`Comiit`进行验证: 115 | 116 | ![code-analysis](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/code-analysis.png) 117 | 118 | 如上图所示,显示了代码分析的结果,具体可以参考「[详述 IntelliJ IDEA 提交代码前的 Code Analysis 机制](http://blog.csdn.net/qq_35246620/article/details/77719675)」. 最后,我们再回到`Version Control`,了解一些常用的操作: 119 | 120 | ![preferences](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/preferences.png) 121 | 122 | - **标注 1** :`When files are created`,表示当有新文件放进项目中的时候 IntelliJ IDEA 做如何处理,默认是`Show options before adding to version control`,表示弹出提示选项,让我们自己决定是否将这些新文件加入到版本控制。如果不想弹出提示,则选择下面两个选项进行默认操作。 123 | - **标注 2**:`When files are deleted`,表示当有新文件在项目中被删除的时候 IntelliJ IDEA 做如何处理,默认是`Show options before removing from version control`,表示弹出提示选项,让我们自己决定是否将这些被删除的文件从版本控制中删除。如果不想弹出提示,则选择下面两个选项进行默认操作。 124 | 125 | ![ignored-files](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/version-control/ignored-files.png) 126 | 127 | 如上图所示,我们可以通过红色标记圈出的`+`,把不想加入版本控制的文件或目录添加到忽略列表中;反之,我们也可以通过红色标记圈出的`-`,把想加入版本控制的文件或目录从忽略列表中移除。在这里,我们需要注意:**当某文件或目录被添加到此“忽略列表”的之后,则该文件或目录不能进行版本控制的相关操作,例如提交**。 128 | 129 | 130 | 131 | ---------- 132 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 133 | -------------------------------------------------------------------------------- /articles/basic-course/run-maven-springmvc.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 中的 Maven 项目初体验及搭建 Spring MVC 框架 2 | 3 | 在「[详述 IntelliJ IDEA 创建 Maven 项目及设置 java 源目录的方法](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/articles/basic-course/maven-project.md)」一文中,我们已经将 IntelliJ IDEA 中的 Maven 项目的框架搭建完成。接着上文,在本文中,我们更近一步,利用 Tomcat 运行我们的 Web 项目。 4 | 5 | ![gitcode-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/gitcode-project.png) 6 | 7 | 如上图所示,我们进一步扩展了项目的结构,在`java`目录下新建了一系列的目录层级,并在`annotation`目录下建立一个名为`AnnotationController`的 Java 类,用于测试 Spring MVC 框架;在`WEB-INF`目录下,新建了一个`pages`目录,用于存放`jsp`页面,并新建了一个名为`springmvc-servlet.xml`的文件,用于书写 Spring MVC 框架的配置项。接下来,我们依次看看这些文件的内容: 8 | 9 | - 控制类:`AnnotationController` 10 | 11 | ``` 12 | package com.hit.action.demo.annotation; 13 | 14 | import org.springframework.stereotype.Controller; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.ResponseBody; 17 | import org.springframework.web.servlet.ModelAndView; 18 | 19 | import javax.servlet.http.HttpServletRequest; 20 | 21 | /** 22 | * author:Charies Gavin 23 | * https:github.com/guobinhit 24 | */ 25 | @Controller 26 | public class AnnotationController { 27 | 28 | // 请求映射地址 http://localhost:8080/gitcode/test,其中 8080 为默认端口 29 | @RequestMapping(value = "/test") 30 | public String goTest(HttpServletRequest request) { 31 | // 输出请求 URL 路径 32 | System.out.println(request.getRequestURL()); 33 | // 返回逻辑名 34 | return "index"; 35 | } 36 | } 37 | ``` 38 | 39 | - Spring MVC 配置文件:`springmvc-servlet.xml` 40 | 41 | ``` 42 | 43 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | ``` 67 | 68 | - 全局配置文件:`web.xml` 69 | 70 | ``` 71 | 74 | 75 | 79 | 80 | 81 | 82 | contextConfigLocation 83 | /WEB-INF/springmvc-servlet.xml 84 | 85 | 86 | 87 | 88 | org.springframework.web.context.ContextLoaderListener 89 | 90 | 91 | 92 | 93 | springmvc 94 | org.springframework.web.servlet.DispatcherServlet 95 | 96 | 97 | 98 | 99 | contextConfigLocation 100 | /WEB-INF/springmvc-servlet.xml 101 | 102 | 103 | 1 104 | 105 | 106 | springmvc 107 | 108 | / 109 | 110 | 111 | 112 | 113 | index.jsp 114 | 115 | 116 | ``` 117 | 118 | 如上述代码以配置文件所示,我们对 Spring MVC 框架进行了简单的配置,其中有两点需要我们特别注意,分别是: 119 | 120 | - 配置文件,如果不显示指定,则 Spring MVC 会自动扫描`WEB-INF`下以`servlet-name`标签声明的名称开头以`servlet`结尾的配置文件; 121 | - 拦截请求,如果声明`/*`则会拦截所有请求,包括 action 返回的`.jsp`页面,因此一般声明`/`即可,可以防止请求重复拦截。 122 | 123 | 此外,因为我们这是 Maven 项目,自然不需要我们再手动导入`jar`啦,只需要在`pom.xml`文件中配置依赖即可: 124 | 125 | ``` 126 | 127 | 128 | 130 | 4.0.0 131 | 132 | com.hit 133 | gitcode 134 | 1.0-SNAPSHOT 135 | war 136 | 137 | 138 | 139 | junit 140 | junit 141 | 4.10 142 | test 143 | 144 | 145 | 146 | org.springframework 147 | spring-web 148 | RELEASE 149 | 150 | 151 | 152 | org.springframework 153 | spring-webmvc 154 | RELEASE 155 | 156 | 157 | 158 | ``` 159 | 160 | 接下来,配置 Tomcat,运行 Web 项目: 161 | 162 | ![configuration-tomcat](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/configuration-tomcat.png) 163 | 164 | ![configuration-tomcat-2](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/configuration-tomcat-2.png) 165 | 166 | 如上图所示,依次对 Tomcat 进行配置,完成后,运行项目: 167 | 168 | ![run-project](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/run-project.png) 169 | 170 | 如上图所示,项目成功运行。在这里,很多同学可能会遇到如下错误: 171 | 172 | ![http-status-500](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/http-status-500.png) 173 | 174 | 造成上述错误的原因是`jar`包冲突,一般是`servlet-api.jar`和`jsp-api.jar`这个两个`jar`包冲突导致的。至于为什么会出现`jar`包冲突,很有可能是在写`Controller`的时候,需要导入`javax.servlet.http.HttpServletRequest`,这时看到项目中竟然没有引入该`jar`,自然是顺手就在`pom.xml`中添加了该`jar`的依赖,好吧,冲突种子就在这里种下啦!实际上,在 Tomcat 的`lib`目录中,已经包含上述两个`jar`包: 175 | 176 | ![tomcat-lib-ls](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/tomcat-lib-ls.png) 177 | 178 | **解决方法**:如果是 Maven 项目,就删除`pom.xml`文件中对`servlet-api.jar`和`jsp-api.jar`的依赖;如果是非 Maven 项目,就手动排除这两个`jar`包。然后,进入 IntelliJ IDEA 的`Project Structure -> Modules -> Dependencies`配置页: 179 | 180 | ![modules-dependencies](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/images/basic-course/run-maven-springmvc/modules-dependencies.png) 181 | 182 | 如上图所示,检查 Tomcat 是否引入;如果引入,则检查是否勾选 Tomcat 前的`Export`选项,实际上不勾选这个选项是正确的,勾选`Export`之后,会在项目启动后,将该 Tomcat 导出到本地仓库,从而导致两份 Tomcat,再次产生`jar`包冲突。除此之外,还要检查 JDK、Tomcat 以及 Maven 的版本,以防止版本不兼容的问题,例如: 183 | 184 | - `Maven 3.3.1`及以上的版本需要`JDK 1.7`及以上的版本; 185 | - `Spring 4`需要`JDK 1.7`以上的版本等。 186 | 187 | 如果还解决不了问题的话,呃,再检查检查 IntelliJ IDEA 的 Java 编译器的版本吧,囧! 188 | 189 | 190 | 191 | ---------- 192 | ———— ☆☆☆ —— [返回 -> 史上最简单的 IntelliJ IDEA 教程 <- 目录](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) —— ☆☆☆ ———— 193 | -------------------------------------------------------------------------------- /articles/practical-skills/keymap-windows.md: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 常用快捷键 之 Windows 版 2 | 3 | > **温馨提示**:在 IntelliJ IDEA 中,熟练的使用快捷进行编程可以极大的提升我们的用户体验,祝你幸福! 4 | 5 | ## Ctrl 6 | 7 | |快捷键|介绍| 8 | |:---------|:---------| 9 | |Ctrl + F|在当前文件进行文本查找 `(必备)` | 10 | |Ctrl + R|在当前文件进行文本替换 `(必备)` | 11 | |Ctrl + Z|撤销 `(必备)` | 12 | |Ctrl + Y|删除光标所在行 或 删除选中的行 `(必备)` | 13 | |Ctrl + X|剪切光标所在行 或 剪切选择内容| 14 | |Ctrl + C|复制光标所在行 或 复制选择内容| 15 | |Ctrl + D|复制光标所在行 或 复制选择内容,并把复制内容插入光标位置下面 `(必备)` | 16 | |Ctrl + W|递进式选择代码块。可选中光标所在的单词或段落,连续按会在原有选中的基础上再扩展选中范围 `(必备)` | 17 | |Ctrl + E|显示最近打开的文件记录列表 `(必备)` | 18 | |Ctrl + N|根据输入的 **类名** 查找类文件 `(必备)` | 19 | |Ctrl + G|在当前文件跳转到指定行处| 20 | |Ctrl + J|插入自定义动态代码模板 `(必备)` | 21 | |Ctrl + P|方法参数提示显示 `(必备)` | 22 | |Ctrl + Q|光标所在的变量 / 类名 / 方法名等上面(也可以在提示补充的时候按),显示文档内容| 23 | |Ctrl + U|前往当前光标所在的方法的父类的方法 / 接口定义 `(必备)` | 24 | |Ctrl + B|进入光标所在的方法/变量的接口或是定义处,等效于 `Ctrl + 左键单击` `(必备)` | 25 | |Ctrl + K|版本控制提交项目,需要此项目有加入到版本控制才可用| 26 | |Ctrl + T|版本控制更新项目,需要此项目有加入到版本控制才可用| 27 | |Ctrl + H|显示当前类的层次结构| 28 | |Ctrl + O|选择可重写的方法| 29 | |Ctrl + I|选择可继承的方法| 30 | |Ctrl + \+|展开代码| 31 | |Ctrl + \-|折叠代码| 32 | |Ctrl + /|注释光标所在行代码,会根据当前不同文件类型使用不同的注释符号 `(必备)` | 33 | |Ctrl + \[|移动光标到当前所在代码的花括号开始位置| 34 | |Ctrl + \]|移动光标到当前所在代码的花括号结束位置| 35 | |Ctrl + F1|在光标所在的错误代码处显示错误信息 `(必备)` | 36 | |Ctrl + F3|调转到所选中的词的下一个引用位置 `(必备)` | 37 | |Ctrl + F4|关闭当前编辑文件| 38 | |Ctrl + F8|在 Debug 模式下,设置光标当前行为断点,如果当前已经是断点则去掉断点| 39 | |Ctrl + F9|执行 Make Project 操作| 40 | |Ctrl + F11|选中文件 / 文件夹,使用助记符设定 / 取消书签 `(必备)` | 41 | |Ctrl + F12|弹出当前文件结构层,可以在弹出的层上直接输入,进行筛选| 42 | |Ctrl + Tab|编辑窗口切换,如果在切换的过程又加按上delete,则是关闭对应选中的窗口| 43 | |Ctrl + End|跳到文件尾| 44 | |Ctrl + Home|跳到文件头| 45 | |Ctrl + Space|基础代码补全,默认在 Windows 系统上被输入法占用,需要进行修改,建议修改为 `Ctrl + 逗号` `(必备)` | 46 | |Ctrl + Delete|删除光标后面的单词或是中文句 `(必备)` | 47 | |Ctrl + BackSpace|删除光标前面的单词或是中文句 `(必备)` | 48 | |Ctrl + 1,2,3...9|定位到对应数值的书签位置 `(必备)` | 49 | |Ctrl + 左键单击|在打开的文件标题上,弹出该文件路径 `(必备)` | 50 | |Ctrl + 光标定位|按 Ctrl 不要松开,会显示光标所在的类信息摘要| 51 | |Ctrl + 左方向键|光标跳转到当前单词 / 中文句的左侧开头位置 `(必备)` | 52 | |Ctrl + 右方向键|光标跳转到当前单词 / 中文句的右侧开头位置 `(必备)` | 53 | |Ctrl + 前方向键|等效于鼠标滚轮向前效果 `(必备)` | 54 | |Ctrl + 后方向键|等效于鼠标滚轮向后效果 `(必备)` | 55 | 56 | ## Alt 57 | 58 | |快捷键|介绍| 59 | |:---------|:---------| 60 | |Alt + \`|显示版本控制常用操作菜单弹出层 `(必备)` | 61 | |Alt + Q|弹出一个提示,显示当前类的声明 / 上下文信息| 62 | |Alt + F1|显示当前文件选择目标弹出层,弹出层中有很多目标可以进行选择 `(必备)` | 63 | |Alt + F2|对于前面页面,显示各类浏览器打开目标选择弹出层| 64 | |Alt + F3|选中文本,逐个往下查找相同文本,并高亮显示| 65 | |Alt + F7|查找光标所在的方法 / 变量 / 类被调用的地方| 66 | |Alt + F8|在 Debug 的状态下,选中对象,弹出可输入计算表达式调试框,查看该输入内容的调试结果| 67 | |Alt + Home|定位 / 显示到当前文件的 `Navigation Bar` | 68 | |Alt + Enter|IntelliJ IDEA 根据光标所在问题,提供快速修复选择,光标放在的位置不同提示的结果也不同 `(必备)` | 69 | |Alt + Insert|代码自动生成,如生成对象的 set / get 方法,构造函数,toString() 等 `(必备)` | 70 | |Alt + 左方向键|切换当前已打开的窗口中的子视图,比如Debug窗口中有Output、Debugger等子视图,用此快捷键就可以在子视图中切换 `(必备)` | 71 | |Alt + 右方向键|按切换当前已打开的窗口中的子视图,比如Debug窗口中有Output、Debugger等子视图,用此快捷键就可以在子视图中切换 `(必备)` | 72 | |Alt + 前方向键|当前光标跳转到当前文件的前一个方法名位置 `(必备)` | 73 | |Alt + 后方向键|当前光标跳转到当前文件的后一个方法名位置 `(必备)` | 74 | |Alt + 1,2,3...9|显示对应数值的选项卡,其中 1 是 Project 用得最多 `(必备)` | 75 | 76 | ## Shift 77 | 78 | |快捷键|介绍| 79 | |:---------|:---------| 80 | |Shift + F1|如果有外部文档可以连接外部文档| 81 | |Shift + F2|跳转到上一个高亮错误 或 警告位置| 82 | |Shift + F3|在查找模式下,查找匹配上一个| 83 | |Shift + F4|对当前打开的文件,使用新Windows窗口打开,旧窗口保留| 84 | |Shift + F6|对文件 / 文件夹 重命名| 85 | |Shift + F7|在 Debug 模式下,智能步入。断点所在行上有多个方法调用,会弹出进入哪个方法| 86 | |Shift + F8|在 Debug 模式下,跳出,表现出来的效果跟 `F9` 一样| 87 | |Shift + F9|等效于点击工具栏的 `Debug` 按钮| 88 | |Shift + F10|等效于点击工具栏的 `Run` 按钮| 89 | |Shift + F11|弹出书签显示层 `(必备)` | 90 | |Shift + Tab|取消缩进 `(必备)` | 91 | |Shift + ESC|隐藏当前 或 最后一个激活的工具窗口| 92 | |Shift + End|选中光标到当前行尾位置| 93 | |Shift + Home|选中光标到当前行头位置| 94 | |Shift + Enter|开始新一行。光标所在行下空出一行,光标定位到新行位置 `(必备)` | 95 | |Shift + 左键单击|在打开的文件名上按此快捷键,可以关闭当前打开文件 `(必备)` | 96 | |Shift + 滚轮前后滚动|当前文件的横向滚动轴滚动 `(必备)` | 97 | 98 | ## Ctrl + Alt 99 | 100 | |快捷键|介绍| 101 | |:---------|:---------| 102 | |Ctrl + Alt + L|格式化代码,可以对当前文件和整个包目录使用 `(必备)` | 103 | |Ctrl + Alt + O|优化导入的类,可以对当前文件和整个包目录使用 `(必备)` | 104 | |Ctrl + Alt + I|光标所在行 或 选中部分进行自动代码缩进,有点类似格式化| 105 | |Ctrl + Alt + T|对选中的代码弹出环绕选项弹出层 `(必备)` | 106 | |Ctrl + Alt + J|弹出模板选择窗口,将选定的代码加入动态模板中| 107 | |Ctrl + Alt + H|调用层次| 108 | |Ctrl + Alt + B|在某个调用的方法名上使用会跳到具体的实现处,可以跳过接口| 109 | |Ctrl + Alt + C|重构-快速提取常量| 110 | |Ctrl + Alt + F|重构-快速提取成员变量| 111 | |Ctrl + Alt + V|重构-快速提取变量| 112 | |Ctrl + Alt + Y|同步、刷新| 113 | |Ctrl + Alt + S|打开 IntelliJ IDEA 系统设置 `(必备)` | 114 | |Ctrl + Alt + F7|显示使用的地方。寻找被该类或是变量被调用的地方,用弹出框的方式找出来| 115 | |Ctrl + Alt + F11|切换全屏模式| 116 | |Ctrl + Alt + Enter|光标所在行上空出一行,光标定位到新行 `(必备)` | 117 | |Ctrl + Alt + Home|弹出跟当前文件有关联的文件弹出层| 118 | |Ctrl + Alt + Space|类名自动完成| 119 | |Ctrl + Alt + 左方向键|退回到上一个操作的地方 `(必备)` | 120 | |Ctrl + Alt + 右方向键|前进到上一个操作的地方 `(必备)` | 121 | |Ctrl + Alt + 前方向键|在查找模式下,跳到上个查找的文件| 122 | |Ctrl + Alt + 后方向键|在查找模式下,跳到下个查找的文件| 123 | |Ctrl + Alt + 右括号(])|在打开多个项目的情况下,切换下一个项目窗口| 124 | |Ctrl + Alt + 左括号([)|在打开多个项目的情况下,切换上一个项目窗口| 125 | 126 | 127 | ## Ctrl + Shift 128 | 129 | |快捷键|介绍| 130 | |:---------|:---------| 131 | |Ctrl + Shift + F|根据输入内容查找整个项目 或 指定目录内文件 `(必备)` | 132 | |Ctrl + Shift + R|根据输入内容替换对应内容,范围为整个项目 或 指定目录内文件 `(必备)` | 133 | |Ctrl + Shift + J|自动将下一行合并到当前行末尾 `(必备)` | 134 | |Ctrl + Shift + Z|取消撤销 `(必备)` | 135 | |Ctrl + Shift + W|递进式取消选择代码块。可选中光标所在的单词或段落,连续按会在原有选中的基础上再扩展取消选中范围 `(必备)` | 136 | |Ctrl + Shift + N|通过文件名定位 / 打开文件 / 目录,打开目录需要在输入的内容后面多加一个正斜杠 `(必备)` | 137 | |Ctrl + Shift + U|对选中的代码进行大 / 小写轮流转换 `(必备)` | 138 | |Ctrl + Shift + T|对当前类生成单元测试类,如果已经存在的单元测试类则可以进行选择 `(必备)` | 139 | |Ctrl + Shift + C|复制当前文件磁盘路径到剪贴板 `(必备)` | 140 | |Ctrl + Shift + V|弹出缓存的最近拷贝的内容管理器弹出层| 141 | |Ctrl + Shift + E|显示最近修改的文件列表的弹出层| 142 | |Ctrl + Shift + H|显示方法层次结构| 143 | |Ctrl + Shift + B|跳转到类型声明处 `(必备)` | 144 | |Ctrl + Shift + I|快速查看光标所在的方法 或 类的定义| 145 | |Ctrl + Shift + A|查找动作 / 设置| 146 | |Ctrl + Shift + /|代码块注释 `(必备)` | 147 | |Ctrl + Shift + \[|选中从光标所在位置到它的顶部中括号位置 `(必备)` | 148 | |Ctrl + Shift + \]|选中从光标所在位置到它的底部中括号位置 `(必备)` | 149 | |Ctrl + Shift + \+|展开所有代码 `(必备)` | 150 | |Ctrl + Shift + \-|折叠所有代码 `(必备)` | 151 | |Ctrl + Shift + F7|高亮显示所有该选中文本,按Esc高亮消失 `(必备)` | 152 | |Ctrl + Shift + F8|在 Debug 模式下,指定断点进入条件| 153 | |Ctrl + Shift + F9|编译选中的文件 / 包 / Module| 154 | |Ctrl + Shift + F12|编辑器最大化 `(必备)` | 155 | |Ctrl + Shift + Space|智能代码提示| 156 | |Ctrl + Shift + Enter|自动结束代码,行末自动添加分号 `(必备)` | 157 | |Ctrl + Shift + Backspace|退回到上次修改的地方 `(必备)` | 158 | |Ctrl + Shift + 1,2,3...9|快速添加指定数值的书签 `(必备)` | 159 | |Ctrl + Shift + 左键单击|把光标放在某个类变量上,按此快捷键可以直接定位到该类中 `(必备)` | 160 | |Ctrl + Shift + 左方向键|在代码文件上,光标跳转到当前单词 / 中文句的左侧开头位置,同时选中该单词 / 中文句 `(必备)` | 161 | |Ctrl + Shift + 右方向键|在代码文件上,光标跳转到当前单词 / 中文句的右侧开头位置,同时选中该单词 / 中文句 `(必备)` | 162 | |Ctrl + Shift + 前方向键|光标放在方法名上,将方法移动到上一个方法前面,调整方法排序 `(必备)` | 163 | |Ctrl + Shift + 后方向键|光标放在方法名上,将方法移动到下一个方法前面,调整方法排序 `(必备)` | 164 | 165 | ## Alt + Shift 166 | 167 | |快捷键|介绍| 168 | |:---------|:---------| 169 | |Alt + Shift + N|选择 / 添加 task `(必备)` | 170 | |Alt + Shift + F|显示添加到收藏夹弹出层 / 添加到收藏夹| 171 | |Alt + Shift + C|查看最近操作项目的变化情况列表| 172 | |Alt + Shift + I|查看项目当前文件| 173 | |Alt + Shift + F7|在 Debug 模式下,下一步,进入当前方法体内,如果方法体还有方法,则会进入该内嵌的方法中,依此循环进入| 174 | |Alt + Shift + F9|弹出 `Debug` 的可选择菜单| 175 | |Alt + Shift + F10|弹出 `Run` 的可选择菜单| 176 | |Alt + Shift + 左键双击|选择被双击的单词 / 中文句,按住不放,可以同时选择其他单词 / 中文句 `(必备)` | 177 | |Alt + Shift + 前方向键|移动光标所在行向上移动 `(必备)` | 178 | |Alt + Shift + 后方向键|移动光标所在行向下移动 `(必备)` | 179 | 180 | ## Ctrl + Shift + Alt 181 | 182 | |快捷键|介绍| 183 | |:---------|:---------| 184 | |Ctrl + Shift + Alt + V|无格式黏贴 `(必备)` | 185 | |Ctrl + Shift + Alt + N|前往指定的变量 / 方法| 186 | |Ctrl + Shift + Alt + S|打开当前项目设置 `(必备)` | 187 | |Ctrl + Shift + Alt + C|复制参考信息| 188 | 189 | ## 其他 190 | 191 | |快捷键|介绍| 192 | |:---------|:---------| 193 | |F2|跳转到下一个高亮错误 或 警告位置 `(必备)` | 194 | |F3|在查找模式下,定位到下一个匹配处| 195 | |F4|编辑源 `(必备)` | 196 | |F7|在 Debug 模式下,进入下一步,如果当前行断点是一个方法,则进入当前方法体内,如果该方法体还有方法,则不会进入该内嵌的方法中| 197 | |F8|在 Debug 模式下,进入下一步,如果当前行断点是一个方法,则不进入当前方法体内| 198 | |F9|在 Debug 模式下,恢复程序运行,但是如果该断点下面代码还有断点则停在下一个断点上| 199 | |F11|添加书签 `(必备)` | 200 | |F12|回到前一个工具窗口 `(必备)` | 201 | |Tab|缩进 `(必备)` | 202 | |ESC|从工具窗口进入代码文件窗口 `(必备)` | 203 | |连按两次Shift|弹出 `Search Everywhere` 弹出层| 204 | 205 | 206 | ---------- 207 | 208 | **IntelliJ IDEA DEFAULT KEYMAP**:https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard_Mac.pdf 209 | 210 | 211 | ---------- 212 | 213 | ———— ☆☆☆ —— 返回 -> [史上最简单的 IntelliJ IDEA 教程](https://github.com/guobinhit/intellij-idea-tutorial/blob/master/README.md) <- 目录 —— ☆☆☆ ———— 214 | 215 | 216 | 217 | --------------------------------------------------------------------------------