views:

82

answers:

2

I am looking for a tool which will make able to edit parts of Java code visually using something like inspector and place code back.

For example:

Person p = new Person();
p.setName("Bill Libb");
p.setAge(25);

This code should be generated from visual inspector and copied into Java IDE.

This will help quickly create sample objects for testing.

Pros of this approach:

  1. Don't need to think what can be changed in object - you see what properties available to change immediately.

  2. You don't need to code setting properties - just type the value in the appropriate inspector property.

  3. You have a new way of defining/describing object which gives a feeling more that you working with objects rather than with code.

A: 

It wouldn't be a GUI tool, but you could easily use reflection to create a program that outputs a properties file with placeholders for a given class's get/set methods. Then you could edit the template property file and load it back in at test time. That way all you need is a text editor, and you could script the creation or population of data in all sorts of interesting ways.

John Cromartie
+1  A: 

Have you looked at Naked Objects?

fuzzy lollipop
@fuzzy lollipop, Yeah I did few years ago. It was several UI and persistence issues. But in general it's very cool system.But regarding this topic I am looking for a tool which will make me edit the code in a new visual way :-) Naked Objects also considers that your objects are predefined, but I consider that visual inspector will edit any object.
Vladimir
@fuzzy lollipop, But your pick is very close.
Vladimir