Post on 29-Apr-2022
transcript
SARIKA SINHAEclipse JDT & Platform Co-lead
IBM
ECLIPSE TIPS & TRICKSLAKSHMI P SHANMUGAM
Eclipse Platform Co-leadIBM
CODING
OVERVIEW
DARK THEME
NAVIGATION
CONFIGURATION
SEARCH
DEBUGGING
DARK THEME
DARK THEME
❏ CSS based Dark theme❏ Major improvements in recent releases❏ Native look
WINDOWS DARK THEME
Menu DarkScrollbars
MAC & LINUX
❏ Eclipse by default automatically launches in dark theme if the system is in dark mode
Welcome Page Help
Command - Cmd (⌘)vs
Control - Ctrl (^)
Quickly find anything in Eclipse
Find Actions(Cmd + 3)
CONFIGURATION
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)
NAVIGATION
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)
SEARCH
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
TROUBLESHOOTING
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
CODING
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)
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 )
DEBUGGING
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)
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
SMART DEBUGGING COMMANDS
Show active key bindings in Eclipse
Cmd + Shift + L
Modify the active key bindings in Keys preferences
Cmd + Shift + L (Press Twice)
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
THANK YOU!