KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > jbuilder > actions > EnhydraGroup


1 package org.enhydra.kelp.jbuilder.actions;
2
3 import com.borland.primetime.actions.ActionGroup;
4 import javax.swing.Icon JavaDoc;
5 import com.borland.primetime.ide.Browser;
6 import com.borland.jbuilder.node.JBProject;
7 import com.borland.primetime.vfs.Url;
8 import java.io.File JavaDoc;
9
10 /**
11  * <p>Title: </p>
12  * <p>Description: </p>
13  * <p>Copyright: Copyright (c) 2003</p>
14  * <p>Company: </p>
15  * @author not attributable
16  * @version 1.0
17  */

18
19 public class EnhydraGroup extends ActionGroup {
20
21   public EnhydraGroup(String JavaDoc name, char mnem,
22                       String JavaDoc longname, Icon JavaDoc icon, boolean popup) {
23     super(name, mnem, longname, icon, popup);
24   }
25
26   /**
27    * Enables deploy action if current project exists and if it is JBProject type
28    * and if exist builder.xml file in the project
29    *
30    * @param browser
31    */

32   public void update(Browser browser) {
33     JBProject project;
34     if (browser.getActiveProject() != null) {
35       project = (JBProject)browser.getActiveProject();
36       setEnabled( (project instanceof JBProject) &&
37                   (project.getProperty("enhydra.project", "false")
38                     .equalsIgnoreCase("true")) );
39     } else {
40       setEnabled(false);
41     }
42   }
43
44 }
Popular Tags