1 23 package org.enhydra.kelp.jbuilder.tool; 24 25 import com.borland.jbuilder.JBuilderHelp; 27 import com.borland.jbuilder.node.JBProject; 28 import com.borland.primetime.help.ZipHelpBook; 29 import com.borland.primetime.help.ZipHelpTopic; 30 import com.borland.primetime.ide.Browser; 31 import com.borland.primetime.ide.BrowserAction; 32 33 import org.enhydra.kelp.KelpInfo; 35 import org.enhydra.kelp.common.Constants; 36 import org.enhydra.kelp.common.ResUtil; 37 import org.enhydra.kelp.common.node.OtterNode; 38 import org.enhydra.kelp.common.swing.KelpIconSet; 39 import org.enhydra.kelp.common.deployer.CoreDeployTool; 40 import org.enhydra.kelp.jbuilder.node.PrimeProject; 41 42 public class DeployTool extends AbstractBasicTool { 44 private final String HELP_LINK = KelpInfo.getAddinHelpURL(); 47 public static void initOpenTool(byte majorVersion, byte minorVersion) { 49 AbstractBasicTool.initAllTools(majorVersion, minorVersion); 50 } 51 52 public DeployTool() { 54 putValue(BrowserAction.SMALL_ICON, KelpIconSet.getSmallIcon()); 55 } 56 57 public String getTitle() { 59 return CoreDeployTool.getDefaultTitle(); 60 } 61 62 public String getDescription() { 64 return res.getString("Deploy_content"); 65 } 66 67 public void actionPerformed(Browser browser) { 69 PrimeProject primeProject = null; 70 OtterNode[] inputNodes = new OtterNode[0]; 71 CoreDeployTool coreTool = null; 72 73 setNativeProject((JBProject) browser.getProjectView().getActiveProject()); 74 if (getNativeProject() == null) { 75 76 } else { 78 primeProject = new PrimeProject(getNativeProject()); 79 primeProject.save(); 80 inputNodes = primeProject.getAllInput(); 81 saveNodes(inputNodes); 82 if (verifyAllClassPaths(browser.getOwner())) { 83 coreTool = new CoreDeployTool(); 84 coreTool.addHelpListener(this); 85 coreTool.setProject(primeProject); 86 coreTool.showDialog(browser); 87 } 88 } 89 } 90 91 public String getHelpAnchor() { 92 return HELP_LINK; 93 } 94 95 } 96 | Popular Tags |