1 23 24 25 30 31 package org.enhydra.kelp.forte.node; 32 33 import org.enhydra.tool.common.ToolException; 35 import org.enhydra.kelp.common.node.*; 36 37 import org.openide.nodes.Node; 38 import org.netbeans.modules.text.TXTDataObject; 39 44 public class ForteNodeFactory extends OtterNodeFactory { 45 46 47 public ForteNodeFactory() { 48 } 49 50 public OtterFolderNode createFolderNode(OtterNode otterNode, String name) { 51 OtterFolderNode newNode = null; 52 53 newNode = new ForteFolderNode(otterNode, name); 54 return newNode; 55 } 56 57 66 public OtterJavaFileNode createJavaFileNode(OtterNode otterNode, 67 String file) { 68 OtterJavaFileNode newNode = null; 69 70 newNode = new ForteJavaFileNode(otterNode, file); 71 return newNode; 72 } 73 74 83 public OtterDocumentNode createDocumentNode(OtterNode otterNode, 84 String file) { 85 OtterDocumentNode newNode = null; 86 87 newNode = new ForteDocumentNode(otterNode, file); 88 return newNode; 89 90 } 91 92 101 public OtterImageFileNode createImageFileNode(OtterNode otterNode, 102 String file) { 103 OtterImageFileNode newNode = null; 104 105 newNode = new ForteImageFileNode(otterNode, file); 106 return newNode; 107 108 } 109 110 119 public OtterTextFileNode createTextFileNode(OtterNode otterNode, 120 String file) { 121 122 OtterTextFileNode newNode = null; 123 124 newNode = new ForteTextFileNode(otterNode, file); 125 return newNode; 126 127 } 128 129 138 public OtterTemplateNode createTemplateNode(OtterNode otterNode, 139 String file) { 140 OtterTemplateNode newNode = null; 141 142 newNode = new ForteTemplateNode(otterNode, file); 143 return newNode; 144 145 146 } 147 148 155 public OtterTemplateNode getTemplateNode(OtterNode otterNode) { 156 OtterTemplateNode newNode = null; 157 158 if (otterNode.getNativeNode() instanceof DeployDataObject) { 159 DeployDataObject nativeNode = null; 160 161 nativeNode = (DeployDataObject) otterNode.getNativeNode(); 162 try { 163 newNode = new ForteTemplateNode(nativeNode); 164 } catch (ToolException e) { 165 e.printStackTrace(); 166 } 167 } 168 return newNode; 169 } 170 171 181 public synchronized OtterJavaFileNode[] replaceGeneratedSource(OtterProject project, 182 OtterNode node, String [] files) { 183 184 System.out.println("replace generated source"); 185 return null; 186 187 222 } 223 224 225 } 226 | Popular Tags |