I love Eclipse because as an IDE it can do pretty much everything. Up to the point that some call it an ‘Eierlegende Wollmilchsau‘: something which can do anything. But with all the tools, menus and features, it can be daunting for a someone new to Eclipse. But the good news is: Eclipse is very versatile and can be customized to make it easier and simpler to use too. In this article I show how I’m tweaking it the way I want it, with just the menus and buttons I need:
In this example I’m using the NXP MCUXpresso IDE V11.1.1, but things pretty much apply to any other Eclipse distribution. NXP has added extra features and tweaked many things for easier usage too, and I go beyond that.
The above shows a somewhat ‘standard’ Eclipse with many toolbar icons and menu items. Below I’m showing how to optimize this so it is easier to use.
Perspectives (C/C++ and Debug)
Eclipse has the great concept of ‘Perspectives’: menus, buttons and views can be switched depending on the development phase. Typical perspectives are ‘C/C++’ (for source editing and building) and a dedicated ‘Debug’ for debugging.
Switching perspectives can be confusing for a beginner, so NXP has added the ‘Develop’ perspective which unifies both the C/C++ and Debug perspective. Such a combined perspective is available in the GNU MCU project too (see https://mcuoneclipse.com/2015/05/10/codered-debug-perspective-in-kinetis-design-studio/).
Personally I like to have different perspectives for editing and debugging, so I wrote an article about this (https://mcuoneclipse.com/2017/11/12/using-a-custom-debug-perspective-in-eclipse/).
Having dedicated perspectives for editing and debugging enables me to have dedicated toolbar and menus too.
Each perspective can be customized using the menu Window > Perspective > Customize Perspective…
A perspective can be saved using the ‘Save Perspective As…’ menu. Use a name like ‘MyDebug’ or ‘MyC/C++’.
Then then the settings can be (exported and imported again):
I have published my settings on GitHub.
For the C/C++ perspective I’m using the following Tool Bar Visibility:
Here are my settings for the Debug Perspective:
Below my menus for Debug:
And the menu for C/C++:
Eclipse is very versatile and can be easily tweaked for my needs. What I have found very useful is to use dedicated views, menus and toolbar for Editing and Debugging: only to show items which I need and hiding/disabling what I don’t need. This works very well for me and gives a clean and tidy IDE:
Happy simplifying 🙂
- Using dedicated Debug Perspective: https://mcuoneclipse.com/2017/11/12/using-a-custom-debug-perspective-in-eclipse/
- Develop Perspective with GNU MCU Eclipse: https://mcuoneclipse.com/2015/05/10/codered-debug-perspective-in-kinetis-design-studio/
- Workspace preferences: https://github.com/ErichStyger/mcuoneclipse/blob/master/Examples/MCUXpresso/Workspace%20Settings.epf
So I set up a perspective in one workspace, and save it – but if I switch to a different workspace that saved one isn’t visible.
Seems you’re saying I have to save it, then export it – then I presume switch workspace, import and finally then I can access the saved perspective. That’s quite crazy complicated!
Yes, I know this is not intuitive. Took me a while to find this out.
Erich… I think you are the only human being that actually LIKEs eclipse… lots of us use it… but I didn’t realize anyone actually liked it 🙂
same as for EMACS 🙂