01: package org.osbl.client.wings.devtools;
02:
03: import org.osbl.client.ClientServiceProvider;
04: import org.osbl.ItemRegistry;
05:
06: import javax.swing.*;
07: import java.awt.event.ActionEvent;
08: import java.util.List;
09: import java.util.Collections;
10:
11: public class DumpItemRegistryDevTool extends AbstractAction {
12: protected static final String SERVICE = "SERVICE";
13:
14: public DumpItemRegistryDevTool(String name) {
15: putValue(Action.NAME, name);
16: }
17:
18: public void actionPerformed(ActionEvent e) {
19: ItemRegistry localizationItems = (ItemRegistry) ClientServiceProvider
20: .getInstance().getService((String) getValue(SERVICE));
21: List<String> items = localizationItems.getItems();
22: Collections.sort(items);
23: for (String item : items) {
24: System.out.println(item);
25: }
26: }
27: }
|