toString() generator

Identifier:
org.gsoc.eclipse.tostringgenerator.javaToStringGenerator

Since:
1.0

Description:
This extension point allows to add a toString() generator to offer new code styles in the ''Generate toString()'' dialog. An extension can also alter the way of handling format template methods.

Configuration Markup:

<!ELEMENT extension (toStringGenerator+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT toStringGenerator (toStringTemplateParser)?>

<!ATTLIST toStringGenerator

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED>


<!ELEMENT toStringTemplateParser EMPTY>

<!ATTLIST toStringTemplateParser

class CDATA #REQUIRED>


Examples:
The following is an example of a toString() Generator contribution with definition of a template parser (which is not required):


  <extension
         point="org.eclipse.jdt.ui.javaToStringGenerator">
      <toStringGenerator
            class="com.examples.MyToStringGenerator"
            id="myToStringGenerator"
            name="The new style">
            <toStringTemplateParser
              class="com.examples.MyToStringTemplateParser">
            </toStringTemplateParser>
      </toStringGenerator>
   </extension>

API Information:
The contributed generator class must implement org.gsoc.eclipse.tostringgenerator.IToStringGenerator. The optional parser must implement org.gsoc.eclipse.tostringgenerator.IToStringTemplateParser.

Supplied Implementation:
org.eclipse.jdt.ui.tostringgeneration.AbstractToStringGenerator implements most of the common functionality for toString() generators. See its subclasses for more examples.
org.eclipse.jdt.ui.tostringgeneration.DefaultToStringTemplateParser is a default implementation of a toString() template parser.


Copyright (c) 2008 Mateusz Matela and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html