사용자 도구

사이트 도구


intellij_idea

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
intellij_idea [2016/11/18 15:43]
kwon37xi [참조문서]
intellij_idea [2022/10/17 16:48] (현재)
kwon37xi
줄 1: 줄 1:
 ====== IntelliJ IDEA ====== ====== IntelliJ IDEA ======
   * http://www.jetbrains.com/idea/   * http://www.jetbrains.com/idea/
 +  * [[intellij_idea:config|IntelliJ IDEA Config 설정]]
 +  * [[intellij_idea:plugin|IntelliJ IDEA Plugins]]
 +  * [[intellij_idea:run|IntelliJ Run Code]]
 +  * [[intellij_idea:view_mode|IntelliJ IDEA View Mode]]
 +  * [[https://www.jetbrains.com/toolbox/app/|JetBrains ToolBox]] JetBrains의 각종 IDE를 통합관리
   * [[http://www.jetbrains.com/idea/documentation/migration_faq.html|FAQ for Eclipse User]]   * [[http://www.jetbrains.com/idea/documentation/migration_faq.html|FAQ for Eclipse User]]
   * [[http://ideacolorthemes.org/home/|Idea Color Themes]]   * [[http://ideacolorthemes.org/home/|Idea Color Themes]]
 +  * [[https://www.jetbrains.com/idea/whatsnew/|What's new]]
 +  * [[https://github.com/maksimr/awesome-intellij|maksimr/awesome-intellij]]
 +  * [[https://github.com/championswimmer/awesome-jetbrains|championswimmer/awesome-jetbrains: A collection of awesome Fonts and Color Schemes to be used in Jetbrains IDEs.]]
 +
 +===== 프로젝트 시작 =====
 +  * 프로젝트 시작시 할 것들
 +  * [[intellij_idea:editorconfig|IntelliJ 와 editorconfig]] 로 프로젝트의 code format 을 맞춘다.
  
 ===== 오류시 대응 ===== ===== 오류시 대응 =====
 +  * [[https://intellij-support.jetbrains.com/hc/en-us/articles/207241235#capture_slow_startup_2019_2|Reporting performance problems – IDEs Support (IntelliJ Platform)]]
   * 잦은 코드 업데이트시에 IDE의 인덱싱 데이터와 실제 코드간의 불일치로 코드상에 문제가 없는데도 오류가 발생하는 경우가 간혹 발생한다.   * 잦은 코드 업데이트시에 IDE의 인덱싱 데이터와 실제 코드간의 불일치로 코드상에 문제가 없는데도 오류가 발생하는 경우가 간혹 발생한다.
   * **File -> Invalidate Caches**를 실행하여 인덱스를 재생성해본다.   * **File -> Invalidate Caches**를 실행하여 인덱스를 재생성해본다.
줄 15: 줄 28:
   * **Osmorc** 플러그인이 활성화 돼 있을 경우 이상 증상을 보이기도 하였는데, 내가 설정을 뭔가 잘못한 듯.   * **Osmorc** 플러그인이 활성화 돼 있을 경우 이상 증상을 보이기도 하였는데, 내가 설정을 뭔가 잘못한 듯.
   * 특정 클래스가 분명히 아무런 문제가 없는데도 클래스를 찾을 수 없다(class not found)는 오류가 발생한다면 **Settings -> Build.. -> Compiler -> Excludes** 에 우연히 추가 됐는지 확인한다.   * 특정 클래스가 분명히 아무런 문제가 없는데도 클래스를 찾을 수 없다(class not found)는 오류가 발생한다면 **Settings -> Build.. -> Compiler -> Excludes** 에 우연히 추가 됐는지 확인한다.
-===== Debug 모드에서 성능 저하 ===== 
-  * **Debug** 모드에서 코드의 Line이 아닌 **메소드 선언부에 Break Point**를 걸면 엄청난 성능 저하가 발생한다. 
-  * 메소드 선언부 Break Point는 피하라. 
  
 ===== Gradle 연동 ===== ===== Gradle 연동 =====
   * IntelliJ IDEA 기본 Gradle 플러그인이 뛰어난 편이라서 Gradle의 idea 플러그인을 사용하지 않아도 된다.   * IntelliJ IDEA 기본 Gradle 플러그인이 뛰어난 편이라서 Gradle의 idea 플러그인을 사용하지 않아도 된다.
-  * 현재 [[http://issues.gradle.org/browse/GRADLE-2198|GRADLE-2198]] Java Source Level을 인식하지 못하는 버그가 있는데, 이는 Gradle쪽 버그이다.+  * Gradle Task들에 ''Execute After Sync'', ''Execute Before Sync''을 지정면 Gradle Project를 refresh 할 때마다 정된 시점에 해당 태스크를 실행해준다. 소스 제너레션이나 IntelliJ 설정을 변경해주는 task를 실행해주면 좋다.
  
  
줄 29: 줄 39:
 ==== Cygwin Bash Terminal ==== ==== Cygwin Bash Terminal ====
   * [[http://engineroom.teamwork.com/using-cygwins-bash-terminal-in-a-jetbrains-ide/|Using Cygwin's bash terminal in a JetBrains IDE]]   * [[http://engineroom.teamwork.com/using-cygwins-bash-terminal-in-a-jetbrains-ide/|Using Cygwin's bash terminal in a JetBrains IDE]]
 +
 +===== JetBrains annotation 제거 =====
 +''@NotNull'' 등 리팩토링시 jetbrains annotation이 붙는 현상을 없애고 싶으면 프로젝트 의존성에서 ''annotations.jar''가 들어갔는지 확인해본다. [[gradle|Gradle]] 에서는 다음과 같이 제거한다.
 +
 +<code groovy>
 +configurations.all {
 +    exclude group: 'org.kohsuke.jetbrains', module: 'annotations'
 +}
 +</code>
 +  * 또한, 컴파일시 ''@Nonnull'' 등이 지정돼 있으면 IntelliJ가 해당 메소드에 값이 null이 들어오면 예외를 발생시키는 코드를 자동 주입하는데, 이 기능에 의해 원치 않는 예외가 발생할 수도 있다. **Build, Execution, Deployment -> Compiler** 에서 **Add runtime assertions for not-null-annotated methods and parameters**를 꺼주면 된다.
 +  * [[https://blog.jetbrains.com/idea/2014/10/automatic-notnullnullablecontract-inference-in-intellij-idea-14/|Automatic @NotNull/@Nullable/@Contract inference in IntelliJ IDEA 14]]
 +  * [[https://www.jetbrains.com/help/idea/2016.3/annotating-source-code.html|Annotating Source Code]]
 +
 +===== Git + SSH 작동 안 할 때 =====
 +    * ''Fetch failed: Could not read from remote repository.'' 오류 발생 및 idea.log 확인시<code>
 +Caused by: java.io.IOException: Cannot negotiate, proposals do not match. 
 +... 등등 발생
 +</code>
 +  * Linux에서 Git repository를 SSH 로 사용하는데 잘 작동하지 않으면 ''설정 -> Version Control -> Git -> SSH executable:''을 **Native**로 변경한다.
 +
 +  * [[https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000114504--Solved-Git-SHH-Private-Key-PAssPhrase|[Solved] Git + SHH + Private Key PAssPhrase – IDEs Support (IntelliJ Platform)]] 참조.
 +
 +===== Java Application 실행시 Classpath 가 올바로 지정 안 되는 현상 =====
 +  * [[https://blog.jetbrains.com/idea/2017/10/intellij-idea-2017-3-eap-configurable-command-line-shortener-and-more/|IntelliJ IDEA 2017.3 EAP: Configurable command line shortener and more | IntelliJ IDEA Blog]]
 +  * 특히 Windows 에서 명령행의 명령 길이 제한으로 인해 Java Application 실행시 classpath가 올바로 지정 안 되는 현상이 발생할 수 있다.
 +  * **Run/Debug Configuration** 설정에서 **Command line shortner** 설정을 해주면 된다.
 +    * 실행 환경이 뭐냐에 따라 어떤 방식이 올바로 작동하는지 확신할 수 없으므로 이것 저것 테스트 해봐야 한다.
 +    * None : 아무것도 안함
 +    * JAR Manifest : ''classpath.jar'' 를 생성하고 ''MANIFEST.MF''에 ''Class-Path'' 속성으로 처리
 +    * classpath file : 별도 파일을 생성해 클래스패스 적어줌.
 +    * User-local default : Intellij 과거 방식.
 +
 +===== Multiple Project =====
 +  * 하나의 프로젝트 창에서 여러 프로젝트(모듈말고)를 보고 싶을 때는
 +  * **Empty Project**를 생성하고,
 +  * 다른 프로젝트들을 이 프로젝트의 Module로 import한다.
 +  * [[https://stackoverflow.com/questions/8774024/intellij-working-on-multiple-projects/40818540#40818540|IntelliJ: Working on multiple projects - Stack Overflow]]
 +  * [[https://plugins.jetbrains.com/plugin/7897-armory|Armory]] 다중 프로젝트 빠른 선택. ''Alt-A''
 +
 +===== 외부 프로그램 실행 =====
 +  * **Tools -> External Tools** 를 통해서 외부 프로그램을 실행할 수 있다.
 +
 +===== Themes =====
 +  * [[https://plugins.jetbrains.com/plugin/12102-cyan-light-theme|Cyan Light]] 너무 어둡지도 너무 밝지도 않은 테마.
 +  * [[https://plugins.jetbrains.com/plugin/10321-nord/|Nord]] 어두운 계통이지만 너무 어둡지 않고 차갑게 느껴지는 테마.
 +
 +===== Intellij Ultimate Linux 최신 버전 다운로드 링크 확인 =====
 +<code sh>
 +# 버전 번호만 확인
 +curl -fsSL "https://data.services.jetbrains.com/products?code=IIU%2CIIC&release.type=release" | jq '[.[].releases[].version][0]'
 +
 +# Linux 다운로드 링크
 +curl -fsSL "https://data.services.jetbrains.com/products?code=IIU%2CIIC&release.type=release" | jq '[.[].releases[].downloads.linux.link][0]'
 +</code>
  
 ===== 참조문서 ===== ===== 참조문서 =====
줄 37: 줄 101:
   * [[https://dzone.com/articles/reflections-on-intellij-from-a-vim-die-hard-librat|Reflections on IntelliJ from a Vim Die-Hard]]   * [[https://dzone.com/articles/reflections-on-intellij-from-a-vim-die-hard-librat|Reflections on IntelliJ from a Vim Die-Hard]]
   * [[https://www.jetbrains.com/help/idea/2016.2/using-language-injections.html|Language Injections]] 변수에 다른 언어 구문을 넣을 때, 분리된 해당 언어 전용 편집기능 제공   * [[https://www.jetbrains.com/help/idea/2016.2/using-language-injections.html|Language Injections]] 변수에 다른 언어 구문을 넣을 때, 분리된 해당 언어 전용 편집기능 제공
 +  * [[http://www.popit.kr/%EC%9D%B8%ED%85%94%EB%A6%ACj-%ED%99%9C%EC%9A%A9-%EA%BF%80%ED%8C%81-42%EA%B0%80%EC%A7%80-%EC%A0%95%EB%A6%AC/|인텔리J 활용 꿀팁 42가지 정리]]
 +  * [[https://intellij-support.jetbrains.com/hc/en-us/articles/207241235|Reporting performance problems – IDEs Support (IntelliJ Platform) | JetBrains]]
 +  * [[https://blog.jetbrains.com/idea/2020/08/editor-tips-and-tricks-in-intellij-idea/|Editor Tips and Tricks in IntelliJ IDEA – IntelliJ IDEA Blog | JetBrains]]
intellij_idea.1479453192.txt.gz · 마지막으로 수정됨: 2016/11/18 15:43 저자 kwon37xi