Revision 34470 trunk/extensions/extHelp/src/org/gvsig/help/HelpExtension.java
HelpExtension.java | ||
---|---|---|
26 | 26 |
if(actionCommand.equalsIgnoreCase("Help")){ |
27 | 27 |
|
28 | 28 |
Help help = Help.getHelp(); //My constructor. |
29 |
help.show("docs.introduccion-a-gvsig.copy_of_queesgvsig.html");//Launch help panel.
|
|
29 |
help.show();//Launch help panel. |
|
30 | 30 |
|
31 | 31 |
return; |
32 | 32 |
} |
... | ... | |
50 | 50 |
public void postInitialize() { |
51 | 51 |
super.postInitialize(); |
52 | 52 |
Help help = Help.getHelp(); //My constructor. |
53 |
help.addResource(HelpExtension.getExtensionPath()+File.separator+ "gvSIG"+File.separator+"manual-de-usuario.zip");//Documentation path. |
|
54 |
help.addHelp("manual-de-usuario"); |
|
55 |
|
|
53 |
File folder = new File(HelpExtension.getExtensionPath()+File.separator+"manuals"); |
|
54 |
String[] l = folder.list(); |
|
55 |
for (int i = 0; i < l.length; i++) { |
|
56 |
File file = new File(folder,l[i]); |
|
57 |
String path = file.getAbsolutePath(); |
|
58 |
String name = l[i]; |
|
59 |
if (file.isDirectory()){ |
|
60 |
if ( !path.endsWith(File.separator) ){ |
|
61 |
path += File.separator; |
|
62 |
} |
|
63 |
} else { |
|
64 |
if ( !path.toLowerCase().endsWith(".zip") ){ |
|
65 |
continue; |
|
66 |
} |
|
67 |
} |
|
68 |
if (name.endsWith(File.separator)){ |
|
69 |
name = name.substring(0, name.length()-1); |
|
70 |
} |
|
71 |
if (name.toLowerCase().endsWith(".zip")){ |
|
72 |
name = name.substring(0, name.length()-4); |
|
73 |
} |
|
74 |
help.addResource(path); |
|
75 |
help.addHelp(name); |
|
76 |
} |
|
56 | 77 |
} |
57 | 78 |
|
58 | 79 |
} |
Also available in: Unified diff