SlideShare a Scribd company logo
Unleashing the Java Tooling in IDE
TIPS & TRICKS!
Noopur Gupta
Eclipse JDT co-lead
IBM | ACM FCA
@noopur2507
@EclipseJavaIDE
@WomenTechNet
#WTGC2020
Appearance
Navigation
Investigation
Coding
Debugging
Java Tooling
JUnit 5 Tooling
OVERVIEW
• Window > Appearance
• Hide Toolbar, Status Bar
• Full Screen (Alt + F11)
• Show key bindings when command is invoked
• Zoom in Text Editors
• Zoom In: Ctrl + + (or) Ctrl + =
• Zoom Out: Ctrl + -
• Pinch gestures on touch-enabled devices
• Working Sets
• Preferences > Java > Appearance
• Abbreviate Package Names with Custom Rules
• Sort Library Entries Alphabetically in Package Explorer
APPEARANCE
Noopur Gupta, IBM | WomenTech Global Conference 2020 3
• Quick Access / Find Actions (Ctrl + 3)
• Quick Switch Editor (Ctrl + E) – Open editors list
• ‘Delete’ key – close editor
• Quick Outline (Ctrl + O, twice to show inherited members)
• In-place Outline (Ctrl + F3)
• Configure problem severity quick fix (Ctrl + 1)
• Hovers (Preferences > Java > Editor > Hovers)
• In-place Javadoc (with error/warning on element)
• Ctrl + Shift and hover, or use Javadoc view
• In-place source code
• Shift and hover, or use Declaration view
• Sticky Hover (F2) – Open attached Javadoc in a Browser
• Expand vertical ruler icons upon hovering
NAVIGATION
4Noopur Gupta, IBM | WomenTech Global Conference 2020
NAVIGATION
• Search Dialog (Ctrl + H)
• Quick Text Search (Ctrl + Alt + Shift + L)
• Go to last edit location (Ctrl + Q)
• Alt + Left/Right – move backward/forward in editor navigation history
• Markers
• Bookmarks
• Right-click on left editor pane > Add Bookmark…
• Bookmarks view
• Tasks
• Right-click on left editor pane > Add Task…
• Tasks view
• Preferences > Java > Compiler > Task Tags
• Show In (Alt + Shift + W) > System Explorer
5Noopur Gupta, IBM | WomenTech Global Conference 2020
INVESTIGATION
• Plug-in Spies
• Alt + Shift + F1 – Plug-in Selection Spy
• Alt + Shift + F2 – Plug-in Menu Spy
• Alt + Shift + F3 – Show Contributing Plug-in
• Ctrl + Alt + Shift + F9 – Layout Spy
• Plug-in Image Browser
• Externalized Strings
• Ctrl + Click on key in .properties file to find referencing code
• Show Revision Information
• To determine who last modified a line of code and when
• Right-click on left editor pane > Show Revision Information
6Noopur Gupta, IBM | WomenTech Global Conference 2020
INVESTIGATION
• UI Responsiveness Monitoring
• For automatic detection and logging of stack traces when Eclipse UI is
unresponsive
• Window > Preferences > General > UI Responsiveness Monitoring
• Java Stack Trace Console
• Copy stack trace from log file and Navigate > Open from Clipboard
(Ctrl + Shift + V)
• Click on hyperlinks to jump to the code
• Click on exception name hyperlink to create an exception breakpoint
7Noopur Gupta, IBM | WomenTech Global Conference 2020
CODING
• Content Assist - Insert or Overwrite
• Replace existing text while invoking content assist
• Press ‘Ctrl’ to toggle while content assist is active
• Content Assist Templates
• Configure/Create in Templates view, Export/Import in Preferences
• Content Assist Postfix Proposals
• Preferences > Java > Editor > Content Assist > Advanced
• Auto Activation of Content Assist (Preferences > Java > Editor > Content Assist)
• Auto activation triggers for Java
• Disable insertion triggers except ‘Enter’
• Type Filters (Preferences > Java > Appearance > Type Filters)
• Ignore certain types from content assist, imports organization, quick fixes, open
type dialog etc.
8Noopur Gupta, IBM | WomenTech Global Conference 2020
CODING
• Code Minings (as decorative text; via extension point)
• Preferences > Java > Editor > Code Minings
• Show references
• Show implementations
• Show method parameter names
or, Show method parameter hints – Ctrl + Shift + Space
• Block Selection Mode (Alt + Shift + A)
• To edit a large number of almost identical lines at the same time
• Expand selection to enclosing element (Alt + Shift + Up / Down)
• Duplicate lines (Ctrl + Alt + Up / Down)
• Move lines (Alt + Up / Down)
• Delete lines (Ctrl + D)
9Noopur Gupta, IBM | WomenTech Global Conference 2020
DEBUGGING
• Smart Step Into (Ctrl + F5 or Ctrl + Alt + Click)
o To step into a single method within a series of chained or nested method calls
• Step Filters
o To filter out specified classes and packages while stepping into code
o Preferences > Java > Debug > Step Filtering
• Run to Line (Ctrl + Alt + Click on left editor pane)
• Grouping and Sharing breakpoints – Breakpoints view
o Sort by name or creation time
o Group by various categories or create working sets
o Share by exporting/importing breakpoint groups
10Noopur Gupta, IBM | WomenTech Global Conference 2020
DEBUGGING
• Tracepoint
• A point in code where the debugger does not break the execution but
only prints to console
• Prevents the addition of print statements in code while debugging
• Can be used to debug race conditions or to see the order of execution
of threads
• Run > Toggle Tracepoint
• Trigger Point
• Set a breakpoint as trigger point in Breakpoint Properties
• All the breakpoints (except trigger points) are disabled until a trigger
point is hit
• All the trigger points are disabled after a trigger point is hit and all the
trigger points will be re-enabled for the next run
• Remove all trigger points – context-menu action in Breakpoints view
• Hit count - The breakpoint suspends the execution of a thread only when it
is encountered for the Nth time.
11Noopur Gupta, IBM | WomenTech Global Conference 2020
JAVA TOOLING
• Paste Code on Package Explorer
• A new Java project will be created and the file will be opened in Java editor
• Java 14 – Records, Text Blocks, Switch Expressions
• Configure > Enable preview features
• New > Java > Record
• Text blocks
• Ctrl + Shift + ' to insert triple quotes
• Double-click to select text block content
• Ctrl + I to indent
• Switch Expressions and Enhanced Switch Statements
• Add missing case statements and default case
• Split case labels
• Ctrl + Click on ‘case’ and ‘default’ to jump to the target location in switch
12Noopur Gupta, IBM | WomenTech Global Conference 2020
JAVA TOOLING
• Java 11 - ‘var’ support
• Declare extracted local variable’s type as ‘var’
• Replace ‘var’ with inferred type & vice-versa
• Hover to view the inferred type for ‘var’
• Ctrl + Click to navigate to the inferred type of ‘var’
• Java 9 – Java Platform Module System
• Convert to modular project - create module-info.java action
• Add libraries to module path
• Configure properties of module graph (Module Dependencies)
• Quick fix to identify and add required module to module-info.java
• Create and export a non-empty package in a single step from module-info.java
• Quick fix to provide a service implementation from module-info.java
13Noopur Gupta, IBM | WomenTech Global Conference 2020
JAVA TOOLING
• Java 8 – Lambda Expressions and Method References
• Convert anonymous class to lambda and back
• Convert lambda to method reference and back
• Add inferred lambda parameter types
• View and navigate to the functional method
• Refactoring on functional interface instances e.g.
Change method signature
14Noopur Gupta, IBM | WomenTech Global Conference 2020
JUNIT 5 TOOLING
• Quick assist to create JUnit Jupiter test class and test method
• Grouped assertions and combined result comparison
• Navigate to failing source location
• Double-click on entry in JUnit view’s failure trace
• Click "Show Stack Trace in Console View" button and use the hyperlinks
• Tagging and Filtering (@Tag)
• Configure Tags dialog in JUnit launch configuration
• Ctrl + Click on a launch name in the toolbar history to directly open it
in the launch configuration dialog
• Embracing JUnit 5 with Eclipse IDE – Webinar
15Noopur Gupta, IBM | WomenTech Global Conference 2020
RESOURCES
• List all keyboard shortcuts (Ctrl + Shift + L)
• Configure keyboard shortcuts (Ctrl + Shift + L - twice): Preferences > General > Keys
• Eclipse Help > Tips and Tricks…
• Eclipse Help > Welcome > What’s new
• New and Noteworthy: https://www.eclipse.org/eclipse/news/4.x
• Twitter
• @EclipseJavaIDE
• #EclipseTips
16Noopur Gupta, IBM | WomenTech Global Conference 2020
Thank You!
@noopur2507
@EclipseJavaIDE
@WomenTechNet
#WTGC2020

More Related Content

PDF
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
PDF
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
PPTX
Functional programming principles and Java 8
PDF
Code generating beans in Java
PDF
Functional Java 8 - Introduction
PDF
Functional Programming in Java
PDF
Greach 2015 Spock workshop
PDF
Automating JFC UI application testing with Jemmy
Mastering your Eclipse IDE - Java tooling, Tips & Tricks!
Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe ...
Functional programming principles and Java 8
Code generating beans in Java
Functional Java 8 - Introduction
Functional Programming in Java
Greach 2015 Spock workshop
Automating JFC UI application testing with Jemmy

Similar to Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks! (20)

PPTX
AOP on Android
PDF
Toad tipstricksexpertinsight
PPTX
Zend Studio Tips and Tricks #zendcon 10
PDF
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf
PPTX
PDF
Java development with the dynamo framework
PDF
How and what to unit test
PPTX
Productivity Enhencement with Visual Studio
PPTX
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
 
PDF
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
PPTX
Continuous improvements of developer efficiency with modern IDE
PPTX
Qt test framework
 
PDF
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
PPTX
Refactoring
PPTX
Grails Spock Testing
PDF
ITFT - Java Coding
PDF
The Evolution of Development Testing
PDF
Software Qualitiy with Sonar Tool 2013_4
ZIP
Staging and Deployment
PDF
Add-On Development: EE Expects that Every Developer will do his Duty
AOP on Android
Toad tipstricksexpertinsight
Zend Studio Tips and Tricks #zendcon 10
Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf
Java development with the dynamo framework
How and what to unit test
Productivity Enhencement with Visual Studio
[Webinar] Qt Test-Driven Development Using Google Test and Google Mock
 
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Continuous improvements of developer efficiency with modern IDE
Qt test framework
 
Mastering your Eclipse IDE - Tips, Tricks, Java 8 tooling & More!
Refactoring
Grails Spock Testing
ITFT - Java Coding
The Evolution of Development Testing
Software Qualitiy with Sonar Tool 2013_4
Staging and Deployment
Add-On Development: EE Expects that Every Developer will do his Duty
Ad

More from Noopur Gupta (8)

PDF
Java 14 support in Eclipse IDE
PDF
What's cool in Eclipse goody bag!
PDF
High productivity development with Eclipse and Java 8
PDF
Java 8 tooling in Eclipse
PDF
Eclipse Luna - What's New!
PDF
JDT Embraces Lambda Expressions - EclipseCon North America 2014
PDF
Eclipse Tips & Tricks - EclipseCon North America 2014
PDF
Eclipse and Java 8 - Eclipse Day India 2013
Java 14 support in Eclipse IDE
What's cool in Eclipse goody bag!
High productivity development with Eclipse and Java 8
Java 8 tooling in Eclipse
Eclipse Luna - What's New!
JDT Embraces Lambda Expressions - EclipseCon North America 2014
Eclipse Tips & Tricks - EclipseCon North America 2014
Eclipse and Java 8 - Eclipse Day India 2013
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Approach and Philosophy of On baking technology
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Machine Learning_overview_presentation.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
A Presentation on Artificial Intelligence
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Electronic commerce courselecture one. Pdf
Approach and Philosophy of On baking technology
A comparative analysis of optical character recognition models for extracting...
Machine Learning_overview_presentation.pptx
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Unlocking AI with Model Context Protocol (MCP)
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A Presentation on Artificial Intelligence
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Unleashing the Java Tooling in Eclipse IDE - Tips & Tricks!

  • 1. Unleashing the Java Tooling in IDE TIPS & TRICKS! Noopur Gupta Eclipse JDT co-lead IBM | ACM FCA @noopur2507 @EclipseJavaIDE @WomenTechNet #WTGC2020
  • 3. • Window > Appearance • Hide Toolbar, Status Bar • Full Screen (Alt + F11) • Show key bindings when command is invoked • Zoom in Text Editors • Zoom In: Ctrl + + (or) Ctrl + = • Zoom Out: Ctrl + - • Pinch gestures on touch-enabled devices • Working Sets • Preferences > Java > Appearance • Abbreviate Package Names with Custom Rules • Sort Library Entries Alphabetically in Package Explorer APPEARANCE Noopur Gupta, IBM | WomenTech Global Conference 2020 3
  • 4. • Quick Access / Find Actions (Ctrl + 3) • Quick Switch Editor (Ctrl + E) – Open editors list • ‘Delete’ key – close editor • Quick Outline (Ctrl + O, twice to show inherited members) • In-place Outline (Ctrl + F3) • Configure problem severity quick fix (Ctrl + 1) • Hovers (Preferences > Java > Editor > Hovers) • In-place Javadoc (with error/warning on element) • Ctrl + Shift and hover, or use Javadoc view • In-place source code • Shift and hover, or use Declaration view • Sticky Hover (F2) – Open attached Javadoc in a Browser • Expand vertical ruler icons upon hovering NAVIGATION 4Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 5. NAVIGATION • Search Dialog (Ctrl + H) • Quick Text Search (Ctrl + Alt + Shift + L) • Go to last edit location (Ctrl + Q) • Alt + Left/Right – move backward/forward in editor navigation history • Markers • Bookmarks • Right-click on left editor pane > Add Bookmark… • Bookmarks view • Tasks • Right-click on left editor pane > Add Task… • Tasks view • Preferences > Java > Compiler > Task Tags • Show In (Alt + Shift + W) > System Explorer 5Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 6. INVESTIGATION • Plug-in Spies • Alt + Shift + F1 – Plug-in Selection Spy • Alt + Shift + F2 – Plug-in Menu Spy • Alt + Shift + F3 – Show Contributing Plug-in • Ctrl + Alt + Shift + F9 – Layout Spy • Plug-in Image Browser • Externalized Strings • Ctrl + Click on key in .properties file to find referencing code • Show Revision Information • To determine who last modified a line of code and when • Right-click on left editor pane > Show Revision Information 6Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 7. INVESTIGATION • UI Responsiveness Monitoring • For automatic detection and logging of stack traces when Eclipse UI is unresponsive • Window > Preferences > General > UI Responsiveness Monitoring • Java Stack Trace Console • Copy stack trace from log file and Navigate > Open from Clipboard (Ctrl + Shift + V) • Click on hyperlinks to jump to the code • Click on exception name hyperlink to create an exception breakpoint 7Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 8. CODING • Content Assist - Insert or Overwrite • Replace existing text while invoking content assist • Press ‘Ctrl’ to toggle while content assist is active • Content Assist Templates • Configure/Create in Templates view, Export/Import in Preferences • Content Assist Postfix Proposals • Preferences > Java > Editor > Content Assist > Advanced • Auto Activation of Content Assist (Preferences > Java > Editor > Content Assist) • Auto activation triggers for Java • Disable insertion triggers except ‘Enter’ • Type Filters (Preferences > Java > Appearance > Type Filters) • Ignore certain types from content assist, imports organization, quick fixes, open type dialog etc. 8Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 9. CODING • Code Minings (as decorative text; via extension point) • Preferences > Java > Editor > Code Minings • Show references • Show implementations • Show method parameter names or, Show method parameter hints – Ctrl + Shift + Space • Block Selection Mode (Alt + Shift + A) • To edit a large number of almost identical lines at the same time • Expand selection to enclosing element (Alt + Shift + Up / Down) • Duplicate lines (Ctrl + Alt + Up / Down) • Move lines (Alt + Up / Down) • Delete lines (Ctrl + D) 9Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 10. DEBUGGING • Smart Step Into (Ctrl + F5 or Ctrl + Alt + Click) o To step into a single method within a series of chained or nested method calls • Step Filters o To filter out specified classes and packages while stepping into code o Preferences > Java > Debug > Step Filtering • Run to Line (Ctrl + Alt + Click on left editor pane) • Grouping and Sharing breakpoints – Breakpoints view o Sort by name or creation time o Group by various categories or create working sets o Share by exporting/importing breakpoint groups 10Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 11. DEBUGGING • Tracepoint • A point in code where the debugger does not break the execution but only prints to console • Prevents the addition of print statements in code while debugging • Can be used to debug race conditions or to see the order of execution of threads • Run > Toggle Tracepoint • Trigger Point • Set a breakpoint as trigger point in Breakpoint Properties • All the breakpoints (except trigger points) are disabled until a trigger point is hit • All the trigger points are disabled after a trigger point is hit and all the trigger points will be re-enabled for the next run • Remove all trigger points – context-menu action in Breakpoints view • Hit count - The breakpoint suspends the execution of a thread only when it is encountered for the Nth time. 11Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 12. JAVA TOOLING • Paste Code on Package Explorer • A new Java project will be created and the file will be opened in Java editor • Java 14 – Records, Text Blocks, Switch Expressions • Configure > Enable preview features • New > Java > Record • Text blocks • Ctrl + Shift + ' to insert triple quotes • Double-click to select text block content • Ctrl + I to indent • Switch Expressions and Enhanced Switch Statements • Add missing case statements and default case • Split case labels • Ctrl + Click on ‘case’ and ‘default’ to jump to the target location in switch 12Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 13. JAVA TOOLING • Java 11 - ‘var’ support • Declare extracted local variable’s type as ‘var’ • Replace ‘var’ with inferred type & vice-versa • Hover to view the inferred type for ‘var’ • Ctrl + Click to navigate to the inferred type of ‘var’ • Java 9 – Java Platform Module System • Convert to modular project - create module-info.java action • Add libraries to module path • Configure properties of module graph (Module Dependencies) • Quick fix to identify and add required module to module-info.java • Create and export a non-empty package in a single step from module-info.java • Quick fix to provide a service implementation from module-info.java 13Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 14. JAVA TOOLING • Java 8 – Lambda Expressions and Method References • Convert anonymous class to lambda and back • Convert lambda to method reference and back • Add inferred lambda parameter types • View and navigate to the functional method • Refactoring on functional interface instances e.g. Change method signature 14Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 15. JUNIT 5 TOOLING • Quick assist to create JUnit Jupiter test class and test method • Grouped assertions and combined result comparison • Navigate to failing source location • Double-click on entry in JUnit view’s failure trace • Click "Show Stack Trace in Console View" button and use the hyperlinks • Tagging and Filtering (@Tag) • Configure Tags dialog in JUnit launch configuration • Ctrl + Click on a launch name in the toolbar history to directly open it in the launch configuration dialog • Embracing JUnit 5 with Eclipse IDE – Webinar 15Noopur Gupta, IBM | WomenTech Global Conference 2020
  • 16. RESOURCES • List all keyboard shortcuts (Ctrl + Shift + L) • Configure keyboard shortcuts (Ctrl + Shift + L - twice): Preferences > General > Keys • Eclipse Help > Tips and Tricks… • Eclipse Help > Welcome > What’s new • New and Noteworthy: https://www.eclipse.org/eclipse/news/4.x • Twitter • @EclipseJavaIDE • #EclipseTips 16Noopur Gupta, IBM | WomenTech Global Conference 2020