DWX 2013 Nuremberg

  • 490 views
Uploaded on

Eclipse Tips, Tricks and Tools. Tools every developer should know.

Eclipse Tips, Tricks and Tools. Tools every developer should know.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
490
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
10
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Tips,  Tricks  &  Tools every  Eclipse  User  should  know
  • 2. • Project  Lead  of  Eclipse  Code  Recommenders • Eclipse  Commi7er  since  2010 • Plug-­‐in  Developer  for  10  years  (Eclipse  2.1) • Eclipse  4  and  OSGI  Trainer • Co-­‐Lead  of  Java  User  Group  Darmstadt • Speaker  at  JUGs,  EclipseCon,  JavaOne... • PhD  in  Computer  Science • CEO  of  Codetrails • Passion  to  improve  developers  day-­‐to-­‐day  work   with  intelligent  and  prac8cal  tools  -­‐  mostly  using   Data  Mining  on  Big  (So?ware  Engineering)  Data.                      @MarcelBruch                        +MarcelBruch About  me
  • 3. supported  by About  us The  Knowledge  Transfer  Company
  • 4. Disclaimer  ;-­‐) Not  all  tools  I’m  talking  about   today  are  free  or  open  source. I  assume  all  a7endees  are   familiar  with  (i)  refactorings  in   Eclipse,  (ii)  generaXng   ge7ers/se7er,  hashCode,   equals++  with  Eclipse,  and  (iii)   you  daily  use  keyboard   shortcuts. No  refactorings  and  (almost)  no  shortcuts  today!
  • 5. If  you  don’t  know  your  keyboard  shortcuts...
  • 6. No  Mouse!  #dcr13
  • 7. ⌘3
  • 8. Quick  Access  –  ⌘3  
  • 9. WHAT’S  NEW  IN  ECLIPSE  KEPLER?
  • 10. Eclipse  Kepler  by  Numbers (c)  Holger  Voormann  <eclipse@voormann.de>
  • 11. New  and  Noteworthy • Pla[orm  performance  improvements • Pla[orm  builds  with  Eclipse  CBI • IniXal  GTK+  3  support • Eclipse  Orion  3.0 • Eclipse  Jubula  support  for  tesXng  mobile  devices • Install  remedia.on • EGit  3.0 • Mylyn  Reviews • JDT  (usability)  improvements
  • 12. REMEDIATION  SUPPORT  IN  ECLIPSE
  • 13. Installing  new  features  can  be  painful...
  • 14. Not  (that  much)  with  Eclipse’s  new   Install  RemediaJon  Feature!
  • 15. UPDATING  FROM  ECLIPSE  3.X  -­‐-­‐>  4.X OMG,  I  don’t  want  to  reinstall  all  my  plugins  again...
  • 16. Install  soQware  items  from  exisJng  installaJon...
  • 17. Select  which  features  to  import...
  • 18. Want  to  prepare  a  company  wide  install  file?
  • 19. Export  soQware  items  w/  update  sites
  • 20. EGIT/JGIT  3.0  
  • 21. Git  in  Eclipse  -­‐  EGit  3.0
  • 22. Rename  DetecJon
  • 23. Reset  Repository  to  Expression
  • 24. Clean  Repository
  • 25. Commit  and  Push  (at  once)
  • 26. GERRIT  &  MYLYN  REVIEWS Four  eyes  can  see  more  than  two...
  • 27. Gerrit  at  Eclipse
  • 28. Reviewing  Changes  with  Gerrit
  • 29. Gerrit  Workflow Gerrit Hudson Git 3.  Build2.  Pull 4.  Verified 6.  Push 7.  Pull 1.  Push 5.  Approve
  • 30. HOW  IS  MYLYN  REVIEWS  GOING  TO  CHANGE  THIS?
  • 31. 1.  Push  and  Pull  to  Gerrit  from  your  IDE   Feature  in  EGit
  • 32. 2.  Review  changes  in  your  IDE
  • 33. 3.  Submit  the  approved  change
  • 34. 4.  Get  noJficaJons  about  new  change-­‐sets
  • 35. Mylyn  Builds
  • 36. WHEN  EDITING  SOURCE  CODE The  simple  basics...
  • 37. Smart  Semicolons  &  Braces
  • 38. Matching  Enclosing  Brackets
  • 39. “Faster”  IntelliJ-­‐like  Code  CompleJon .abcdefghijklmnopqrstuvwxyz
  • 40. Favorites  for  import static
  • 41. Type  Filters
  • 42. WHEN  DEBUGGING  IN  ECLIPSE The  hidden  and  rarely  used  jewels...
  • 43. Step  Filtering
  • 44. Debug  Details  Formamer
  • 45. Debug  Logical  Structure
  • 46. Extending  Logical  Structures
  • 47. Extending  Logical  Structures
  • 48. Heap  Walking
  • 49. Eclipse  Memory  Analyzer  (MAT)
  • 50. Drop  to  Frame
  • 51. JRebel  Feature  Comparison  Matrix
  • 52. Supported  Frameworks
  • 53. Get  it  from  Eclipse  Marketplace
  • 54. Test  Coverage  with  EclEmma
  • 55. Test  Coverage  with  EclEmma
  • 56. CODE  COMPLETIONS  IN  ECLIPSE Smarter  than  I  expected...
  • 57. Into  Code-­‐Comple`on  Wonderland
  • 58. ⌘1
  • 59. Quick  Fix  –  ⌘1
  • 60. ⌘2
  • 61. Quick  Assist  –  ⌘2
  • 62. ⌃  Space
  • 63. Content  Assist  –  ⌃Space
  • 64. ⌃  .
  • 65. SUBWORDS  COMPLETION “BecauseCamelCaseMatching****s!”
  • 66. Subwords  CompleJon
  • 67. Install  Subwords  from  Eclipse  Marketplace
  • 68. So  many  wonderful  engines?
  • 69. "[In  Eclipse]  sort  by  relevance  is  synonymous  to  alphabe`cal.   In  other  words  it  sucks...  but  in  a  predictably  alphabe`cal   way."
  • 70. @Override protected Control createDialogArea(final Composite parent) { Composite container = (Composite) super.createDialogArea(parent); swtTextWidget = new Text(container, SWT.BORDER); swtTextWidget.| return container; } What  Emmanuel  gets What  does  Emmanuel  get  when  triggering  code  comple`on  here?
  • 71. All  164  proposals  sorted  by  “Relevance”
  • 72. What  Emanuel  wants...
  • 73. Learning  Constructor  CompleJons
  • 74.  Codetrails  Hippie  CompleJon
  • 75. And  win  10  Raspberry  PIs!
  • 76. How  about  IntelliJ  and  Netbeans?  Tweet! Netbeans: @geertjanw  Crowdsourced  Hippie  Comple`on  is  very   cool!  When  can  I  have  it  for  Netbeans? IntelliJ: @andrey_cheptsov  Crowdsourced  Hippie  Comple`on   is  very  cool!  When  can  I  have  it  in  IntelliJ?
  • 77.  It’s  `me  to  share!
  • 78. CAN  WE  GET  IT  EVEN  SMARTER?
  • 79. What  Emmanuel  wants... …  the  most  likely  ones.  
  • 80. Recap
  • 81. Call  CompleJon
  • 82. Code  Snippet  CompleJon
  • 83. Overrides  CompleJon
  • 84. Chain  CompleJon
  • 85. How  it  works 90 Code  Recommenders   Knowledge  Base ❷ Mine  data, extract  code  pamerns, create  recommendaJon  models ❸ deliver  mined knowledge  to  Eclipse  users ❶   Analyze  source  code
  • 86. “And  what  about  my  APIs?”
  • 87. Demo:  Mining  the  JavaFX  APIs
  • 88. Get  the  Developer  Preview www. .com/download
  • 89. How  about  IntelliJ  and  Netbeans?  Tweet! Netbeans: @geertjanw  Code  Recommenders  is  very  cool!  When   can  I  have  it  for  Netbeans? IntelliJ: @andrey_cheptsov  Code  Recommenders  is  very  cool!   When  can  I  have  it  in  IntelliJ?
  • 90. NULL  ANNOTATIONS  IN  ECLIPSE   Gerng  rid  of  NullPointerExcepJons...
  • 91. PrevenJng  NullPointerExcepJons
  • 92. Enabling  Null  Analysis
  • 93. Overriding  Null  Analysis  AnnotaJons
  • 94. GENERAL  TOOLS  FOR  ECLIPSE  4
  • 95. PIMP  YOUR  ECLIPSE Eclipse  4  UI  was  torn  into  shreds.  Is  there  any  easy  way  to  get  a  nice  UI?
  • 96. Eclipse  4  Chrome  Theme  
  • 97. Eclipse  4  Chrome  Theme
  • 98. Get  it  from  Eclipse  Marketplace
  • 99. Eclipse  Color  Theme
  • 100. Eclipse  Color  Theme
  • 101. Eclipse  Color  Theme
  • 102. SHARING  PREFERENCES  IN  ENTERPRISES Same  serngs  everywhere...
  • 103. Any  default  value  can  be  overridden  by  a  properJes  file  specified   on  startup  as  follows: Preferences -- launch -- eclipse.exe -plugincustomization /path/to/plugin_customization.ini -- plugin_customization.ini -- org.eclipse.jdt.ui/content_assist_autoactivation_triggers_java=. org.eclipse.jdt.ui/content_assist_autoactivation_delay=5
  • 104. Workspace  Mechanic
  • 105. Workspace  Mechanic  -­‐  DetecJng  Issues
  • 106. Workspace  Mechanic  -­‐  Fix  it!
  • 107. Configuring  Workspace  Mechanic
  • 108. Configuring  Workspace  Mechanic
  • 109. Configuring  Workspace  Mechanic
  • 110. ECLIPSE  AND  (REMOTE)  SHELLS
  • 111. Easy  Shell
  • 112. EasyShell
  • 113. Remote  Systems  Explorer
  • 114. Virtual  Machine  Serngs Take  with  a  grain  of  salt!   Every  VM  and  Eclipse  installaXon  is  different. -­‐Xincgc -­‐Xss1m -­‐Duser.name=FirstName  LastName -­‐Dfile.encoding=UTF-­‐8 -­‐Dosgi.requiredJavaVersion=1.7 -­‐Declipse.p2.unsignedPolicy=allow -­‐Declipse.p2.MD5Check=false -­‐Xms512m -­‐Xmx2g -­‐XX:NewSize=16m -­‐XX:PermSize=120m -­‐XX:MaxPermSize=300m -­‐XX:MaxPermHeapExpansion=20m -­‐XX:+UseConcMarkSweepGC -­‐XX:CMSInitiatingOccupancyFraction=70 -­‐XX:+UseCMSInitiatingOccupancyOnly -­‐XX:+UseParNewGC -­‐XX:+CMSConcurrentMTEnabled -­‐XX:ConcGCThreads=2 -­‐XX:ParallelGCThreads=2 -­‐XX:+CMSIncrementalPacing -­‐XX:CMSIncrementalDutyCycleMin=0 -­‐XX:CMSIncrementalDutyCycle=5 -­‐XX:GCTimeRatio=49 -­‐XX:MaxGCPauseMillis=20 -­‐XX:GCPauseIntervalMillis=1000 -­‐XX:+UseCMSCompactAtFullCollection -­‐XX:+CMSClassUnloadingEnabled -­‐XX:+DoEscapeAnalysis -­‐XX:+UseCompressedOops -­‐XX:+AggressiveOpts
  • 115. BUILD  YOUR  OWN  ECLIPSE  -­‐  ECLIPSE  CBI
  • 116. All  you  need #> git clone -b master --recursive git://git.eclipse.org/ gitroot/platform/eclipse.platform.releng.aggregator.git #> mvn clean verify
  • 117. supported  by The  Knowledge  Transfer  Company
  • 118. THANKS