Revision 38763 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/extension/develtools/ActionsInfoDevelTool.java

View differences:

ActionsInfoDevelTool.java
4 4

  
5 5
import org.gvsig.andami.PluginsLocator;
6 6
import org.gvsig.andami.actioninfo.ActionInfo;
7
import org.gvsig.app.ApplicationLocator;
8
import org.gvsig.app.ApplicationManager;
7 9
import org.gvsig.tools.swing.api.windowmanager.WindowManager;
8 10

  
9 11
public class ActionsInfoDevelTool {
10 12

  
11 13
	public void showActions() {
12
		String html = this.getActionsInformation();
13
		InfoPanel.save2file("actionsinfo", html);
14
		String html = "<html>\n<body>\n"+ this.getActionsInformation(null)+"</body>\n</html>\n";
15
		
16
		InfoPanel.save2file("actions-report", html);
14 17
		InfoPanel.showPanel("Actions information", WindowManager.MODE.WINDOW, html);
15 18
	}
19

  
20
	public void showReportOfPlugin() {
21
		ApplicationManager application = ApplicationLocator.getManager();
22
		String pluginName = null;
23
		
24
		pluginName = application.inputDialog("Introduzca el nombre del plugin del que desea el informe", "Plugin actions report");
25
		if( pluginName == null ) {
26
			return;
27
		}
28
		String actionsHtml = this.getActionsInformation(pluginName);
29
		String menusHtml = new MenusDevelTool().getMenusOfPlugin(pluginName);
30
		String iconsHtml = new IconThemeDevelTool().getIconThemeInformationOfPlugin(pluginName);
31
		
32
		String html = "<html>\n<body>\n"+actionsHtml+"<br>"+menusHtml+"<br>"+iconsHtml+"</body>\n</html>\n";
33
		
34
		InfoPanel.save2file("plugin-report", html);
35
		InfoPanel.showPanel("Plugin report", WindowManager.MODE.WINDOW, html);
36
	}
37

  
16 38
	
17
	public String getActionsInformation() {
39
	
40
	public String getActionsInformation(String pluginName) {
18 41
		
19 42
		String previousPluginName = null;
20 43
		
......
28 51

  
29 52
		buffer.append("<html>\n");
30 53
		buffer.append("<body>\n");
54
		
55
		buffer.append("<div>\n");
31 56
		buffer.append("<h2>Actions information </h2>\n");
32 57
		buffer.append("<br>\n");
33 58

  
......
46 71
		Iterator<ActionInfo> actions = PluginsLocator.getActionInfoManager().getActions(); 
47 72
		while (actions.hasNext()) {
48 73
			ActionInfo action = actions.next();
74
			if( pluginName!=null && !pluginName.equalsIgnoreCase(action.getPluginName()) ) {
75
				continue;
76
			}
49 77
			if( previousPluginName!=null && !action.getPluginName().equals(previousPluginName) ) {
50 78
				buffer
51 79
					.append("  <tr>\n")
......
177 205
			
178 206
		}
179 207
		buffer.append("</table>\n");
180
		buffer.append("</body>\n");
181
		buffer.append("</html>\n");
208
		buffer.append("</div>\n");
182 209

  
183 210
		return buffer.toString();
184 211
	}

Also available in: Unified diff