📄 createlogicbeandialog.java
字号:
/*
* $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/datasource/dialog/CreateLogicBeanDialog.java,v 1.1.1.1 2004/07/01 09:07:43 wang_j Exp $
* $Revision: 1.1.1.1 $
* $Date: 2004/07/01 09:07:43 $
*
* ====================================================================
*
* The NanJing HopeRun(IT-FOREST) Software License, Version 2.0.0
*
* Copyright 2003-2004 by NanJing HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and
* IT Forest Corporation
* All rights reserved.
*
* This software is the confidential and proprietary information of
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
* You shall not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into with
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
*/
package com.webpump.ui.datasource.dialog;
import java.util.ResourceBundle;
import java.util.Vector;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.swt.widgets.TableItem;
import com.webpump.ui.perspective.MacroResource;
import com.webpump.ui.perspective.WebpumpIDEPlugin;
import java.io.File;
import java.io.FileOutputStream;
import java.net.URL;
import java.sql.SQLException;
import java.sql.*;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.IFileEditorInput;
import com.webpump.ui.base.gui.BaseDialog;
import com.webpump.ui.base.gui.BaseEditor;
import com.webpump.ui.util.CreateFileByXSL;
import com.webpump.ui.wizard.FileUtil;
/**
* Create or modify CreateLogicBeanable Dialog.
*
* @author zhang_tx
* @version 2.0.0 2004-2-24
*/
public class CreateLogicBeanDialog extends BaseDialog{
/** page shown in the dialog*/
private CreateLogicBeanPage m_objPage;
/** the vector which contains the name of tableitem **/
private Vector tablenames = new Vector();
/** the string array which contains the name of tableitem **/
private String []tablename = new String[1000];
private boolean m_bRecovery;
private String m_strPackageName = "";
private String m_strModuleName = "";
private String m_strPrefix = "";
private DatabaseMetaData m_objDbma;
private String []m_strPriKeyList;
private BaseEditor m_objEditor;
/**
* Set ImageDescriptor and WindowTitle
*
*/
public CreateLogicBeanDialog(String projectPath) {
super();
m_strPrefix = projectPath;
setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWPACK);
setDialogSettings(WebpumpIDEPlugin.getDefault().getDialogSettings());
setWindowTitle(WebpumpIDEPlugin.getResourceString(MacroResource.DATASOURCE_DIALOG_TITLE));
}
/**
* Add CreateLogicBeanPage
*/
public void addPages() {
super.addPages();
m_objPage = new CreateLogicBeanPage(m_strPrefix);
addPage(m_objPage);
}
/**
* Define the action after the "finish" button has been selected
* @param monitor
*/
protected void finishPage ( IProgressMonitor monitor) throws InterruptedException, CoreException{
m_bRecovery = m_objPage.getParam();
m_strModuleName = m_objPage.getModuleName();
m_strPackageName = m_objPage.getPackageName();
TableItem []tableitems = m_objPage.getTable().getItems();
for(int i=0;i<tableitems.length;i++){
if(tableitems[i].getChecked()){
tablenames.add(tableitems[i].getText());
}
}
for(int i=0;i<tablenames.toArray().length;i++){
tablename[i] = (String)(tablenames.toArray()[i]);
}
int a= 0;
String sqlQuery = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
sqlQuery +="<sqlQuery>\n";
String xmlcontent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
xmlcontent += "<database>\n";
try
{
//取插
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -