All pastes #963322 Raw Edit

Untitled

public text v1 · immutable
#963322 ·published 2008-03-30 13:22 UTC
rendered paste body
Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. JUtils is a eclipse plugins for generating the toString of class, but there is no wizard for generating the toString for a class.

It would be very helpful for the Gui developer such that it can generate the toString methods for the class/controls using a wizard. The developer/user selects the class for which he/she want to generate the toString method. The wizard will show all the associated datamembers of the class and the user can select all the data members/controls of which he wants to generate the toString code, and unselect those for which he dont want to generate the toString code. Thus by using the wizard user can generate a quite customizable toString function for his class. The user can also adjust the format of the toString method, and also can select the separator and change the defaults labels. It would be nice to have a wizard that acts similar to the Generate Getter and Setter wizard in that a user is presented with a GUI that displays all of the fields associated with a class. This would be a small plugin for eclipse or it could be  extension of the JUtils plugin.


------------------------------------------------------

The usual relationship between programmer and programming environment is one where the environment nurtures the programmer. In return for this support, the programmer works within the constraints created by the environment. I have been using eclipse for more than 5 years, and I never thought of getting shifted to any other programming environment, due to its powerful plugins support. I have developed a few java desktop applications which uses jFrame and also java web applications in eclipse during my bachelors and on going masters carrier. I wanted to contribute to the open source community especially eclipse because I have been using it for a while.

I have used and studied various plugins of eclipse. I have used Apollo for Eclipse which is the first commercial UML modeling tool that is based on open source technology developed by the Eclipse Graphical Modeling Framework (GMF) project. I have also used Omondo which is a UML plugin for eclipse for modeling.

I have proposed a wizard applications that would extend the "JUtils ToString Generator Plugin for Eclipse". It would be good to have a wizard that acts similar to the Generate Getter and Setter wizard. The user is presented with a GUI that displays all of the fields associated with a class. And it would generate a nice uniform toString 
method for the class, which cover all the aspects.
 
GUI Description:
The user will select the class, next all the data memebers will appear on the screen with the select/unselect button. User can select the datamembers for which he wants to generate the toString , and unselect datamemebers for which, user dont want to include in the toString.
User can also change the seperator between the data member label and the data member itself. The default seperator will be ":". It would be highly customizable, which facilitate the user to enter his preference while generating the code for the toString.

Coding Details:
I have figure out the options, and the most feasible option while creating the toString wizard is to use the JFrame api. JFrame is a window with title and maximized/iconified/normal state, and resizer. So JFrame has got all the essentials that I need to create the wizard. Previously while working with JFrame I have created signup wizards, and it goes quite well.

JFrame class Inheritance: 
JFrame -> JWindow -> JPopup -> JRootPane -> Container -> Component -> AWSprite -> flash.display.Sprite.

The above is the JFrame inheritance, and as far as I have studied it has got all the essentials which are needed to construct a wizard.

Building String:
In the end the main goal is to generate the toString function.
There are few ways with which we could generate the string that is  concatenation and the string builder form. String buffer is more efficient then using string class, and also while using the string builder there are no concatenation operators in the code involved. 

But I will like to facilitate the user by both the ways ie. string concatenation and the string builder way, user can choose from both of them.  

Lastly I have studied the eclipse code and learn how to make eclipse plug ins thanks to online article for how to write eclipse plugins.
I have studied the JUtils plugins for eclipse. This wizard could be the extension of JUtils plugin but I prefer that I would make it a seperate plugin for eclipse with all the features in it.   


This is my first application for google soc, please excuse me if there are any errors in the application or if something is in formal. I want to do good this summer.