Jump to: navigation, search

Difference between revisions of "ToString() generation"

(New page: == About == The toString() method is widely used to represent objects as human-readable text and practically every class should implement it. Usually it is very simple: generated string c...)
 
(Planned features)
Line 9: Line 9:
 
'''Participants:'''
 
'''Participants:'''
  
*Student: Mateusz Matela (IRC: mati)
+
*Student: Mateusz Matela (IRC: mmati)
  
 
*Mentor: Markus Alexander Kuppe (IRC: lemmy)
 
*Mentor: Markus Alexander Kuppe (IRC: lemmy)
  
More information to come.
+
== Planned features ==
 +
 
 +
=== Must have ===
 +
 
 +
* Integration with 'Generate hashCode() and equals()' dialog
 +
* Changing the string format with templates
 +
* Changing the order of the fields
 +
* Turning generators on/off separately
 +
 
 +
=== Should have ===
 +
 
 +
* Option to use getters instead of accessing the fields directly
 +
* Option to skip fields with null value
 +
* Option to ignore default toString() of arrays and list elements instead
 +
* Option to set the maximum number of elements to list from arrays/Collections
 +
 
 +
=== Nice to have ===
 +
 
 +
* Ability to add different implementations of the toString generator (e.g. extension points)
 +
* Change hashCode and equals generators to optionally use getters
 +
 
 +
=== Community proposals ===
 +
 
 +
Feel free to add your ideas
 +
 
 +
 
 +
 
 +
[[Category:SOC]]

Revision as of 12:26, 4 May 2008

About

The toString() method is widely used to represent objects as human-readable text and practically every class should implement it. Usually it is very simple: generated string contains the object type and lists values of the most important fields. That's why process of writing such methods can easilly be automated. Eclipse, as the best java IDE in the world, should include functionality of automatic toString() method generation to make its users lives even simpler. Implementing it is the aim of this project.

There were many bugs posted regarding this problem, see bug 26070 for details.

This project is part of 2008 Google Summer of Code.

Participants:

  • Student: Mateusz Matela (IRC: mmati)
  • Mentor: Markus Alexander Kuppe (IRC: lemmy)

Planned features

Must have

  • Integration with 'Generate hashCode() and equals()' dialog
  • Changing the string format with templates
  • Changing the order of the fields
  • Turning generators on/off separately

Should have

  • Option to use getters instead of accessing the fields directly
  • Option to skip fields with null value
  • Option to ignore default toString() of arrays and list elements instead
  • Option to set the maximum number of elements to list from arrays/Collections

Nice to have

  • Ability to add different implementations of the toString generator (e.g. extension points)
  • Change hashCode and equals generators to optionally use getters

Community proposals

Feel free to add your ideas