1 23 package org.enhydra.kelp.common.codegen; 24 25 import org.enhydra.tool.codegen.ProjectGenerator; 27 import org.enhydra.tool.codegen.internal.WebAppGenerator; 28 29 import org.enhydra.kelp.KelpInfo; 31 import org.enhydra.kelp.common.node.OtterNode; 32 import org.enhydra.kelp.common.node.OtterProject; 33 import org.enhydra.kelp.common.node.OtterFolderNode; 34 import org.enhydra.kelp.common.node.OtterJavaFileNode; 35 import org.enhydra.kelp.common.node.OtterTextFileNode; 36 import org.enhydra.kelp.common.node.OtterNodeFactory; 37 38 import java.awt.Component ; 40 import java.io.File ; 41 import java.io.FilenameFilter ; 42 import java.util.Vector ; 43 import java.util.ResourceBundle ; 44 45 public class WebAppUtil extends AppGenUtil { 47 48 private final static String DEFAULT_COMMAND_NAME = "webapp"; 51 public WebAppUtil() throws CodeGenException { 53 super(new WebAppGenerator()); 54 } 55 56 public WebAppUtil(OtterProject project) throws CodeGenException { 57 super(project, new WebAppGenerator()); 58 } 59 60 public WebAppUtil(OtterProject project, WebAppGenerator gen) throws CodeGenException { 61 super(project, gen); 62 } 63 64 65 public static ProjectGenerator createGenerator() { 66 return new WebAppGenerator(); 67 } 68 69 public static String getCommandName() { 70 String commandName = DEFAULT_COMMAND_NAME; 71 72 if (KelpInfo.isClassPathComplete()) { 73 commandName = WebAppGenerator.COMMAND_NAME; 74 } 75 return commandName; 76 } 77 78 83 public static String getDisplayName() { 84 String displayName = res.getString("Web_Application"); 85 86 if (KelpInfo.isClassPathComplete()) { 87 displayName = WebAppGenerator.displayName; 88 } 89 return displayName; 90 } 91 92 } 93 | Popular Tags |