\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Oliver Paulus (oli.p)} \pdfinfo{ /Title (eclipse.pdf) /Creator (Cheatography) /Author (Oliver Paulus (oli.p)) /Subject (Eclipse Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{569054} \definecolor{LightBackground}{HTML}{F4F8F4} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Eclipse Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Oliver Paulus (oli.p)} via \textcolor{DarkBackground}{\uline{cheatography.com/19982/cs/2862/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Oliver Paulus (oli.p) \\ \uline{cheatography.com/oli-p} \\ \uline{\seqsplit{www}.code-project.org} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 27th December, 2014.\\ Updated 25th January, 2017.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{x{2.32 cm} x{5.68 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Core}} \tn % Row 0 \SetRowColor{LightBackground} Ctrl+1 & Quickfix \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Ctrl+3 & Open "Quick Access" search \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Ctrl+␣ & Content Assist \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{Alt+⇧Shift+Z} & Surround with (do, for, if, try, ..) \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} Ctrl+Z & Undo \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+Z} & Redo \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.52 cm} x{2.584 cm} x{3.496 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Testing}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+X}, T & execute Tests & \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Ctrl+R & execute Tests & \{\{link="http://moreunit.sourceforge.net"\}\}moreUnit\{\{/link\}\} \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} Ctrl+J & jump to test or \seqsplit{implementation} & \{\{link="http://moreunit.sourceforge.net"\}\}moreUnit\{\{/link\}\} \tn % Row Count 11 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.48 cm} x{5.52 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Comment}} \tn % Row 0 \SetRowColor{LightBackground} Ctrl+/ & Comment / uncomment line or selection (adds '//') \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+7} & Add Block Comment around selection (adds '/... */') \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Ctrl+⇧Shift+{\ss} & Remove Block Comment \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{Alt+⇧Shift+J} & Add Element Comment (adds '/** ... */' \{\{link="http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html"\}\}JavaDoc\{\{/link\}\}) \tn % Row Count 12 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.28 cm} x{4.72 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Text Editing}} \tn % Row 0 \SetRowColor{LightBackground} Ctrl+⇧Shift+Y\{\{nobreak\}\} & lowercase selected text \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Ctrl+⇧Shift+X & uppercase selected text \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} Ctrl+D & Delete line \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} Ctrl+⇧Shift+Del\{\{nobreak\}\} & Delete until end of line \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} Ctrl+Del & Delete next element \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} Ctrl+⌫ & Delete previous element \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} \seqsplit{Ctrl+Alt+↓/↑} & Copy line below/above \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} Alt+/ & Propose word completion - after typing at least one letter. Repeatedly press until reaching correct name \tn % Row Count 14 (+ 5) % Row 8 \SetRowColor{LightBackground} Alt+⇧Shift+A & Column (block) selection, Multiline block editing \tn % Row Count 17 (+ 3) % Row 9 \SetRowColor{white} ⇧Shift+Enter & Adds a blank line below the current line \tn % Row Count 19 (+ 2) % Row 10 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+Enter} & Adds a blank line above the current line \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Generate}} \tn % Row 0 \SetRowColor{LightBackground} Alt+⇧Shift+S, R & Generate Getters and Setters \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Movement}} \tn % Row 0 \SetRowColor{LightBackground} Alt+↑/↓ & Move current line or selection up or down \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Ctrl+←/→ & Jump one word to the left / right \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Ctrl+⇧Shift+↑/↓\{\{nobreak\}\} & Jump to previous / next method \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Ctrl+L & Jump to Line Number. To hide/show line numbers, press Ctrl+F10 and select 'Show Line Numbers' \tn % Row Count 12 (+ 5) % Row 4 \SetRowColor{LightBackground} Ctrl+Q & Jump to last location edited \tn % Row Count 14 (+ 2) % Row 5 \SetRowColor{white} Ctrl+./, & Jump to next / previous warning or error \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} Ctrl+↑ & Scroll up \tn % Row Count 17 (+ 1) % Row 7 \SetRowColor{white} Ctrl+↓ & Scroll down \tn % Row Count 18 (+ 1) % Row 8 \SetRowColor{LightBackground} Ctrl+⇧Shift+P & Go to the matching bracket \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} \seqsplit{Alt+⇧Shift+↑/↓} & Select the previous / next syntactical element \tn % Row Count 23 (+ 3) % Row 10 \SetRowColor{LightBackground} Alt+⇧Shift+↑/↓/←/→\{\{nobreak\}\} & Extending / reducing the selection of the previous / next syntactical element \tn % Row Count 27 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{{\bf{Tip:}} \{\{link="http://help.eclipse.org/luna/index.jsp?topic=\%2Forg.eclipse.platform.doc.user\%2FgettingStarted\%2Fqs-37-3c.htm"\}\}Use bookmarks\{\{/link\}\}. Add them on left margin of the code view (where you set the breakpoints) with "right click → Add bookmark". Add the Bookmarks-View (Window → Show View → Bookmarks).} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.32 cm} x{5.68 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Selection}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+↑} & Expand selection to current element \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Alt+⇧Shift+↓} & Reduce previously expanded selection by one step \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.812 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Search / Information}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+T} & Open Type & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+H} & Open Type In Hierarchy & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+R} & Open Resource & \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Ctrl+O & Show Outline {\bf{(second press shows the inherited members)}} & \tn % Row Count 11 (+ 5) % Row 4 \SetRowColor{LightBackground} F2 & Open class, method or variable information (tooltip text) & \tn % Row Count 16 (+ 5) % Row 5 \SetRowColor{white} F3 & Open Declaration: Jump to Declaration of selected class, method or parameter & \tn % Row Count 22 (+ 6) % Row 6 \SetRowColor{LightBackground} F4 & Open Type Hierarchy window for selected item & \tn % Row Count 26 (+ 4) % Row 7 \SetRowColor{white} Ctrl+T & Show Quick Type Hierarchy {\bf{(toggles between supertypes and subtypes when pressed again)}} & \tn % Row Count 33 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.812 cm} x{2.888 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Search / Information (cont)}} \tn % Row 8 \SetRowColor{LightBackground} Ctrl+U & Find occurrences of expression in current file & \tn % Row Count 4 (+ 4) % Row 9 \SetRowColor{white} \seqsplit{Ctrl+mouse} over method & Open Declaration or \seqsplit{Implementation} & \tn % Row Count 7 (+ 3) % Row 10 \SetRowColor{LightBackground} Ctrl+⇧Shift+L\{\{nobreak\}\} & List of shortcuts (depending on the context) & \tn % Row Count 11 (+ 4) % Row 11 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+␣} & Method Parameter Hints & cursor is located at the parameter specification for method reference \tn % Row Count 16 (+ 5) % Row 12 \SetRowColor{LightBackground} Ctrl+⇧Shift+G\{\{nobreak\}\} & Search workspace for references to selected method or variable & \tn % Row Count 21 (+ 5) % Row 13 \SetRowColor{white} Ctrl+G & Search workspace for declarations of to the item under the cursor & \tn % Row Count 26 (+ 5) % Row 14 \SetRowColor{LightBackground} Ctrl+F & Quick search & \tn % Row Count 27 (+ 1) % Row 15 \SetRowColor{white} Alt+↵ & Show properties (in Package or Project Explorer) & \tn % Row Count 31 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Cleanup}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+O} & Organize Imports \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+F} & Format Source \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Ctrl+I & Intend selected source \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+M} & Add Import / also static imports \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.08 cm} x{5.92 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Refactoring}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+R} & Rename Element \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Ctrl+2, R & Rename locally (in file), faster than Alt+⇧Shift+R \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+L} & Extract to local variable \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{Alt+⇧Shift+M} & Extract to method \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+T} & Opens the context-sensitive refactoring menu \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{Alt+⇧Shift+R} & Rename \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+V} & Move \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{Alt+⇧Shift+C} & Change Method Signature \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+M} & Extract Method \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \seqsplit{Alt+⇧Shift+L} & Extract Local Variable \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} \seqsplit{Alt+⇧Shift+I} & Inline \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.736 cm} x{2.66 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Editor Window}} \tn % Row 0 \SetRowColor{LightBackground} F12 & Jump to Editor Window & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{Ctrl+PgDn/PgUp} & Next / previous Editor - in the {\bf{order of their tabs}} in the editor area & \tn % Row Count 8 (+ 6) % Row 2 \SetRowColor{LightBackground} Ctrl+M & Maximize or un-maximize current Editor Window & \tn % Row Count 12 (+ 4) % Row 3 \SetRowColor{white} Ctrl+E & Show list of open Editors. Use arrow keys and enter to switch & \tn % Row Count 17 (+ 5) % Row 4 \SetRowColor{LightBackground} \seqsplit{Alt+←/→} & Backward / Forward editor navigation history & \tn % Row Count 21 (+ 4) % Row 5 \SetRowColor{white} Alt+- & Open Editor Window Option menu & \tn % Row Count 24 (+ 3) % Row 6 \SetRowColor{LightBackground} Ctrl+F6 & Next Editor - if released it immediately, Eclipse will take you to the {\bf{last active editor}} & \tn % Row Count 31 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.736 cm} x{2.66 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Editor Window (cont)}} \tn % Row 7 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+F6} & Previous Editor & \tn % Row Count 2 (+ 2) % Row 8 \SetRowColor{white} Ctrl+E & Quick Switch Editor & \tn % Row Count 4 (+ 2) % Row 9 \SetRowColor{LightBackground} Alt+F7 & \{\{link="https://eclipseone.files.wordpress.com/2010/05/multipage-editor-example.jpg"\}\}Multipage editor\{\{/link\}\} - next Page & \tn % Row Count 13 (+ 9) % Row 10 \SetRowColor{white} \seqsplit{Alt+⇧Shift+F7} & \{\{link="https://eclipseone.files.wordpress.com/2010/05/multipage-editor-example.jpg"\}\}Multipage editor\{\{/link\}\} - previous Page & \tn % Row Count 23 (+ 10) % Row 11 \SetRowColor{LightBackground} Ctrl+- & {\bf{Toogle Split Editor}} (Horizontal) - since Luna & {\bf{old:}} Ctrl+\_ \tn % Row Count 27 (+ 4) % Row 12 \SetRowColor{white} Ctrl+\textless{} & {\bf{Toogle Split Editor}} (Vertical) - since Luna & {\bf{old:}} Ctrl+\{ \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.204 cm} x{2.736 cm} x{2.66 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Editor Window (cont)}} \tn % Row 13 \SetRowColor{LightBackground} \seqsplit{Ctrl+⇧Shift+"Num} Keypad /" & Collapse all code blocks & \tn % Row Count 3 (+ 3) % Row 14 \SetRowColor{white} \seqsplit{Ctrl+⇧Shift+"Num} Keypad *" & Open all code blocks & \tn % Row Count 6 (+ 3) % Row 15 \SetRowColor{LightBackground} ⇧Shift (and hover over element) & Show source (in tooltip) & settings: Window → Preferences → Java → Editor → Hovers \tn % Row Count 11 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.92 cm} x{4.08 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Outline View}} \tn % Row 0 \SetRowColor{LightBackground} Reorder class members with Drag \& Drop & Disable "Sort Order" - otherwise not possible \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & Automatic reordering: Select the class, Source → Sort Members \tn % Row Count 7 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{p{1.44 cm} x{6.56 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Package / Project Explorer}} \tn % Row 0 \SetRowColor{LightBackground} Alt+F5 & Maven → Update Project... \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Problems View}} \tn % Row 0 \SetRowColor{LightBackground} Configure to view only warnings and errors associated with a particular resource or group of resources & \{\{link="http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.user/concepts/cprbview.htm"\}\}Problems View - Configure Contents\{\{/link\}\} e.g. select "on any element in same project" to restrict to current selected project \tn % Row Count 12 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.584 cm} x{3.116 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Templates (Java → Editor → Templates)}} \tn % Row 0 \SetRowColor{LightBackground} test & Created test method & \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} for & Creates for loop & \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} new & Creates new instance & \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} try & Creates try..catch & \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} sysout, syserr, systrace & Creates \seqsplit{System.out...} & \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} strf\{\{bt\}\} & Format string\{\{bt\}\} & \{\{bt\}\}\{\{link="http://fahdshariff.blogspot.de/2011/08/useful-eclipse-templates-for-faster.html?m=1"\}\}here\{\{/link\}\} \tn % Row Count 19 (+ 8) % Row 6 \SetRowColor{LightBackground} if & if null/if not null & \tn % Row Count 21 (+ 2) % Row 7 \SetRowColor{white} for & iterate over {\bf{map}} & \tn % Row Count 23 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{static\_final} & static final field & \tn % Row Count 25 (+ 2) % Row 9 \SetRowColor{white} before & {\bf{junit}} before method & \tn % Row Count 27 (+ 2) % Row 10 \SetRowColor{LightBackground} after & {\bf{junit}} after method & \tn % Row Count 29 (+ 2) % Row 11 \SetRowColor{white} \seqsplit{beforeclass} & {\bf{junit}} beforeclass method & \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.9 cm} x{2.584 cm} x{3.116 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Templates (Java → Editor → Templates) (cont)}} \tn % Row 12 \SetRowColor{LightBackground} afterclass\{\{bb\}\} & {\bf{junit}} afterclass method\{\{bb\}\} & \tn % Row Count 3 (+ 3) % Row 13 \SetRowColor{white} quote & surround selection with quotes & \{\{link="http://stackoverflow.com/questions/5622609/eclipse-surround-with-quotes-and-other-blocks"\}\}here\{\{/link\}\} \tn % Row Count 10 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{{\bf{Tip:}} It is possible to select text and use completion (Ctrl+␣) including typing of template name} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Changed Eclipse Keybindings}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Windows → Preferences → General → Keys}} \newline % Row Count 1 (+ 1) Required modifications due to the german QWERTZ keyboard layout: \newline % Row Count 3 (+ 2) 1. Add Block Comment - {\bf{new:}} Ctrl+⇧Shift+7, {\bf{old:}} Ctrl+⇧Shift+/ \newline % Row Count 5 (+ 2) 2. Remove Block Comment - {\bf{new:}} Ctrl+⇧Shift+{\ss}, {\bf{old:}} Ctrl+⇧Shift+\textbackslash{} \newline % Row Count 7 (+ 2) 3. Toogle Split Editor (Horizontal) - {\bf{new:}} Ctrl+⇧Shift+-, {\bf{old:}} Ctrl+\_ \newline % Row Count 9 (+ 2) 4. Toogle Split Editor (Vertical) - {\bf{new:}} Ctrl+⇧Shift+\textless{}, {\bf{old:}} Ctrl+\{ \newline % Row Count 11 (+ 2) {\bf{Update 12/2016:}} had to add ⇧Shift to 3. and 4. because of new \{\{link="https://www.eclipse.org/eclipse/news/4.6/platform.php\#text-zoom-commands"\}\}Eclipse Neon Zoom functionality\{\{/link\}\} with Ctrl+-% Row Count 16 (+ 5) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Project Specific Configuration}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{1. Import project {\bf{Java formatter configuration}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{2. Download {\bf{Checkstyle configuration}} file from sonar server and reference the config file as a file resource url} \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{3. Download {\bf{Findbugs configuration}} file from sonar server and add the config file under "include filter files"} \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{4. Download {\bf{PMD configuration}} file from sonar server and first "clear all" existing rules and then import the config file} \tn % Row Count 10 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Plugins}} \tn % Row 0 \SetRowColor{LightBackground} Testing Support & \{\{link="http://moreunit.sourceforge.net"\}\}moreUnit\{\{/link\}\} & \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} & \{\{link="http://infinitest.github.io"\}\}Infinitest\{\{/link\}\} & \tn % Row Count 10 (+ 5) % Row 2 \SetRowColor{LightBackground} Test Coverage & \{\{link="http://www.eclemma.org"\}\}EclEmma\{\{/link\}\} & \tn % Row Count 14 (+ 4) % Row 3 \SetRowColor{white} Source Code Analyzer & \{\{link="http://findbugs.sourceforge.net/manual/eclipse.html"\}\}FindBugs\{\{/link\}\} & \tn % Row Count 21 (+ 7) % Row 4 \SetRowColor{LightBackground} & \{\{link="http://eclipse-cs.sourceforge.net"\}\}Checkstyle\{\{/link\}\} & \tn % Row Count 26 (+ 5) % Row 5 \SetRowColor{white} & \{\{link="http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site"\}\}PMD\{\{/link\}\} & \{\{link="http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site"\}\}Update-Site\{\{/link\}\} \tn % Row Count 34 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Plugins (cont)}} \tn % Row 6 \SetRowColor{LightBackground} & \{\{link="https://code.google.com/p/projectusus"\}\}Usus\{\{/link\}\} & \tn % Row Count 5 (+ 5) % Row 7 \SetRowColor{white} & \{\{fa-bolt\}\} \{\{link="http://docs.sonarqube.org/plugins/servlet/mobile\#content/view/6952032"\}\}SonarCube\{\{/link\}\} or \{\{link="http://www.sonarlint.org/eclipse/index.html"\}\}SonarLint\{\{/link\}\} & \{\{link="http://stackoverflow.com/questions/10971968/turning-sonar-off-for-certain-code"\}\}Ignore certain warnings\{\{/link\}\} with //NOSONAR or \seqsplit{@SuppressWarnings("squid:S00112")} \tn % Row Count 20 (+ 15) % Row 8 \SetRowColor{LightBackground} Refactoring & \{\{link="http://jdeodorant.com/"\}\}JDeodorant\{\{/link\}\} & \tn % Row Count 24 (+ 4) % Row 9 \SetRowColor{white} Subversion Eclipse Team Provider Plugin & \{\{link="http://subclipse.tigris.org"\}\}Subclipse\{\{/link\}\} & \tn % Row Count 29 (+ 5) % Row 10 \SetRowColor{LightBackground} & use Subclipse instead of Subversive because it is {\bf{much faster}} & \tn % Row Count 34 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Plugins (cont)}} \tn % Row 11 \SetRowColor{LightBackground} & use \{\{link="http://subclipse.tigris.org/wiki/JavaHL\#head-bb1dd50f9ec2f0d8c32246430c00e237d27a04fe"\}\}JavaHL native/JNI provider\{\{/link\}\} & \tn % Row Count 11 (+ 11) % Row 12 \SetRowColor{white} Task based working & \{\{link="http://eclipse.org/mylyn/"\}\}Mylyn\{\{/link\}\} & \tn % Row Count 15 (+ 4) % Row 13 \SetRowColor{LightBackground} & Nice: \{\{link="https://wiki.eclipse.org/Mylyn/User\_Guide\#Task-focused\_Change\_Sets"\}\}Task-focused Change Sets\{\{/link\}\} & \tn % Row Count 24 (+ 9) % Row 14 \SetRowColor{white} & \{\{link="http://marketplace.eclipse.org/content/subclipse"\}\}Subclipse includes an optional Mylyn connector\{\{/link\}\} & \tn % Row Count 33 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Plugins (cont)}} \tn % Row 15 \SetRowColor{LightBackground} \{\{link="http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html"\}\}JavaDoc\{\{/link\}\} & \{\{link="http://jautodoc.sourceforge.net"\}\}JAutoDoc\{\{/link\}\} & \tn % Row Count 8 (+ 8) % Row 16 \SetRowColor{white} Maven integration & \{\{link="http://www.eclipse.org/m2e/index.html"\}\}M2Eclipse (m2e)\{\{/link\}\} & \tn % Row Count 14 (+ 6) % Row 17 \SetRowColor{LightBackground} & add needed m2e connectors. follow pom.xml \seqsplit{hints/problems}. e.g: & m2e project \seqsplit{configurators} for Eclipse WTP \tn % Row Count 19 (+ 5) % Row 18 \SetRowColor{white} & & m2e connector for \seqsplit{build-helper-maven-plugin} \tn % Row Count 23 (+ 4) % Row 19 \SetRowColor{LightBackground} & & m2e connector for the Eclipse JDT Compiler \tn % Row Count 27 (+ 4) % Row 20 \SetRowColor{white} & & m2e connector for the Maven Dependency Plugin \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Plugins (cont)}} \tn % Row 21 \SetRowColor{LightBackground} & & \seqsplit{Groovy-Eclipse} m2e integration \tn % Row Count 3 (+ 3) % Row 22 \SetRowColor{white} Decompiler & \{\{link="https://marketplace.eclipse.org/content/eclipse-class-decompiler"\}\}Eclipse Class Decompiler\{\{/link\}\} & \tn % Row Count 12 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{XUbuntu specific Configuration Changes}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{Delete following keybindings in {\bf{XFCE Settings → Window Manager → Keyboard}}: \newline % Row Count 2 (+ 2) 1. Ctrl+Alt+↓/↑ \newline % Row Count 3 (+ 1) 2. Ctrl+F6 \newline % Row Count 4 (+ 1) 3. Alt+F5 \newline % Row Count 5 (+ 1) \{\{nl\}\} \newline % Row Count 6 (+ 1) If running {\bf{IBus-Applet}} delete keybinding definition for "Ctrl+Space" (Content Assist) in IBus-Settings \newline % Row Count 9 (+ 3) \{\{nl\}\} \newline % Row Count 10 (+ 1) Use {\bf{gnome-color-chooser}} and change options: \newline % Row Count 11 (+ 1) 1. {\bf{This only works for Eclipse \textless{} 4.5, because Eclipse Mars 4.5 and higher uses GTK3 by default (gtkrc-2.0 settings will not be used).}} \{\{link="http://stackoverflow.com/questions/31081589/eclipse-java-ee-ide-for-web-developers-tooltip-color"\}\}You can force Eclipse 4.5 and higher to use GTK2\{\{/link\}\} with the following export or \{\{link="http://askubuntu.com/questions/718547/gtk3-and-gtk2-tooltip-background-color-difference"\}\}change GTK3 theme options\{\{/link\}\}: export SWT\_GTK3=0 \newline % Row Count 21 (+ 10) 2. Tooltip colors (background: yellow, foreground: black) \newline % Row Count 23 (+ 2) 3. Global colors → Input field selected (foreground: black) \newline % Row Count 25 (+ 2) \{\{nl\}\} \newline % Row Count 26 (+ 1) Disable "pink/purple highlights" in Xubuntu 14.10 and higher: disable custom hightlight-color in {\bf{gtk-theme-config}}% Row Count 29 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings}} \tn % Row 0 \SetRowColor{LightBackground} show "." files in package explorer & {\bf{"Package Explorer → View Menu → Filters → uncheck .*"}} or "Package Explorer → Customize View… → Filters → uncheck .*" & \tn % Row Count 11 (+ 11) % Row 1 \SetRowColor{white} Package Explorer Option "Link with editor" & Link file to package explorer & \tn % Row Count 15 (+ 4) % Row 2 \SetRowColor{LightBackground} Favorites Imports & Windows → Preferences → Java → Editor → Content Assist → Favorites, New Type... & {\bf{x$^{\textrm{1}}$}} \tn % Row Count 22 (+ 7) % Row 3 \SetRowColor{white} & Add types for Assertion library \{\{link="http://hamcrest.org/"\}\}Hamcrest\{\{/link\}\} and/or \{\{link="http://joel-costigliola.github.io/assertj/"\}\}AssertJ\{\{/link\}\}, \{\{link="http://site.mockito.org/"\}\}Mockito\{\{/link\}\} and JUnit-Assert & \tn % Row Count 40 (+ 18) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 4 \SetRowColor{LightBackground} Show line numbers & Window → Preferences → General → Editors → Text Editors → "Show line numbers" & \tn % Row Count 7 (+ 7) % Row 5 \SetRowColor{white} Show print margin & Window → Preferences → General → Editors → Text Editors → "Show print margin" & \tn % Row Count 14 (+ 7) % Row 6 \SetRowColor{LightBackground} Paste multiline strings & Window → Preferences → Java → Editor → Typing → "Escape text when pasting into a string literal" & \tn % Row Count 23 (+ 9) % Row 7 \SetRowColor{white} \{\{link="http://fahdshariff.blogspot.de/2011/08/useful-eclipse-templates-for-faster.html?m=1"\}\}Import code templates collection\{\{/link\}\} & & {\bf{x$^{\textrm{2}}$}} \tn % Row Count 34 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 8 \SetRowColor{LightBackground} \{\{link="http://stackoverflow.com/questions/5622609/eclipse-surround-with-quotes-and-other-blocks"\}\}Import code template "surround with quotes"\{\{/link\}\} & & {\bf{x$^{\textrm{2}}$}} \tn % Row Count 12 (+ 12) % Row 9 \SetRowColor{white} MoreUnit \seqsplit{Configuration} & Test source folder: \seqsplit{"src/test/java"} & \tn % Row Count 15 (+ 3) % Row 10 \SetRowColor{LightBackground} & Test Type: "Junit4" & \tn % Row Count 17 (+ 2) % Row 11 \SetRowColor{white} & uncheck "Use test-prefix for \seqsplit{test-methods"} & \tn % Row Count 21 (+ 4) % Row 12 \SetRowColor{LightBackground} & Rule for naming test files → Pattern: \$\{srcFile\}(Test|IT|ITCase) & \tn % Row Count 27 (+ 6) % Row 13 \SetRowColor{white} & {\bf{if you have legacy tests with Test prefix:}} Rule for naming test files → Pattern: (Test)\$\{srcFile\}(Test|IT|ITCase) & \tn % Row Count 37 (+ 10) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 14 \SetRowColor{LightBackground} Formatter Options & Window → Preferences → Java → Code Style → Formatter → Off/On Tags {\bf{for \seqsplit{//@formatter:off} and //@formatter:on}} & \{\{link="http://www.eclipseonetips.com/2013/10/15/disable-eclipse-formatting-for-certain-sections-of-code-only/"\}\}here\{\{/link\}\} \tn % Row Count 10 (+ 10) % Row 15 \SetRowColor{white} & Check the {\bf{Never join lines}} preference accessible on the Line Wrapping and the Comments tabs of the Java Formatter preference page & \{\{link="http://help.eclipse.org/luna/index.jsp?topic=\%2Forg.eclipse.jdt.doc.user\%2Freference\%2Fref-java-editor-formatter.htm"\}\}here\{\{/link\}\} \tn % Row Count 21 (+ 11) % Row 16 \SetRowColor{LightBackground} Improve Performance & Window → Preferences → Validation, Disable All & \tn % Row Count 25 (+ 4) % Row 17 \SetRowColor{white} & Add {\bf{-Xverify:none}} to eclipse.ini & tell the VM not to validated all the .class files it is loading \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 18 \SetRowColor{LightBackground} & Window → Preferences →General → Startup and Shutdown & remove plugins not needed \tn % Row Count 5 (+ 5) % Row 19 \SetRowColor{white} & \{\{noshy\}\}increase -Xms and \{\{link="http://docs.oracle.com/cd/E13150\_01/jrockit\_jvm/jrockit/jrdocs/refman/optionX.html\#wp999528"\}\}-Xmx\{\{/link\}\} heap memory options (start and max) in eclipse.ini & \{\{noshy\}\}e.g. -Xms512m -Xmx2048m \tn % Row Count 20 (+ 15) % Row 20 \SetRowColor{LightBackground} & \{\{noshy\}\}increase \seqsplit{-XX:MaxPermSize} option (if java \textless{} 1.8) & \{\{noshy\}\}e.g. \seqsplit{-XX:MaxPermSize=512m} \tn % Row Count 25 (+ 5) % Row 21 \SetRowColor{white} Enable informative Eclipse Compiler Warnings & Window → Preferences → Java → Compiler → \seqsplit{Errors/Warnings} & {\bf{set to Warning and keep sub checkboxes checked (if any)}} \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 22 \SetRowColor{LightBackground} & {\emph{Potential Programming problems}} & Potential resource leak \tn % Row Count 3 (+ 3) % Row 23 \SetRowColor{white} & {\emph{Unnecessary code}} & Value of parameter is not used \tn % Row Count 6 (+ 3) % Row 24 \SetRowColor{LightBackground} & & Unused type parameter \tn % Row Count 8 (+ 2) % Row 25 \SetRowColor{white} & & Unnecessary declaration of thrown exception \tn % Row Count 12 (+ 4) % Row 26 \SetRowColor{LightBackground} & & Unnecessary 'else' statement \tn % Row Count 15 (+ 3) % Row 27 \SetRowColor{white} & & Unnecessary cast of 'instanceof' operation \tn % Row Count 19 (+ 4) % Row 28 \SetRowColor{LightBackground} & {\emph{Generic types}} & Redundant type arguments (1.7 and higher) \tn % Row Count 23 (+ 4) % Row 29 \SetRowColor{white} & {\emph{Annotations}} & Unhandled token in \seqsplit{'@SuppressWarnings'} set to {\bf{"Ignore"}} \tn % Row Count 28 (+ 5) % Row 30 \SetRowColor{LightBackground} & {\emph{Null analysis}} & Redundant null check \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 31 \SetRowColor{LightBackground} \{\{link="http://c2.com/cgi/wiki?TabsVersusSpaces"\}\}Indent using spaces\{\{/link\}\} & Window → Preferences → XML Files → Editor & Select "Indent using spaces" and set "Indentation Size: 4" \tn % Row Count 6 (+ 6) % Row 32 \SetRowColor{white} & Window → Preferences → General → Editors → Text Editors & Set "Displayed tab width: 4" and select "Insert spaces for tabs" \tn % Row Count 11 (+ 5) % Row 33 \SetRowColor{LightBackground} Save Actions & Window → Preferences →Java →Editor → Save Actions & \tn % Row Count 16 (+ 5) % Row 34 \SetRowColor{white} & check "Perform the selected actions on save" & \tn % Row Count 20 (+ 4) % Row 35 \SetRowColor{LightBackground} & check "Format source code", "Format all lines" & \tn % Row Count 24 (+ 4) % Row 36 \SetRowColor{white} & check "Organize imports" & \tn % Row Count 26 (+ 2) % Row 37 \SetRowColor{LightBackground} & check "Additional actions" and {\bf{add the following:}} & \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 38 \SetRowColor{LightBackground} Code Style & • {\emph{"Use blocks in \seqsplit{if/while/for/do} statements"}} & \tn % Row Count 4 (+ 4) % Row 39 \SetRowColor{white} & • {\emph{Use lambda where possible}} & {\bf{if you use Java \textgreater{}= 8}} \tn % Row Count 7 (+ 3) % Row 40 \SetRowColor{LightBackground} Add final modifier to private fields* & • {\emph{Add final modifier to private fields}} & \tn % Row Count 11 (+ 4) % Row 41 \SetRowColor{white} & • {\emph{Add final modifier to local parameter}} & \tn % Row Count 15 (+ 4) % Row 42 \SetRowColor{LightBackground} & • {\emph{Add final modifier to local variables}} & \tn % Row Count 19 (+ 4) % Row 43 \SetRowColor{white} Unused Code & • {\emph{Remove unused imports}} & \tn % Row Count 22 (+ 3) % Row 44 \SetRowColor{LightBackground} & • {\emph{Add missing '@Override' annotations}} & \tn % Row Count 26 (+ 4) % Row 45 \SetRowColor{white} & • {\emph{Add missing '@Override' annotations to \seqsplit{implementations} of interface methods}} & \tn % Row Count 33 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 46 \SetRowColor{LightBackground} & • {\emph{Add missing \seqsplit{'@Deprecated'} annotations}} & \tn % Row Count 4 (+ 4) % Row 47 \SetRowColor{white} & • {\emph{Remove unnecessary casts}} & \tn % Row Count 7 (+ 3) % Row 48 \SetRowColor{LightBackground} & \{\{noshy\}\}• {\emph{Remove unnecessary \seqsplit{'\$NON-NLS\$'} tags}} & \tn % Row Count 11 (+ 4) % Row 49 \SetRowColor{white} Limit maximum number of open editors & Window → Preferences → General → Editors & \tn % Row Count 15 (+ 4) % Row 50 \SetRowColor{LightBackground} & check "Close editors \seqsplit{automatically"} & \tn % Row Count 18 (+ 3) % Row 51 \SetRowColor{white} & choose value (e.g. 20) for "Number of opened editors before closing" & \tn % Row Count 24 (+ 6) % Row 52 \SetRowColor{LightBackground} \{\{link="https://wiki.eclipse.org/JDT\_Core/Null\_Analysis"\}\}JDT Core/Null Analysis\{\{/link\}\} to avoid \{\{link="https://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html"\}\}NPEs\{\{/link\}\} & Window → Preferences → Java → Compiler → \seqsplit{Errors/Warnings}, Section {\emph{Null analysis}} & if you use Java \textless{} 8 (cannot use \{\{link="https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html"\}\}Optional\{\{/link\}\}) and cannot use \{\{link="https://code.google.com/p/guava-libraries/wiki/UsingAndAvoidingNullExplained"\}\}Guava Optional\{\{/link\}\} e.g. for legacy projects \tn % Row Count 46 (+ 22) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 53 \SetRowColor{LightBackground} & \{\{noshy\}\}check "Enable \seqsplit{annotation-based} null analysis" & \{\{noshy\}\}you can use the \{\{link="http://help.eclipse.org/juno/index.jsp?topic=\%2Forg.eclipse.jdt.doc.isv\%2Freference\%2Fapi\%2Forg\%2Feclipse\%2Fjdt\%2Fannotation\%2Fpackage-summary.html"\}\}Eclipse annotations\{\{/link\}\}, the \{\{link="https://jcp.org/en/jsr/detail?id=305"\}\}JSR-305 annotations (old)\{\{/link\}\}, custom ones or the \{\{link="http://types.cs.washington.edu/jsr308/"\}\}JSR-308 annotations from Checker Framework\{\{/link\}\} \tn % Row Count 33 (+ 33) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.584 cm} x{2.508 cm} x{2.508 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Settings (cont)}} \tn % Row 54 \SetRowColor{LightBackground} Maven & Window → Preferences → Maven → User Interface & \tn % Row Count 4 (+ 4) % Row 55 \SetRowColor{white} & check "Open XML page in the POM editor by default" & {\bf{Reason:}} show pom.xml source code is faster than loading the "Overview" tab all the time \tn % Row Count 11 (+ 7) % Row 56 \SetRowColor{LightBackground} JUnit & Window → Preferences → Java → JUnit enable "Add 'ea' to VM arguments when creating new JUnit launch \seqsplit{configuration"} & enable JVM \{\{link="http://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html"\}\}assertions\{\{/link\}\} by default \tn % Row Count 21 (+ 10) % Row 57 \SetRowColor{white} Show heap memory status & Window → Preferences → General & enable "Show heap status" \tn % Row Count 24 (+ 3) % Row 58 \SetRowColor{LightBackground} Enable \{\{link="https://dzone.com/articles/eclipse-local-history-quick"\}\}"Quick Diff"\{\{/link\}\} & Window → Preferences → General → Editors → Text Editors → Quick Diff & enable checkboxes and select correct reference source option \tn % Row Count 32 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{8.4cm}}{{\bf{x$^{\textrm{1}}$:}} \{\{noshy\}\}TDD-Style mockito: \{\{link="http://site.mockito.org/mockito/docs/current/org/mockito/Mockito.html"\}\}org.mockito.Mockito\{\{/link\}\}, BDD-Style mockito: \{\{link="http://site.mockito.org/mockito/docs/current/org/mockito/BDDMockito.html"\}\}org.mockito.BDDMockito\{\{/link\}\}, org.junit.Assert, org.hamcrest.Matchers, \seqsplit{org.assertj.core.api.Assertions} \newline {\bf{x$^{\textrm{2}}$:}} Java → Editor → Templates} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.42 cm} x{3.344 cm} x{0.836 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{General}} \tn % Row 0 \SetRowColor{LightBackground} Refresh {\bf{all}} Projects (with some closed in between) & In {\bf{Package Explorer}} & \seqsplit{Ctrl+A}, F5 \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Use \{\{link="http://www.vogella.com/tutorials/Eclipse/article.html\#workorganization\_overview"\}\}Working Sets\{\{/link\}\} for better performance & Package Explorer → open the drop-down menu → Select Working Set & \tn % Row Count 11 (+ 8) % Row 2 \SetRowColor{LightBackground} & If Ctrl+⇧Shift+R and Ctrl+⇧Shift+T does not reflect active Working Set check the small arrow on the top right of the dialogue to select Working Set & \tn % Row Count 21 (+ 10) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{1.672 cm} x{2.964 cm} x{2.964 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Troubleshooting Projects}} \tn % Row 0 \SetRowColor{LightBackground} Maven \seqsplit{dependency} issues & {\bf{try without eclipse project resolution}} & {[}Project{]} → Properties → Maven \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & & uncheck "Resolve dependencies from Workspace projects" to check with jars from local `\textasciitilde{}/.m2` repository instead of eclipse projects within \seqsplit{workspace/workingset} \tn % Row Count 14 (+ 11) % Row 2 \SetRowColor{LightBackground} & {\bf{clean projects}} & don't mix usage of maven \{\{link="http://en.wikipedia.org/wiki/Command-line\_interface"\}\}CLI\{\{/link\}\} and \{\{link="http://eclipse.org/m2e/"\}\}m2e eclipse plugin\{\{/link\}\} \tn % Row Count 25 (+ 11) % Row 3 \SetRowColor{white} & & if mixed - make a `mvn eclipse:clean` (CLI) and import again in eclipse \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{1.672 cm} x{2.964 cm} x{2.964 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Troubleshooting Projects (cont)}} \tn % Row 4 \SetRowColor{LightBackground} & {\bf{Error message `The archive: \textless{}path\_to\_jar\_file\textgreater{} which is referenced by the classpath, does not exist.`}} & find project with `.classpath` file where old/wrong jar is referenced \tn % Row Count 7 (+ 7) % Row 5 \SetRowColor{white} & & make a `mvn eclipse:clean` (CLI) and import again in eclipse \tn % Row Count 11 (+ 4) % Row 6 \SetRowColor{LightBackground} & & you can use this command to search for the projects referencing old jar: `find -name '.classpath' -exec grep -Hin \seqsplit{'example-1.2.3.jar'} \{\} \textbackslash{};` \tn % Row Count 21 (+ 10) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}