+ All Categories
Home > Documents > ECLIPSE TIPS & TRICKS

ECLIPSE TIPS & TRICKS

Date post: 29-Apr-2022
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
28
SARIKA SINHA Eclipse JDT & Platform Co-lead IBM ECLIPSE TIPS & TRICKS LAKSHMI P SHANMUGAM Eclipse Platform Co-lead IBM
Transcript
Page 1: ECLIPSE TIPS & TRICKS

SARIKA SINHAEclipse JDT & Platform Co-lead

IBM

ECLIPSE TIPS & TRICKSLAKSHMI P SHANMUGAM

Eclipse Platform Co-leadIBM

Page 2: ECLIPSE TIPS & TRICKS

CODING

OVERVIEW

DARK THEME

NAVIGATION

CONFIGURATION

SEARCH

DEBUGGING

Page 3: ECLIPSE TIPS & TRICKS

DARK THEME

Page 4: ECLIPSE TIPS & TRICKS

DARK THEME

❏ CSS based Dark theme❏ Major improvements in recent releases❏ Native look

Page 5: ECLIPSE TIPS & TRICKS

WINDOWS DARK THEME

Menu DarkScrollbars

Page 6: ECLIPSE TIPS & TRICKS

MAC & LINUX

❏ Eclipse by default automatically launches in dark theme if the system is in dark mode

Page 7: ECLIPSE TIPS & TRICKS

Welcome Page Help

Page 8: ECLIPSE TIPS & TRICKS

Command - Cmd (⌘)vs

Control - Ctrl (^)

Page 9: ECLIPSE TIPS & TRICKS

Quickly find anything in Eclipse

Find Actions(Cmd + 3)

Page 10: ECLIPSE TIPS & TRICKS

CONFIGURATION

Page 11: ECLIPSE TIPS & TRICKS

CONFIGURATION

❏ Show key bindings for command (from Keys preferences or toggle using Find actions)

❏ Configure Window title (from Workspace preferences)❏ Adjust view font size (from Colors & Font preferences)❏ Zoom in/out text editors (Cmd ++/--)❏ Maximize active editor/view (Ctrl + M)❏ Show problem marker in editor (using Text editor

preferences)

Page 12: ECLIPSE TIPS & TRICKS

NAVIGATION

Page 13: ECLIPSE TIPS & TRICKS

NAVIGATION

❏ Quickly switch editors (Cmd + E)❏ Show in System Explorer (from Find actions)❏ Show exit points of a method (place cursor on return type

or exit statement)❏ Mark occurrences (Cmd + . )❏ Multiple last edit location (Ctrl + Alt + → , Ctrl + Alt + ←)❏ Code minings (enable in preferences or toggle from Find

actions)❏ Minimap❏ Hover (Cmd + Shift + Hover, Shift + Hover, Cmd + Hover)

Page 14: ECLIPSE TIPS & TRICKS

SEARCH

Page 15: ECLIPSE TIPS & TRICKS

SEARCH

❏ Quick search (Alt + Shift + Cmd + L)❏ Incremental search (Cmd + J)❏ Java Search dialog❏ Find references (Cmd + Shift + G)❏ Include plugins from target platform in Java search

Page 16: ECLIPSE TIPS & TRICKS

TROUBLESHOOTING

Page 17: ECLIPSE TIPS & TRICKS

TROUBLESHOOTING

● Plug-in Spy (Alt + Shift + F1)

● Plug-in menu spy (Alt + Shift + F2)

● Layout spy (using Find actions)

● API Tooling: Hover over version error to see breaking

change

Page 18: ECLIPSE TIPS & TRICKS

CODING

Page 19: ECLIPSE TIPS & TRICKS

CODING● Typing

○ Block selection (Alt + Cmd + A)○ Quickly move line (Alt + ↑ / ↓ )○ Quickly duplicate line (Alt + Cmd + ↑ / ↓ )○ Word completion (Ctrl + . on Mac ) ( Alt + / on Win & Linux)

● Templates○ View/create templates (Templates View/ Preferences page)○ Switch expression templates (type switch followed by Ctrl + Space)

● Content assist○ Autoactivation (.)○ Insert/replace using content assist (With/without Ctrl)○ Camel case & substring match (By default)○ Subword & subtype completion (Setting in Preferences page)○ Postfix completion (. after statement)○ Non-blocking java completion (By default)

Page 20: ECLIPSE TIPS & TRICKS

CODING

❏ Type Filters❏ Pattern matching for instanceof ❏ Text block creation❏ Cleanup

❏ Simplify functional interface instances ( Setting in Cleanup profile )

❏ Quick fixes❏ Surround with "try-with-resources" block❏ Quick fixes for module-info Javadoc ( Setting in Javadoc error level )

Page 21: ECLIPSE TIPS & TRICKS

DEBUGGING

Page 22: ECLIPSE TIPS & TRICKS

DEBUGGING

❏ Helpful NPE (Java 14)❏ Suspension on recurrence of exception❏ History for expressions in the Variables view❏ Detail formatter/ Logical Structures❏ Console output enhancements❏ Lambda evaluation improvements❏ Trigger point ( Set in Breakpoint properties)

❏ Tracepoint ( Run-> Toggle Tracepoint)

Page 23: ECLIPSE TIPS & TRICKS

DEBUGGING

❏ Toggle method breakpoints from outline view❏ Organising breakpoints by working set❏ Show command line in launch configuration❏ Launch Configuration Template❏ Remote debugging launch configuration

❏ java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999, server=y,suspend=n

Page 24: ECLIPSE TIPS & TRICKS

SMART DEBUGGING COMMANDS

Page 25: ECLIPSE TIPS & TRICKS

Show active key bindings in Eclipse

Cmd + Shift + L

Modify the active key bindings in Keys preferences

Cmd + Shift + L (Press Twice)

Page 26: ECLIPSE TIPS & TRICKS

DOCUMENTATION

● Eclipse > Help > Tips & Tricks

● Eclipse > Help > Welcome > What’s new

● https://www.eclipse.org/eclipse/news/● Sleak - https://www.eclipse.org/swt/tools.php

Page 27: ECLIPSE TIPS & TRICKS

THANK YOU!

Page 28: ECLIPSE TIPS & TRICKS

EVALUATE THE SESSIONS

Sign in and vote at Eclipsecon.org:

-1 0 +1


Recommended