root / tags / v2_0_0_Build_2050 / extensions / extHelp / src / org / gvsig / help / HelpExtension.java @ 38664
History | View | Annotate | Download (1.29 KB)
1 |
package org.gvsig.help; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
|
5 |
import org.gvsig.andami.PluginServices; |
6 |
import org.gvsig.andami.help.Help; |
7 |
import org.gvsig.andami.plugins.Extension; |
8 |
import org.slf4j.Logger; |
9 |
import org.slf4j.LoggerFactory; |
10 |
|
11 |
|
12 |
public class HelpExtension extends Extension { |
13 |
|
14 |
private static Logger logger = LoggerFactory.getLogger(HelpExtension.class); |
15 |
|
16 |
public void initialize() { |
17 |
|
18 |
} |
19 |
|
20 |
public void execute(String actionCommand) { |
21 |
|
22 |
// If the option pressed is help control the help panel is created.
|
23 |
if(actionCommand.equalsIgnoreCase("help-contents")){ |
24 |
|
25 |
Help help = Help.getHelp(); //My constructor.
|
26 |
help.show("docs.introduccion-a-gvsig.copy_of_queesgvsig.html");//Launch help panel. |
27 |
|
28 |
return;
|
29 |
} |
30 |
} |
31 |
|
32 |
public boolean isEnabled() { |
33 |
return true; |
34 |
} |
35 |
|
36 |
public boolean isVisible() { |
37 |
return true; |
38 |
} |
39 |
|
40 |
public static String getExtensionPath() { |
41 |
String pluginName = "org.gvsig.help"; |
42 |
PluginServices ps = PluginServices.getPluginServices(pluginName); |
43 |
return ps.getPluginDirectory().getAbsolutePath();
|
44 |
} |
45 |
|
46 |
@Override
|
47 |
public void postInitialize() { |
48 |
super.postInitialize();
|
49 |
Help help = Help.getHelp(); //My constructor.
|
50 |
help.addResource(HelpExtension.getExtensionPath()+File.separator+ "gvSIG"+File.separator+"manual-de-usuario.zip");//Documentation path. |
51 |
help.addHelp("manual-de-usuario");
|
52 |
|
53 |
} |
54 |
|
55 |
} |