TestClient

TestClient

I have committed the TestClient I have mentioned previously. It is a small charva app based on the reflection API, and its purpose is to provide a user interface to interact with the live objects in the system during runtime, basically for debugging (you can invoke methods on objects and inspect the values of fields).
It provides three panels: initially the first panel is filled with a list of objects that you would like to debug. If you select any of these, you get its fields and methods in the second panel. By selecting a field, you get its value in the third panel; or by selecting a method which takes no arguments, it is called and the return value is placed in the third panel.

By pressing 'p' in the methods/properties panel you will get all fields/methods declared in the class and its superclasses (by default the fields/methods declared in superclasses are not listed).
By selecting an object in the third panel, it will be placed in the first panel so you can go on exploring that. This way you can walk an object hierarchy (sometimes the contents of the first panel can not be seen - this is a bug but I don't know where).
If there is an object implementing the Collection interface in the first panel, you can select it and press '+' to expand it (so the panel will contain the Collection's contents).

Initially the first panel is filled with the objects bound to the InitialNaming, so for now, if you would like to debug some objects, put them there. If anyone finds this application useful, I suggest to create a naming service interface (which InitialNaming would implement), and then you can implement your own DebugNaming or whatever services and put your objects there.

To make the most out of it, you should create a new console with "console -n" and run it there, while you are using JNode in some other console. The problem with this is that currently by switching from a charva app to an other console and switching back, the user interface provided by charva disappears. Levente, Valentin, any idea how to fix this?

I have put the plugin in the full-plugin-list.xml, you can invoke it with the alias 'tc'.
It's a simple tool but I hope it will be useful to help debugging JNode.

Andras

charva and consoles

Hi Andras,
2 weeks ago, I started refactoring some things in charva in order to :
- make running multiple charva instances possible
- be able to switch from charva app to another console and switch back to charva
- to be more closed to awt/swing architecture (event dispatcher, event queue ...) : I extracted some things from bstractToolKit/Toolkit (IMHO, It was too huge and heterogenous in term of functionalities)

I think I will be able to finish and commit it this week end.

Fabien