Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

con wan

+ Follow
since Dec 10, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by con wan

David Newton wrote:I suppose it would be useful, but such tools already exist.

or what kind of key words can I use to search?? I am looking for that for a long time. :rolleyes:
12 years ago

Rob Prime wrote:What is this "gef layout"?

sorry, gef is graphical editing framework, it has some its own layout managers, such as XYlayout or directgraphlayout, and also uses the draw2d layouts. As it is also about the GUi, so I put it here. thanks.
12 years ago

David Newton wrote:I suppose it would be useful, but such tools already exist.

thanks for the reply. what is that tool 's name??? :shock:
12 years ago
Hi guys,

I have trouble with gef layout. I have a map storing some key-value pairs, and I want to display all of them. some of them have connections and some of them do not have. The number of values in the map varies in the run time. so I need to auto arrange all the nodes in the editor. anyone can suggest what kind of method I can use?
I thougt of xylayout, but I am not sure about how to caculate the position of each relation.

12 years ago
I am doing a eclipse plugin for struts and other xml based framework.

The plugin is to validate if all the physical files exist which appeared in the config.xml . Then a visual represenatation of the result will be return.

Because I did not do lots of real struts project, I am still wondering if it is really useful or some advantages for the industry.

some one gives me a hand ?
12 years ago
solved. thanks.
12 years ago

when I iterate the hashmap, I want to remove some entries according to some conditions. but it fails, becasuse hashmap is not threadsafe, it can not be accessed by mutithread at the same time. Then I wrapped hashmap to the threadsafe map, but it fails too. I dont know why ...... need some answer, thanks

HashMap hm = new HashMap();
hm.put(1, "test1");
hm.put(2, "test2");

Map m = Collections.synchronizedMap(hm);

Set keys = m.keySet();
for(Iterator it = keys.iterator(); it.hasNext(); ) {
int key = (Integer);
if(key == 1) {
12 years ago

William Brogden wrote:I think that trying to re-use a SAX parser would be a mistake. But note that you can re-use the same instance of SAXParserFactory.

Perhaps you meant re-use the same handler for the SAX events? That would indeed lead to a mess.

If this was my problem I would look into the Apache Commons Digester project.


Thanks for your reply.

Yes, what I consider is to re-use the same handler for SAX events. I think there would be a mess too. I am still looking for the better tool than SAX.
The reason I use SAX is because my app should handle different structure of xml. So I should create a lot of objects for one xml file if I use Digester. If a lot of xml files, I create a lot of objects, thats heavy. For SAX, I just add a lot of if statement in the startElement() method for searching for a tag or attributes.
Hi everyone, I am doing a project that I need to parse may different xml config files, such as struts config and tiles config and some other with different structures. My question is that if I use SAX, do I need to create parser for each file or I just create one for all? If there is only one parser, I worry about the if statement will go too large and mess. Is there a better way if I only use SAX ?

ya, why they dont make Digester can output xml ???