SlideShare a Scribd company logo
1 of 18
Download to read offline
Noopur Gupta
Eclipse JDT co-lead
IBM
@noopur2507
@EclipseCon
@EclipseJavaIDE
Java tooling, Tips & Tricks!
Mastering your IDE
OVERVIEW
Appearance
Navigation
Investigation
Coding
Debugging
Java Tooling
JUnit 5 Tooling
• 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
• 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
• 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
NAVIGATION
• 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
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
INVESTIGATION
• 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
• Auto activation triggers for Java
• Disable insertion triggers except ‘Enter’
• Preferences > Java > Editor > Content Assist
• Type Filters
• Ignore certain types from content assist, imports organization, quick fixes,
open type dialog etc.
• Preferences > Java > Appearance > Type Filters
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)
CODING
• 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
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.
DEBUGGING
• Paste Code on Package Explorer
• A new Java project will be created and the file will be opened in
Java editor
• Java 13 – Switch Expressions, Text Blocks – As preview features
• Enable preview features in Preferences
• 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
• Text blocks
• Double-click to select text block content
• Refactoring e.g. Extract to local variable (replace all
occurrences), Inline local variable
• Ctrl + I to indent
JAVA TOOLING
• Java 11 and Java 10 - ‘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
• 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
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
• https://wiki.eclipse.org/JavaX/Examples, X is Java version
JAVA 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
• Embracing JUnit 5 with Eclipse IDE – Webinar
JUnit 5 TOOLING
• 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
• Instagram
RESOURCES
Thank
You!
@noopur2507
@EclipseCon
@EclipseJavaIDE

More Related Content

What's hot

Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for seleniumapoorvams
 
Introduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationIntroduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationAhmed Mubbashir Khan
 
Developing a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLangDeveloping a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLangAntonio García-Domínguez
 
Java Swing
Java SwingJava Swing
Java SwingShraddha
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8Talha Ocakçı
 
Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Sekhar Byna
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8LivePerson
 
Selenium
SeleniumSelenium
Seleniumeduquer
 

What's hot (14)

Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 
Introduction to Selenium and Test Automation
Introduction to Selenium and Test AutomationIntroduction to Selenium and Test Automation
Introduction to Selenium and Test Automation
 
Developing a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLangDeveloping a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLang
 
Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
 
Java Swing
Java SwingJava Swing
Java Swing
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
Java 8 Features
Java 8 FeaturesJava 8 Features
Java 8 Features
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)Oracle Forms Creation-List of Values (LOV)
Oracle Forms Creation-List of Values (LOV)
 
Selenium ide workshop
Selenium ide workshopSelenium ide workshop
Selenium ide workshop
 
Functional programming with Java 8
Functional programming with Java 8Functional programming with Java 8
Functional programming with Java 8
 
Swings
SwingsSwings
Swings
 
Selenium
SeleniumSelenium
Selenium
 
java swing
java swingjava swing
java swing
 

Similar to Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe 2019

Java development with the dynamo framework
Java development with the dynamo frameworkJava development with the dynamo framework
Java development with the dynamo frameworkPatrick Deenen
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basicsLovelitJose
 
Toad tipstricksexpertinsight
Toad tipstricksexpertinsightToad tipstricksexpertinsight
Toad tipstricksexpertinsightRaj esh
 
Zend Studio Tips and Tricks #zendcon 10
Zend Studio Tips and Tricks #zendcon 10Zend Studio Tips and Tricks #zendcon 10
Zend Studio Tips and Tricks #zendcon 10Roy Ganor
 
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Fwdays
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyLeslie Doherty
 
Introduction to STATA(2).pdf
Introduction to STATA(2).pdfIntroduction to STATA(2).pdf
Introduction to STATA(2).pdfYomif3
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Dutyreedmaniac
 
Android webinar class_java_review
Android webinar class_java_reviewAndroid webinar class_java_review
Android webinar class_java_reviewEdureka!
 
ITFT - Java Coding
ITFT - Java CodingITFT - Java Coding
ITFT - Java CodingBlossom Sood
 
Hibernate ORM: Tips, Tricks, and Performance Techniques
Hibernate ORM: Tips, Tricks, and Performance TechniquesHibernate ORM: Tips, Tricks, and Performance Techniques
Hibernate ORM: Tips, Tricks, and Performance TechniquesBrett Meyer
 
Continuous improvements of developer efficiency with modern IDE
Continuous improvements of developer efficiency with modern IDEContinuous improvements of developer efficiency with modern IDE
Continuous improvements of developer efficiency with modern IDEMikalai Alimenkou
 
Visual Studio Produktivität (Daniel Meixner)
Visual Studio Produktivität (Daniel Meixner)Visual Studio Produktivität (Daniel Meixner)
Visual Studio Produktivität (Daniel Meixner)Daniel Meixner
 
java in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariyajava in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariyaviratandodariya
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligentVirat Andodariya
 

Similar to Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe 2019 (20)

Java development with the dynamo framework
Java development with the dynamo frameworkJava development with the dynamo framework
Java development with the dynamo framework
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
 
Toad tipstricksexpertinsight
Toad tipstricksexpertinsightToad tipstricksexpertinsight
Toad tipstricksexpertinsight
 
Zend Studio Tips and Tricks #zendcon 10
Zend Studio Tips and Tricks #zendcon 10Zend Studio Tips and Tricks #zendcon 10
Zend Studio Tips and Tricks #zendcon 10
 
java.pptx
java.pptxjava.pptx
java.pptx
 
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
 
presentation
presentationpresentation
presentation
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
Introduction to STATA(2).pdf
Introduction to STATA(2).pdfIntroduction to STATA(2).pdf
Introduction to STATA(2).pdf
 
Add-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his DutyAdd-On Development: EE Expects that Every Developer will do his Duty
Add-On Development: EE Expects that Every Developer will do his Duty
 
presentation
presentationpresentation
presentation
 
Android webinar class_java_review
Android webinar class_java_reviewAndroid webinar class_java_review
Android webinar class_java_review
 
ITFT - Java Coding
ITFT - Java CodingITFT - Java Coding
ITFT - Java Coding
 
Hibernate ORM: Tips, Tricks, and Performance Techniques
Hibernate ORM: Tips, Tricks, and Performance TechniquesHibernate ORM: Tips, Tricks, and Performance Techniques
Hibernate ORM: Tips, Tricks, and Performance Techniques
 
Continuous improvements of developer efficiency with modern IDE
Continuous improvements of developer efficiency with modern IDEContinuous improvements of developer efficiency with modern IDE
Continuous improvements of developer efficiency with modern IDE
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
 
Visual Studio Produktivität (Daniel Meixner)
Visual Studio Produktivität (Daniel Meixner)Visual Studio Produktivität (Daniel Meixner)
Visual Studio Produktivität (Daniel Meixner)
 
java in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariyajava in Aartificial intelligent by virat andodariya
java in Aartificial intelligent by virat andodariya
 
JAVA in Artificial intelligent
JAVA in Artificial intelligentJAVA in Artificial intelligent
JAVA in Artificial intelligent
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Mastering your Eclipse IDE - Java tooling, Tips & Tricks - EclipseCon Europe 2019

  • 1. Noopur Gupta Eclipse JDT co-lead IBM @noopur2507 @EclipseCon @EclipseJavaIDE Java tooling, Tips & Tricks! Mastering your IDE
  • 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
  • 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
  • 5. • 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 NAVIGATION
  • 6. • 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 INVESTIGATION
  • 7. • 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 INVESTIGATION
  • 8. • 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 • Auto activation triggers for Java • Disable insertion triggers except ‘Enter’ • Preferences > Java > Editor > Content Assist • Type Filters • Ignore certain types from content assist, imports organization, quick fixes, open type dialog etc. • Preferences > Java > Appearance > Type Filters CODING
  • 9. • 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) CODING
  • 10. • 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 DEBUGGING
  • 11. • 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. DEBUGGING
  • 12. • Paste Code on Package Explorer • A new Java project will be created and the file will be opened in Java editor • Java 13 – Switch Expressions, Text Blocks – As preview features • Enable preview features in Preferences • 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 • Text blocks • Double-click to select text block content • Refactoring e.g. Extract to local variable (replace all occurrences), Inline local variable • Ctrl + I to indent JAVA TOOLING
  • 13. • Java 11 and Java 10 - ‘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 • 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 JAVA TOOLING
  • 14. • 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 • https://wiki.eclipse.org/JavaX/Examples, X is Java version JAVA TOOLING
  • 15. • 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 • Embracing JUnit 5 with Eclipse IDE – Webinar JUnit 5 TOOLING
  • 16. • 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 • Instagram RESOURCES
  • 17.