Advertisment

The New Age Eclipse

author-image
CIOL Bureau
Updated On
New Update

By: Anadi Misra

Advertisment

Eclipse traces its origins to a rather modest SDK that grew into a large monolithic IDE that it is today. It is comprehensive and includes some of the best features an IDE can offer a modern-day developer for a platform like Java. Callisto is a positive improvement in the way Eclipse users would use their development environment and this article will explore some of the major differences in how you would work with it.

Callisto Discovery Site

The plug-ins and features, that make up Eclipse, after a time led to a state where there was a huge repository to search within and figure out what exactly needs to be installed or enabled. If you have ever browsed through the 'projects' section in Eclipse's web site looking for the right plug-in or feature for your need you will know exactly what we are talking about here. The Callisto home page mentions that this is a simultaneous release of ten projects. This reflects the separation of the code base of Eclipse and its plug ins into the separate entities they are.

Direct Hit!
Applies to: Developers
USP: Learn the new features in this release of Eclipse
Links: http://www.eclipse.org/callisto/
Google keywords: Eclipse, Callisto
On PCQ Professional CD: /developer/Callisto/eclipse-SDK-3.2-win32.zip
Advertisment

You can now choose your primary usage of Eclipse from amongst different needs like: Java development, C/C++ development and plug-in development or even choose a customize installation if the provided options still don't suit your need. 

In case you choose the Java/Web applications option, the IDE is then installed and configured for just that purpose, removing the need to hover around a lot of plug-ins and spending on deciding what to install and what not to install. The Callisto Discovery Suite provided in the Update Manager does the trick here. It finds and prompts for only those extensions required for the choice you made while installing Eclipse itself.

Platform changes

The first evident difference you will notice is the startup procedure that has been integrated into the splash screen. But there are more noteworthy features than this in the platform. For example, the Project Explorer now displays any Java project as a hierarchy of source folders and packages in contrast to the folder view that we had earlier. Similarly, while importing a project from File>Import>Existing projects into a Workspace, you have an optional feature of copying the project into workspace by checking the 'Copy projects into workspace' option that is available now. The filtering support that was earlier in classes, interfaces and other similar features is now integrated into all the Import, Export and New wizards. A 'Close Unrelated Projects' option added in the perspective menu in the Project Explorer is a pretty useful addition that lets you move all the irrelevant projects out of view and lets you focus only on the items you need to work on. History has been updated to allow you to view history for specific elements within a class or project and not just files as was the case earlier.

Advertisment
The Callisto discovery site allows easier upgrade and installation of only those features and plug-ins relevant to the platform

There is also a completely new concept of 'Working Set' introduced into the platform. A working set basically defines a group of elements for displaying in views or operations on the given set. It also reduces the complexity somewhat, by making visible only those resources that are relevant for the given 'Working Set'. Improvements in problem resolution include the ability to add those problems in the Problem View that have similar resolution. This can certainly help a lot in reducing resolution effort and time for a developer.

For Java developers

Similarly for Java Development there are quite a few impressive features on offer most noteworthy being the changes or improvements brought about in Refactoring options. For example the platform introduces an 'Indirection Refactoring' that redirects all the methods calling a particular method to a new method. This is particular is very useful in case of bug-fixing. You can also use it to add new behavior in your class quickly or in case the method that was earlier being used is from an API or a library and hence cannot be changed. The refactoring also brings in an 'Extract Superclass' command to the platform. You can easily extract a super class out of the existing similar classes in your application using this feature. There is a whole new 'Clean Up' wizard added to the 'Source' menu.

Advertisment

This wizard can be invoked on multiple files, packages and the entire project. The 'Code Style' tab in the wizard edits code styling, organizing the blocks and even adding 'final' keyword where-ever possible to private fields, parameters to methods and local variables. There is also a 'Member Access' tab that provides options for adding 'this' access qualifier for both field and method access, and has a detailed set of options for static access as well that include qualifying access for fields and methods, changing all accesses through subtypes and instances. These features can help in fixing multiple problems. The 'Unnecessary Code' tab allows you clean up code that is not used such as unused imports and private members. You can even change your code from Java 1.4 to Java 5.0 version by using the options in the 'Missing Code' tab that allow you to add annotations to your code.

Lets look at one of these features in action. We took a simple class hierarchy where we have a class Matrix that is extended by classes 'IdentityMatrix' and 'SquareMatrix'.

The constructors for the IdentiyMatrix class are as follows

Advertisment

public void IdentityMatrix(int dim){

rows = columns = dim;

}

public void IdentityMatrix(int rows,int columns){

this.rows = rows;

this.columns = columns;

}

Now lets look how the Code Style utility works. Select the IdentityMatrix class in the Editor Pane and go to Source>Clean Up. In the Clean Up dialog box select the Code Styling tab and then choose the option 'Use Modifier final where possible' and then select all the three option under this section and click on Next. The next page shows you the changes that will be made, click Finish to complete the operation. The Code sTyle option changes the IdentityMatrix constructors to

Advertisment

public void IdentityMatrix(final int dim){

rows = columns = dim;

}

public void IdentityMatrix(final int rows,final int columns){

this.rows = rows;

this.columns = columns;

}

This is a trivial example just to show the usage, but in real life these source code formatting can actually help you ensure a better implementation of your classes providing a those ideal practices for parameter passing through a wizard rather than having you keep track of things and editing them manually. Similarly the other features in the Clean Up wizard help solving common problems quickly.

In conclusion

The IDE has grown large enough now split into platforms and it is the right decision allowing developers to manage their extensions and plug-ins more easily. Features like the Callisto discovery suite bring about much needed assistance in case you are not sure what all is needed on your IDE for a particular purpose. So you can be rest assured that upgrading to Callisto will bring you a more easily manageable platform and in-case its your early days with Eclipse, well this is a good point to start with.

tech-news