Search in sources :

Example 1 with UserSourceMetaDVO

use of com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO in project Gargoyle by callakrsos.

the class ProjectInfoBaseInfoTab method createDocumentAction.

@Override
public void createDocumentAction(ProgramSpecSVO svo) {
    UserSourceMetaDVO meta = new UserSourceMetaDVO();
    meta.setPackages(baseInfoController.getPackage());
    meta.setProjectName(baseInfoController.getProjectName());
    meta.setProgramName(baseInfoController.getProjectName());
    meta.setUserPcName(baseInfoController.getUserName());
    svo.setUserSourceMetaDVO(meta);
    ImportsDVO importDvo = new ImportsDVO();
    importDvo.setImports(baseInfoController.getImports());
    svo.setImportsDVO(importDvo);
    svo.setMethodDVOList(baseInfoController.getMethodData());
}
Also used : ImportsDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ImportsDVO) UserSourceMetaDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO)

Example 2 with UserSourceMetaDVO

use of com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO in project Gargoyle by callakrsos.

the class ProgramSpecUtil method doJavaFile.

public static ProgramSpecSVO doJavaFile(String projectName, String fileName, AbstractJavaProgramSpecFile newInstance) {
    ProgramSpecSVO svo = new ProgramSpecSVO();
    String packageNames = newInstance.getPackage();
    newInstance.setPackage(packageNames);
    newInstance.setProjectName(projectName);
    svo.setFile(newInstance);
    // svo.getUserSourceMetaDVO().setProjectName(projectName);
    // svo.getUserSourceMetaDVO().setPackages(packageNames);
    String userName = System.getProperty("user.name");
    List<SourceAnalysisDVO> listStatement = newInstance.listStatement();
    UserSourceMetaDVO userSourceMetaDVO = new UserSourceMetaDVO();
    userSourceMetaDVO.setProjectName(projectName);
    userSourceMetaDVO.setSimpleFileName(fileName);
    userSourceMetaDVO.setRealFilePath(newInstance.getFullFileName());
    userSourceMetaDVO.setUserPcName(userName);
    userSourceMetaDVO.setPackages(packageNames);
    svo.setUserSourceMetaDVO(userSourceMetaDVO);
    /* 시작 import문 처리 */
    List<String> imports = newInstance.getImports();
    ImportsDVO importsDVO = new ImportsDVO();
    importsDVO.setImports(imports);
    svo.setImportsDVO(importsDVO);
    /* 끝 import문 처리 */
    // 테이블 데이터 바인드
    List<MethodDVO> methodDVOList = new ArrayList<MethodDVO>();
    for (SourceAnalysisDVO dvo : listStatement) {
        try {
            // 소스내에 존재하는 메소드명.. 접근지 정자 + static + void 등의 잡다한 정보가 담겨있다.
            String methodName = dvo.getMethodName();
            String methodDescription = newInstance.getMethodDescription(methodName);
            MethodDVO methodDVO = null;
            methodDVO = AbstractJavaProgramSpecFile.toMethodDVO(methodName);
            methodDVO.setDescription(methodDescription);
            methodDVOList.add(methodDVO);
        } catch (ProgramSpecSourceException e) {
            e.printStackTrace();
        }
    }
    svo.setMethodDVOList(methodDVOList);
    return svo;
}
Also used : ImportsDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ImportsDVO) UserSourceMetaDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO) ArrayList(java.util.ArrayList) ProgramSpecSVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ProgramSpecSVO) ProgramSpecSourceException(com.kyj.fx.voeditor.visual.exceptions.ProgramSpecSourceException) MethodDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.MethodDVO) SourceAnalysisDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.SourceAnalysisDVO)

Example 3 with UserSourceMetaDVO

use of com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO in project Gargoyle by callakrsos.

the class ProgramSpecUtil method doJsFile.

public static ProgramSpecSVO doJsFile(String projectName, String fileName, AbstractXframeProgramSpecFile newInstance) {
    ProgramSpecSVO svo = new ProgramSpecSVO();
    newInstance.setProjectName(projectName);
    svo.setFile(newInstance);
    String userName = System.getProperty("user.name");
    List<SourceAnalysisDVO> listStatement = newInstance.listStatement();
    UserSourceMetaDVO userSourceMetaDVO = new UserSourceMetaDVO();
    userSourceMetaDVO.setProjectName(projectName);
    userSourceMetaDVO.setSimpleFileName(fileName);
    userSourceMetaDVO.setRealFilePath(newInstance.getFullFileName());
    userSourceMetaDVO.setUserPcName(userName);
    userSourceMetaDVO.setPackages("");
    svo.setUserSourceMetaDVO(userSourceMetaDVO);
    /* 시작 import문 처리 */
    svo.setImportsDVO(new ImportsDVO());
    /* 끝 import문 처리 */
    // 테이블 데이터 바인드
    List<MethodDVO> methodDVOList = new ArrayList<MethodDVO>();
    for (SourceAnalysisDVO dvo : listStatement) {
        try {
            // 소스내에 존재하는 메소드명.. 접근지 정자 + static + void 등의 잡다한 정보가 담겨있다.
            String methodName = dvo.getMethodName();
            String methodDescription = newInstance.getMethodDescription(methodName);
            MethodDVO methodDVO = null;
            methodDVO = AbstractXframeProgramSpecFile.toMethodDVO(methodName);
            methodDVO.setDescription(methodDescription);
            methodDVOList.add(methodDVO);
        } catch (ProgramSpecSourceException e) {
            e.printStackTrace();
        }
    }
    svo.setMethodDVOList(methodDVOList);
    return svo;
}
Also used : ImportsDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ImportsDVO) UserSourceMetaDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO) ArrayList(java.util.ArrayList) ProgramSpecSVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ProgramSpecSVO) ProgramSpecSourceException(com.kyj.fx.voeditor.visual.exceptions.ProgramSpecSourceException) MethodDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.MethodDVO) SourceAnalysisDVO(com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.SourceAnalysisDVO)

Aggregations

ImportsDVO (com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ImportsDVO)3 UserSourceMetaDVO (com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.UserSourceMetaDVO)3 ProgramSpecSourceException (com.kyj.fx.voeditor.visual.exceptions.ProgramSpecSourceException)2 MethodDVO (com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.MethodDVO)2 ProgramSpecSVO (com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.ProgramSpecSVO)2 SourceAnalysisDVO (com.kyj.fx.voeditor.visual.words.spec.auto.msword.vo.SourceAnalysisDVO)2 ArrayList (java.util.ArrayList)2