Welcome to this Blog. I am Software Engineer and work for Zühlke Engineering AG in Bern. This is my private blog, in which I will post mainly about technical stuff like Software Engineering or IT related topics. The views expressed herein do not necessarily represent those of my employer.

 

 
 

 

Today I’m going to show you two other important shortcuts. Both shortcuts are useful inside a class and offers an inline search.

CTRL + T (t for type), which shows the type hierarchy:
eclipse_type_hierarchy.png

CTRL + O (o for outline), which shows all members:
eclipse_outline.png

 

 

 
 

 

Sometimes, it’s very useful to watch the source code of a class file. But for this comfort, it’s necessary to download the source files and attach them in Eclipse. With the most important libraries, it make sense to spend time with downloading sources. But not with all rarely used libraries. A simple solution is the use of JadClipse. JadClipse decompiles class files with the help of the Jad Decompiler on the fly. There is no need for any source any more (of course, there are the usual limitations with decompilation).

Just download it and install it like described on the homepage (you also need to download the Jad Decompiler executable from the Jad website).

Before:
Without JadClipse

After:
With JadClipse

 

 

 
 

 

If you want to learn some shortcuts for a program, the best way is to do this step by step. Also in Eclipse. Today I will show you two important shortcuts, which are useful in very large projects:

use CTRL + SHIFT + T (T like Type) to search a class, interface, and so on. This search supports CamelCase. If a class is called ThisIsMyTestClass, typing of the capital letters also finds this class (just type TIMTC).
Eclipse Shortcut CTRL SHIFT R

use CTRL + SHIFT + R (R like Resource) to search a ANT build file, text files, ore something like that:
Eclipse Shortcut CTRL SHIFT T

 

 

 
 

 

Ever wondered, how you can force a team to use same code style and same code convention?

If you use Eclipse,  there is a simple solution. Just install these two plug-ins und the live will be easier ;-)

  • Checkstyle
    Used to check the layout of the code. Do all methods have it’s Javadoc? Has the file the company header? Can be easily used in Eclipse and with Ant. 
     
    enable Checkstyle on a project:
     Checkstyle Property Window  
     
    run Checkstyle (could also be done by ANT):
     Checkstyle - check code  
     
    check out the warnings on the left border:
     Checkstyle - warning 
     
     
     
  • FormatOnSave
    Eclipse plug-in, which formats the code on every save. Simply install this plug-in on the Eclipse installation of every team member and the code is now always in correct format. Just don’t forget to define the right format template on each installation.
     
    FormatOnSave
    OI = Organize Imports (on save)
    SM = Sort Members (on save)
    CI = Correct Identation (on save)
    F = Format (on save)

 

 

 

« Newer Posts