Sunday, December 7, 2014

Installing / Uninstalling IntelliJ & important shortcuts

Uninstalling Intellij on a Mac for the most part is no different from uninstalling any application on a Mac you’ll need to go to the Applications directory and and remove the application bundle though there will be some residual files that will need deleting. 

All application installed in directory "/Application", same of intelliJ as "/Application/IntelliJIdeaXX" where XX stands for version for us XX is 14 ("/Application/IntelliJIdea14").

XX : 14
Follow these steps for a complete removal
  1. Goto /Application/<ApplicationName>  directory right click or drag and move to trash, for some reason if we are not able to delete then run command from terminal window [rm -rf /Application/IntelliJIdea14 as user / or as super user ( sudo) ].
  2. Goto the following directory where ‘username’ is your username and AppName will be something like ‘jetbrains.intellij’ /Users/username/Library/Preferences/AppName
  3. remove all residue files [~ is user home directory /Users/username]:
    1. ~/Library/Caches/IntelliJIdeaXX
    2. ~/Library/Logs/IntelliJIdeaXX
    3. ~/Library/Preferences/IntelliJIdeaXX
    4. ~/Library/Application Support/IntelliJIdeaXX
    5. ~/Library/Preferences/com.appname.plist
      1. ~/Library/Preferences/com.jetbrains.intellij.plist
    6. ~/Library/Preferences/com.jetbrains.intellij.plist.lockfile
    7. ~/Library/Caches/com.jetbrains.intellij
    8. ~/Library/Saved Application State/com.jetbrains.intellij.savedState
    9. /Library/Preferences/AppName
    10. /Library/Preferences/com.appname.plist
    11. /Library/Application Support/AppName
    12. Also clear any files from location ~/.intellij  folder or something similar in your home directory.
References:
1. https://intellij-support.jetbrains.com/entries/23358108
2. https://devnet.jetbrains.com/docs/DOC-181

 Installing Intelli J to use JDK 7 /JDK 8

Open Info.plist in an editor and make following changes and save and exit.
$ vi /Applications/IntelliJ IDEA 14.app/Contents/Info.plist
      <key>JVMVersion</key>
      <string>1.6*</string>
change to 
      <key>JVMVersion</key>
      <string>1.8*</string>
and make sure we have LANG=en_US.UTF-8 in our environment.

Intelli J Shortcut
  1. Search everywhere with Double Shift Click.
  2. Open a file name with 'Shift'+ 'Command'+'O'.
  3. Open recent Files with 'Command'+'E'.
  4. Open Navigation Bar with 'Command'+'up arrow'.
  5. Drag and drop files here from Finder.
  6. Search for a java method in a java class: 'Fn'+'Command'+'F12'.
  7. Control+space: completion (shift: smart)
  8. Command+O to navigate to any class
  9. Option+F7 : Edit /find/find usage
  10. F1: quick documentation
  11. Command+B: navigate declaration
  12. Command+F12: Navigate File structure
  13. Shift+F6: refactor / rename
  14. Control+o: code override methods
  15. Control+I: code implements method of interface
  16. Command+N [code generation]
  17. Option +F1: 
  18. F12: moves the focus from editor to last focus tool window
  19. Option+Command+T: Code / surround with
  20. Navigate implementation of abstract method: option+command+B
  21. Option+up arrow: extend selection.
  22. Option+Command+V: simplify complicated statement (refractor / extract / variable)
  23. Comment(s):Command+/  and option+command+/
  24. Browser with documentation: shift+F1
  25. Command+D: duplicates
  26. Command+Delete: Delete
  27. Command+P: paranthesis parameter
  28. Shift+Command+Delete: Naviagate last editted location - history
  29. Shift+Command+F7: Edit find highlighted item in file (Command+G and Shift+Command+G: to naviage)
  30. Control+Shift+Q: view / context info, to see declaration of current method.
  31. Command+E: view recent files
  32. F2/Shift+F2: to jump between highlighted syntax error.
  33. Option+command+up arrow / option+command+down arrow: shortcut to jump between compiler error messages or search option results
  34. Command+J: live code completion template
  35. Control+ uparrow / Control+down arrow: to move between methods
  36. Control+Shift+J: combine two lines
  37. Shift+Command+V: clipboard paste
  38. Control+H: inheritance hierarchy of a selected class.
  39. Option+Command+O: to search a method or a field in a class.
  40. Option+Shift+C: to quickly review your recent changes to the project
  41. Control+tilt: View quick switch schemes
  42. Shift+Command+Enter: to complete a current statement such as if , try catch return etc.
  43. Option + space: view quick definition
  44. Option+Shift+Commnad+C:Edit copy reference
  45. Control+Option+R: access run / debug dropdown on the main toolbar
  46. Option+Command+F7: Edit find show usage
  47. Shift+Command+A: Help / Find action
  48. To quickly find and run an inspection: option+shift+command+I
  49. Option+Enter: to create test
  50. Alt: multiple cursor
  51. Control+K: commit changes
  52. Command+F: search pane Command+R: replace [Path: Shift]

Check Port bind exception:
1. We can try $ netstat -anp tcp | grep 8080
2. If our netstat doesn't support -p, use lsof then try $ lsof -i tcp:8080
3. to free up run $ kill -9 processId.




No comments:

Post a Comment