skip menu and go to main content

body start

개발환경 - 구현도구

Resolved  Template 기반 Code Generation 에서 오류사항

10.11.28-23:50:16

103

Submitted by 정지범

Assignee 정지범

View737

Priority3

Data Source Explorer 에서 데이터베이스가 연결되지 않은 상태에서 CRUD Program 코드생성을 하기 위하여 위저드 실행시 오류페이지가 나타납니다.

이는 위저드 생성시에 데이터베이스 접속 여부를 체크하지 않아 발생하는 현상입니다.
수정하도록 하겠습니다.

Operating System : All

Severity : Normal

Resolution : Accepted As Bug

Comments on this artfact

0 Comments

정지범

CodeGenTableWizardPage.java 에서 connInfo.getConnectionProfile().connect(); 를 수행하기 전에
connInfo.getConnectionProfile().getConnectionState() 로 접속상태를 체크하고 접속인 경우에만 테이블 내역을 가지고 오도록 처리함.

  • CodeGenTableWizardPage.java.patch (3 KB)
    • @@ -23,11 +23,11 @@
      23 24import net.sf.abstractplugin.EclipseMessageUtils; 25import net.sf.abstractplugin.ImageUtil;
      26import net.sf.abstractplugin.core.EclipseProjectUtils;
      27 28import org.apache.commons.lang.StringUtils; 29import org.apache.log4j.Logger;
      30import org.eclipse.core.resources.IProject;
      29import org.eclipse.core.runtime.IStatus;
      30import org.eclipse.datatools.connectivity.IConnectionProfile;
      31import org.eclipse.datatools.connectivity.sqm.core.definition.DatabaseDefinition; 32import org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCTable; 33import org.eclipse.datatools.modelbase.dbdefinition.PredefinedDataTypeDefinition;
      @@ -44,7 +44,6 @@
      44import org.eclipse.datatools.sqltools.sqlbuilder.model.OmitSchemaInfo; 45import org.eclipse.datatools.sqltools.sqlbuilder.model.SQLDomainModel; 46import org.eclipse.datatools.sqltools.sqlbuilder.provider.rdbschema.AvailableTablesTreeProvider;
      47import org.eclipse.eclipsework.core.wizard.CodeGenerator;
      48import org.eclipse.eclipsework.wizard.EclipseWorkPage; 49import org.eclipse.emf.common.util.EList; 50import org.eclipse.jface.viewers.TreeViewer;
      @@ -66,8 +65,6 @@
      66import egovframework.dev.imp.codegen.template.model.DataModelContext; 67import egovframework.dev.imp.codegen.template.model.Entity; 68import egovframework.dev.imp.codegen.template.util.DataToolsUtil;
      69import egovframework.dev.imp.codegen.template.util.ResourceUtils;
      70import egovframework.dev.imp.codegen.template.util.TemplateUtil;
      71 72/** 73 *
      @@ -85,6 +82,7 @@
      85 * ??? ??? ???? 86 * ------- -------- --------------------------- 87 * 2009.08.03 ??? 최초 ??
      85 * 2010.11.23 ??? ???베이? ???? 체크로직 추??
      88 * 89 * </pre> 90 */
      @@ -237,6 +235,9 @@
      237 238 239 ISQLEditorConnectionInfo connInfo = DataToolsUtil.getConnectionInfo(dbInfoName);
      238 if ( IConnectionProfile.CONNECTED_STATE != connInfo.getConnectionProfile().getConnectionState() ) {
      239 return;
      240 }
      240 connInfo.getConnectionProfile().connect(); 241 242 Connection conn = (Connection)connInfo.getConnectionProfile().getManagedConnection(Connection.class.getName()).getConnection().getRawConnection();

10.11.28-23:53:43

정지범

"Assigned To" was changed from "Nobody" to "정지범"

10.11.28-23:54:15

정지범

Codes changed : r27 [#103] 위저드생성시 데이터베이스 접속여부 체크

10.11.28-23:55:11

정지범

"State" was changed from "Open" to "Closed"

10.11.28-23:55:28

정지범

Codes changed : r28 [#103] 위저드생성시 데이터베이스 접속여부 체크 및 비정상적인 데이터베이스 종료 상태의 Exception 상황 대응

10.11.29-00:16:16