Most
of us want to use IntelliJ Idea, But due to some reasons like
Pricing, Licensing, etc.., We can't able to use IntelliJ Idea. I have
sufficient working experience in both Eclipse and IntelliJ.
Everyone is using Eclipse as primary IDE because its Free, Open
Source, Easy for novice, Capability to work on most of the common
frameworks by adding some plugins etc.., Here I have shared how did I
changed my Eclipse more like IntelliJ.
Project/Package Explorer:
Project
explorer image of IntelliJ Project
explorer image of Eclipse/STS
I'll
prefer to use Project Explorer over Package Explorer in Eclipse/STS.
Both are mostly same except some changes, But the following changes
can be applied to both Explorer.
Package Presentation:
Eclipse/STS
is defaulted the display package as Flat. But IntelliJ uses
Hierarchical.
Three dots in Project/Package Explorer -> Package Presentation -> click Hierarchical.
Hiding Folders and Files:
To Hide some files and some folders in Package/Project Explorer, Click Filter Icon and Check the options whatever you need to hide.My personal preference: Check these following options
- Empty library containers
- Empty parent packages
- Chromium Virtual File System
- Java output folders
- Inner class files
- Import declarations
- Synthetic members
Label/Indicator/Symbol:
In
Eclipse, Project/Package Explorer is flooded with lot of Labels in
both file and folder icons. To remove those labels:
Window -> Preferences -> Java -> Appearance -> Label Decorations -> Uncheck the options whatever you need to hide.
My personal preference: Uncheck all options.
NOTE: Errors and Warnings will continue to display (if any) in Project/Package Explorer despite of this change.
Hide Members of File:
One
thing that annoying most in Eclipse is showing members in files when
i tried to open it.
IntelliJ
used to show only class files only that file contains more than one
class. To remove class extension showing in Project/Package explorer
Window -> Preferences -> Java -> Appearance -> Uncheck "Show members in Package Explorer" checkbox
NOTE: May require restart to work.
Theme:
In
IntelliJ, the whole UI is like fixed, boxed. There is no option to do
the same in Eclipse. But we can make similar in Eclipse.
Window -> Preferences -> Java -> Appearance -> Theme Dropdown -> Choose Classic or Window Classic
NOTE: May require restarting the Eclipse to apply theme.
Autosaving:
When
you are using IntelliJ, you don't need to save any files. IntelliJ
will save all files simultaneously while you are typing. Eclipse
added this feature autosaving features in latest edition.
Window -> Editors -> Autosave -> Enable autosave for dirty editors
Set
time interval to save files automatically in "Dirty editors
autosave interval (in seconds)" field.
My personal preference: 5 seconds.
NOTE: Small value could lead to performance issues.
Auto Popup While Typing:
IntelliJ
defaulted to display related details like variables, templates, etc.,
when you started to typing. In Eclipse, "." ("dot")
is defaulted to trigger the content assitant. To change that
Window -> Java -> Editor -> Click Content Assist -> Auto Activation -> Enable auto activation
Change
the "Auto activation trigger for Java" as
".abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ".
The value is nothing but alphabets with dot and Underscore.
Set time delay for popup in "Auto activation delay (ms)" field.
My personal preference: 40.
NOTE:
Small value could lead to performance issues.
Change
List/ Quick Diff/ Version Control:
IntelliJ have 'Change List' feature which is quite handy, it will show difference between git current revision to you local change in Editor itself. Eclipse has it But you have to enable it.
Window > Preferences > General > Editors > Text Editors > Quick Diff
* Check Enable quick diff
* Check show differences in overview ruler
* Choose Orange for Changes
* Choose Green For Additions
* Choose Pink for Deletions
* Choose Git revision in Reference source
The
Above colors are used in IntelliJ.
Automatic updates:
To
stop checking for updated in Eclipse,
Window > Preferences > General > Install/Update > Automatic updates -> uncheck Automatic update
NOTE:
This might increase small performance
Changing Perspective:
Eclipse
used to have different perspectives, But IntelliJ don't. Better move
the tabs where you have needed in their places and Save it as new
Perspective. So that you can reset those tabs in single click.
Window -> Perspective -> Save Perspective as -> IntelliJ [Give a name]
NOTE:
It's better to add shortcut for new perspective.
Manual ToolTip:
Eclipse
used to show tooltop of everything by just hoving in it. It may
reduce performance and IntelliJ doesn't show tooltip on hover.
Instead there is an shortcut [Ctrl + Q] to display it.
Window -> Java -> Editor -> Hovers -> Check Javadoc and change it's value to "Shift".
To
get ToolTip, just press Shift and hover over it.
NOTE: This might increase performance.
Fonts and Colors:
Fonts:
IntelliJ uses the "Monospaced" font which is using JVM. I can't find .ttf file for the same. But we can get the similar effect by using "Courier
New" and set the size to 7 or 8 in Eclipse.
Coloring:
JavaDoc Coloring:
Text/Content in JavaDoc:
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
JavaDoc Tag:
*
Add Underscore in effects
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
JavaDoc HTML Markup:
*
#E2FFE2
*
rgb(226, 255, 226)
*
hsl(120, 100%, 94%)
JavaDoc Others:
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
Comments Coloring:
Multiline
Comments, Single Line comments:
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
Task/TODO tag:
*
Blue color
Java:
Window > Preferences > Java > Editor > Syntax Coloring > "Keyword 'return'" and "Keywords excluding 'return'"
ex: return, static
* #660E7A
* rgb(102, 14, 122)
* hsl(289, 79%, 27%)
Annotation color:
*
Bold could be better
*
#808000
*
rgb(128, 128, 0)
*
hsl(60, 100%, 25%)
Fields:
*
Bold could be better
*
#660E7A
*
rgb(102, 14, 122)
*
hsl(289, 79%, 27%)
Static, static finals:
*
Bold could be better
*
#000080 (Dark blue)
*
rgb(0, 0, 128)
*
hsl(240, 100%, 25%)
Strings:
*
Bold could be better
*
#008000
*
rgb(0, 128, 0)
*
hsl(120, 100%, 25%)
Type parameter:
*
#20999D
*
rgb(32, 153, 157)
*
hsl(182, 66%, 37%)
Xml Coloring:
Window > Preferences > Xml > Xml Files > Editor > Syntax Coloring
Attribute
names:
*
Bold could be better
*
#0000FF
*
rgb(0, 0, 255)
*
hsl(240, 100%, 50%)
Attribute Value:
*
Bold could be better
*
#008000
*
rgb(0, 128, 0)
*
hsl(120, 100%, 25%)
Comment Content, Comment Delimters:
*
Bold could be better
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
Entity Reference:
*
Bold could be better
*
#0000FF (Blue)
*
rgb(0, 0, 255)
*
hsl(240, 100%, 50%)
Namespace Prefix:
*
Bold could be better
*
#660E7A
*
rgb(102, 14, 122)
*
hsl(289, 79%, 27%)
Tag names:
*
Bold could be better
*
#000080 (Dark blue)
*
rgb(0, 0, 128)
*
hsl(240, 100%, 25%)
Tag Delimiter & Processing instructions delimiter:
*
Make it Black
Doc Type/Public System keyword
*
Bold could be better
*
#0000FF
*
rgb(0, 0, 255)
*
hsl(240, 100%, 50%)
JSON Coloring:
Window > Preferences > JSON > JSON Files > Editor > Syntax coloring
Boolean Value & Null Value:
*
Bold could be better
*
#000080 (Dark blue)
*
rgb(0, 0, 128)
*
hsl(240, 100%, 25%)
Number
value:
*
Bold could be better
*
#0000FF (Blue)
*
rgb(0, 0, 255)
*
hsl(240, 100%, 50%)
Comment:
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
Object
key:
*
Make it bold
YEdit Coloring:
Window > Preferences > YEdit Preferences > Color Preferences
Comments:
*
#808080 (Grey)
*
rgb(128, 128, 128)
*
hsl(0, 0%, 50%)
Key:
*
Bold could be better
*
#000080 (Dark blue)
*
rgb(0, 0, 128)
*
hsl(240, 100%, 25%)
Popup Background:
Window > Preferences > General > Appearance > Color and Fonts
Information background color
*
#F7F7F7 (Light Grey)
*
rgb(247, 247, 247)
*
hsl(0, 0%, 97%)
For
shortcuts, I'll publish another post and add link here. Stay tuned.
Don't
forgot to extract and backup your eclipse preferences into file.
Happy
Coding⌨⌨⌨...
No comments:
Post a Comment