Skip to content

Commit

Permalink
添加不导出2的字段
Browse files Browse the repository at this point in the history
  • Loading branch information
coolexp committed Jun 27, 2014
1 parent 2a8d730 commit 405c929
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/com/coolexp/vo/InputArgsVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public static InputArgsVO parse(String[] args){
boolean isData = true;
boolean outAS = false;
boolean outJava = false;
boolean outC = false;
boolean outC = true;
boolean outSheetsDat = false;
boolean outPutExcelHelper = false;
boolean outSheetsXML = false;
boolean outSheetsXML = true;
boolean usePreBasePath = false;
String preBasePath ="";
if (args.length != 14){
Expand Down
2 changes: 1 addition & 1 deletion src/com/mop/game/client/buildtool/config/BuildConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BuildConfig {
public String templateExcelHelperStrPath = "SheetStringHelper.ftl";

private String outputfile = "ErayClientData.xml";
private String outputDatafile = "ErayClientData.dat";
private String outputDatafile = "com.yiru.ClientData.dat";
private String outputDatafileAmf = "ErayClientData.amf";
private String outputXMLFile = "ErayClassObj.xml";

Expand Down
6 changes: 5 additions & 1 deletion src/com/mop/game/client/buildtool/util/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;

/**
Expand Down Expand Up @@ -83,7 +84,10 @@ public static void builderPath(String path) {

public static void createItemXML(Element sheetElement,String sheetName){
Document sheetDoc = new Document(sheetElement);
XMLOutputter xmlout = new XMLOutputter();
Format format = Format.getCompactFormat();
format.setIndent(" ");
format.setLineSeparator("\n");
XMLOutputter xmlout = new XMLOutputter(format);
try {
xmlout.output(sheetDoc, new FileOutputStream(sheetName+".xml"));
} catch (FileNotFoundException e) {
Expand Down
4 changes: 4 additions & 0 deletions src/com/mop/game/client/buildtool/util/FreeMarkerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,14 @@ public static void createClassVO(String ClassName,Boolean isAS,Boolean isJava,S
if(isAS||isJava||isCADD){
ArrayList<ErayBean> fieldList = new ArrayList<ErayBean>();
String [] d = data[0];
String [] dd = data[3];
for(int k=0;k<d.length;k++){
if(d[k].equals("")){
continue;
}
if(dd[k].equals("2")){
continue;
}
ErayBean b = new ErayBean();
for(int i=0;i<3;i++){
switch(i){
Expand Down
9 changes: 7 additions & 2 deletions src/com/mop/game/client/buildtool/util/TranformExcel.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;

import com.coolexp.vo.ErayExcelManagerBean;
Expand Down Expand Up @@ -95,7 +96,10 @@ public void tranformPath(String path, boolean line) throws Exception {

FreeMarkerHelper.createVOFactory(BuildConfig.getInstance().getBasePath(), allClassList, iao.outCADD);
/**输出数据XML节点文件**/
XMLOutputter xmlout = new XMLOutputter();
Format format = Format.getCompactFormat();
format.setIndent(" ");
format.setLineSeparator("\n");
XMLOutputter xmlout = new XMLOutputter(format);
try {
xmlout.output(doc, new FileOutputStream(BuildConfig.getInstance().getOutPutFile()));
} catch (FileNotFoundException e) {
Expand All @@ -105,7 +109,8 @@ public void tranformPath(String path, boolean line) throws Exception {
}

/**输出ClassXML节点文件**/
XMLOutputter classXMLout = new XMLOutputter();

XMLOutputter classXMLout = new XMLOutputter(format);
try{
classXMLout.output(classDoc, new FileOutputStream(BuildConfig.getInstance().getOutputXMLFile()));
}catch(FileNotFoundException e){
Expand Down

0 comments on commit 405c929

Please sign in to comment.