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.OtterXMLCNode; 38 import org.enhydra.kelp.common.swing.KelpIconSet; 39 import org.enhydra.kelp.common.xmlc.CoreXMLCTool; 40 import org.enhydra.kelp.jbuilder.wizard.AbstractBasicWizard; 41 import org.enhydra.kelp.jbuilder.node.PrimeProject; 42 43 public class XMLCTool extends AbstractBasicTool { 45 46 private final String HELP_LINK = KelpInfo.getAddinHelpURL(); 49 public static void initOpenTool(byte majorVersion, byte minorVersion) { 50 AbstractBasicTool.initAllTools(majorVersion, minorVersion); 51 } 52 53 public XMLCTool() { 54 putValue(BrowserAction.SMALL_ICON, KelpIconSet.getSmallIcon()); 55 } 56 57 public String getTitle() { 59 return CoreXMLCTool.getDefaultTitle(); 60 } 61 62 63 public String getDescription() { 65 return res.getString("Compile_XMLC_DOCS"); 66 } 67 68 public void actionPerformed(Browser browser) { 70 PrimeProject primeProject = null; 71 CoreXMLCTool 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 saveNodes(primeProject.getAllXMLCNodes()); 81 if (verifyAllClassPaths(browser.getParent())) { 82 coreTool = new CoreXMLCTool(); 83 coreTool.addHelpListener(this); 84 coreTool.setProject(primeProject); 85 coreTool.showDialog(browser); 86 } 87 } 88 } 89 90 public String getHelpAnchor() { 91 return HELP_LINK; 92 } 93 94 } 95 | Popular Tags |