Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Eclipse Day India 2014 | Eclipse Tips and Tricks 
1 
Noopur Gupta 
Eclipse JDT/UI Committer 
IBM Software Labs, Bangaloren...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
2
Eclipse Day India 2014 | Eclipse Tips and Tricks 
3
Eclipse Day India 2014 | Eclipse Tips and Tricks 
4 
Show Workspace Location in the Title Bar 
OR 
(-showLocation)
Eclipse Day India 2014 | Eclipse Tips and Tricks 
5 
Show Workspace Name in the Title Bar 
(Window > Preferences > General...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
6 
Create Eclipse shortcuts with default workspaces 
(-data workspacePat...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
7 
Working Sets 
Package Explorer > 
Configure Working Sets… 
Package Ex...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
8 
Abbreviate package names with custom rules 
Window > Preferences > 
J...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
9 
Export/Import 
File > Export… 
General > Preferences 
File > Import… ...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
10
Eclipse Day India 2014 | Eclipse Tips and Tricks 
11 
Talk to Eclipse : Start typing and get the results from many categor...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
+ 
Ctrl 
O 
12 
Quick Outline: 
To list the structural elements of the f...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
13 
Toggle Breadcrumb tool bar buttonShowsthepathtotheelementatthecursor...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
14 
Ctrl+Clickonapropertykeyinthe*.propertiesfileshowstheplacesinsourcec...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
15 
Findsundefined,unusedandduplicatekeys. 
Source > Find Broken Externa...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
16 
Fromastacktraceinlogfile,insteadoflocatingthefileandgoingtothelinenu...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
17 
Toopenthefoldercontainingaresource,inyoursystem'sfileexplorer. 
Cont...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
18
Eclipse Day India 2014 | Eclipse Tips and Tricks 
19 
+ 
+ 
Alt 
 
F1 
+ 
+ 
Alt 
 
F2
Eclipse Day India 2014 | Eclipse Tips and Tricks 
20 
JustcopytheJavacodeandpasteonPackageExplorer. AnewJavaprojectwillbec...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
21 
Todeterminewholastmodifiedalineofcodeandwhen.
Eclipse Day India 2014 | Eclipse Tips and Tricks 
 
+ 
Ctrl 
 
22 
ToseetheJavadocinsuchcases,pressandhover. Whenthereis...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
23 
ToignorecertaintypesfromtheOpenTypedialog,contentassist,quickfixprop...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
24 
TemplatesareshowntogetherwiththeContentAssist(Ctrl+Space) proposals....
Eclipse Day India 2014 | Eclipse Tips and Tricks 
25 
Tofindallread/writeaccessestotheselectedfieldorlocalvariableinthecho...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
26 
Toeditlargenumberofalmostidenticallines.
Eclipse Day India 2014 | Eclipse Tips and Tricks 
27 
Tovieworeditmultiplesectionsofalargefileatonce. 
splits the editor ...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
28 
FormatterOff/Ontagscanbeusedinanycommenttoturntheformatteroffandon. ...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
+ 
Ctrl 
1 
29 
Don’ttypetoomuchyourself–LetEclipsehelpyouwithquickfixes...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
+ 
= 
Delete current line 
Ctrl 
D 
+ 
/ 
= 
Move line(s) 
Alt 
 
 
+ ...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
31
Eclipse Day India 2014 | Eclipse Tips and Tricks 
32 
Tostepintoasinglemethodwithinaseriesofchainedornestedmethodcalls. Ex...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
33 
LineBreakpointConditionalBreakpointExceptionBreakpoint: 
Whenexcepti...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
34 
ClassloadBreakpoint: 
Toinspectwhoistryingtoloadtheclassorwhereisitu...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
35 
:Apointincodewherethedebuggerdoesnotbreaktheexecutionbutonlyprintsto...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
36 
Tofilteroutspecifiedclassesandpackageswhilestepingintocodeduringdebu...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
37 
Acontainerforrandomsnippetsofcodethatcanbeexecutedanytimewithoutacon...
Eclipse Day India 2014 | Eclipse Tips and Tricks 
38 
LASTBUTNOTTHELEAST! 
Help > Welcome > 
What’s New 
Help > Tips and T...
Eclipse Day India 2014 | Eclipse Tips and Tricks
Upcoming SlideShare
Loading in …5
×

Eclipse Tips & Tricks

835 views

Published on

Eclipse Tips & Tricks

Published in: Technology
  • Be the first to comment

Eclipse Tips & Tricks

  1. 1. Eclipse Day India 2014 | Eclipse Tips and Tricks 1 Noopur Gupta Eclipse JDT/UI Committer IBM Software Labs, Bangalorenoopur_gupta@in.ibm.com
  2. 2. Eclipse Day India 2014 | Eclipse Tips and Tricks 2
  3. 3. Eclipse Day India 2014 | Eclipse Tips and Tricks 3
  4. 4. Eclipse Day India 2014 | Eclipse Tips and Tricks 4 Show Workspace Location in the Title Bar OR (-showLocation)
  5. 5. Eclipse Day India 2014 | Eclipse Tips and Tricks 5 Show Workspace Name in the Title Bar (Window > Preferences > General > Workspace)
  6. 6. Eclipse Day India 2014 | Eclipse Tips and Tricks 6 Create Eclipse shortcuts with default workspaces (-data workspacePath)
  7. 7. Eclipse Day India 2014 | Eclipse Tips and Tricks 7 Working Sets Package Explorer > Configure Working Sets… Package Explorer > Top Level Elements > Working Sets
  8. 8. Eclipse Day India 2014 | Eclipse Tips and Tricks 8 Abbreviate package names with custom rules Window > Preferences > Java > Appearance > Abbreviate package names
  9. 9. Eclipse Day India 2014 | Eclipse Tips and Tricks 9 Export/Import File > Export… General > Preferences File > Import… General > Preferences
  10. 10. Eclipse Day India 2014 | Eclipse Tips and Tricks 10
  11. 11. Eclipse Day India 2014 | Eclipse Tips and Tricks 11 Talk to Eclipse : Start typing and get the results from many categories of UI elements. + Ctrl 3
  12. 12. Eclipse Day India 2014 | Eclipse Tips and Tricks + Ctrl O 12 Quick Outline: To list the structural elements of the file (such as classes, fields, methods for a Java source file). In-place Outline: To pop up an in-place outline of the element at the current cursor position. + Ctrl F3
  13. 13. Eclipse Day India 2014 | Eclipse Tips and Tricks 13 Toggle Breadcrumb tool bar buttonShowsthepathtotheelementatthecursorposition. Navigatetootherelementsviadrop-downsandinvokeactions(whenotherviewsarenotvisible). Also available on multiple editors that are open side-by-side.
  14. 14. Eclipse Day India 2014 | Eclipse Tips and Tricks 14 Ctrl+Clickonapropertykeyinthe*.propertiesfileshowstheplacesinsourcecodewhereitisbeingusedandtakesyoutothereferencingcode.
  15. 15. Eclipse Day India 2014 | Eclipse Tips and Tricks 15 Findsundefined,unusedandduplicatekeys. Source > Find Broken Externalized Strings
  16. 16. Eclipse Day India 2014 | Eclipse Tips and Tricks 16 Fromastacktraceinlogfile,insteadoflocatingthefileandgoingtothelinenumberviaCtrl+L,useJavaStackTraceConsole. Copythestacktracefromlogfileandclick: Copythestacktraceandpasteontheconsole: ClickonthehyperlinksforJavaclassnameswithlinenumberstonavigate. Clickingontheexceptionnameinstacktracewillcreateanexceptionbreakpoint. Navigate > Open from Clipboard Console view > Open Console (drop-down menu) > Java Stack Trace Console OR
  17. 17. Eclipse Day India 2014 | Eclipse Tips and Tricks 17 Toopenthefoldercontainingaresource,inyoursystem'sfileexplorer. Context menu: Show In > System Explorer
  18. 18. Eclipse Day India 2014 | Eclipse Tips and Tricks 18
  19. 19. Eclipse Day India 2014 | Eclipse Tips and Tricks 19 + + Alt  F1 + + Alt  F2
  20. 20. Eclipse Day India 2014 | Eclipse Tips and Tricks 20 JustcopytheJavacodeandpasteonPackageExplorer. AnewJavaprojectwillbecreatedandthefilewillbeopenedintheJavaeditor.
  21. 21. Eclipse Day India 2014 | Eclipse Tips and Tricks 21 Todeterminewholastmodifiedalineofcodeandwhen.
  22. 22. Eclipse Day India 2014 | Eclipse Tips and Tricks  + Ctrl  22 ToseetheJavadocinsuchcases,pressandhover. Whenthereisanerror/warningatanidentifier,thecorrespondingmessageisshownonhoverinsteadoftheJavadoc. Updatetexthoverkeymodifersat: Window > Preferences > Java > Editor > HoversToseethesourceonhover, pressandhover. Or use Javadoc view. Or use Declaration view.
  23. 23. Eclipse Day India 2014 | Eclipse Tips and Tricks 23 ToignorecertaintypesfromtheOpenTypedialog,contentassist,quickfixproposals,importorganizationetc. Window > Preferences > Java > Appearance > Type FiltersExample:
  24. 24. Eclipse Day India 2014 | Eclipse Tips and Tricks 24 TemplatesareshowntogetherwiththeContentAssist(Ctrl+Space) proposals. Thereareexistingtemplatesthatyoucanconfigureordefinenewtemplates. Window > Preferences > Java > Editor > Templates OR Templates view
  25. 25. Eclipse Day India 2014 | Eclipse Tips and Tricks 25 Tofindallread/writeaccessestotheselectedfieldorlocalvariableinthechosenscope. OR
  26. 26. Eclipse Day India 2014 | Eclipse Tips and Tricks 26 Toeditlargenumberofalmostidenticallines.
  27. 27. Eclipse Day India 2014 | Eclipse Tips and Tricks 27 Tovieworeditmultiplesectionsofalargefileatonce. splits the editor one above the other splits the editor side by side + + Ctrl Ctrl _ {
  28. 28. Eclipse Day India 2014 | Eclipse Tips and Tricks 28 FormatterOff/Ontagscanbeusedinanycommenttoturntheformatteroffandon. Example:TopreventformattingofSQLqueries.
  29. 29. Eclipse Day India 2014 | Eclipse Tips and Tricks + Ctrl 1 29 Don’ttypetoomuchyourself–LetEclipsehelpyouwithquickfixes, quickassists,refactorings,contentassistandmore. Examples: Quick Assist: Quick Fix:
  30. 30. Eclipse Day India 2014 | Eclipse Tips and Tricks + = Delete current line Ctrl D + / = Move line(s) Alt   + = Maximize/Minimize Editor/View Ctrl M + + = To upper case/ lower case Ctrl  X + = Comment/Uncomment line Ctrl / / Y + = Quick Switch Editor Ctrl E + + Alt   = Expand selection to enclosing element + + = Lists all keyboard short cuts Ctrl  L 30 Examples:
  31. 31. Eclipse Day India 2014 | Eclipse Tips and Tricks 31
  32. 32. Eclipse Day India 2014 | Eclipse Tips and Tricks 32 Tostepintoasinglemethodwithinaseriesofchainedornestedmethodcalls. Example: + + Ctrl Alt Click + Ctrl F5 OR OR
  33. 33. Eclipse Day India 2014 | Eclipse Tips and Tricks 33 LineBreakpointConditionalBreakpointExceptionBreakpoint: Whenexceptionsarepassedoverseverallayers,theyareoftenwrappedordiscardedinanotherexception.Tofindtheoriginsofanexception,useExceptionbreakpoint.Theexecutionwillsuspendwhenevertheexceptionisthrownorcaught.
  34. 34. Eclipse Day India 2014 | Eclipse Tips and Tricks 34 ClassloadBreakpoint: Toinspectwhoistryingtoloadtheclassorwhereisitusedforthefirsttime. Watchpoint: Tosuspendtheexecutionwhereafieldisaccessedormodified. MethodBreakpoint: Tosuspendtheexecutionwhenthemethodisenteredorexited.
  35. 35. Eclipse Day India 2014 | Eclipse Tips and Tricks 35 :Apointincodewherethedebuggerdoesnotbreaktheexecutionbutonlyprintstoconsole. Todebugraceconditionsortoseetheorderofthreadsexecution. Topreventtheadditionofprintstatementsinthecodewhiledebugging. Set a conditional breakpoint withSuspend when 'true'option and a condition which is always false (eg: return false;) as the last statement.
  36. 36. Eclipse Day India 2014 | Eclipse Tips and Tricks 36 Tofilteroutspecifiedclassesandpackageswhilestepingintocodeduringdebugging. IntheDebugview,theselectedstackframe'spackageordeclaringtypecanbequicklyaddedtothelistoffiltersbyselectingFilterTypeorFilterPackagefromthestackframe'scontextmenu. Window > Preferences > Java > Debug > Step Filtering OR
  37. 37. Eclipse Day India 2014 | Eclipse Tips and Tricks 37 Acontainerforrandomsnippetsofcodethatcanbeexecutedanytimewithoutacontext. ToexperimentwithanAPIortestapieceofcode(algorithm/method). Noneedtocreateanewproject/class/mainmethod/ runtheapplicationtotest.
  38. 38. Eclipse Day India 2014 | Eclipse Tips and Tricks 38 LASTBUTNOTTHELEAST! Help > Welcome > What’s New Help > Tips and Tricks...
  39. 39. Eclipse Day India 2014 | Eclipse Tips and Tricks

×