KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > actions > middlegen > MiddlegenActionDelegate


1 /*
2  * Created on 2 juin 2003
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */

7 package com.bull.eclipse.jonas.actions.middlegen;
8
9 /**
10  * @author Emmanuel RIAS
11  *
12  * To change the template for this generated type comment go to
13  * Window>Preferences>Java>Code Generation>Code and Comments
14  */

15
16 import java.io.File JavaDoc;
17 import java.io.FileInputStream JavaDoc;
18 import java.io.FileOutputStream JavaDoc;
19 import java.io.FileWriter JavaDoc;
20 import java.io.IOException JavaDoc;
21 import java.util.Properties JavaDoc;
22
23 import org.apache.velocity.VelocityContext;
24 import org.apache.velocity.app.VelocityEngine;
25 import org.apache.velocity.exception.MethodInvocationException;
26 import org.apache.velocity.exception.ParseErrorException;
27 import org.apache.velocity.exception.ResourceNotFoundException;
28 import org.eclipse.core.resources.IResource;
29 import org.eclipse.core.runtime.CoreException;
30 import org.eclipse.core.runtime.IPath;
31 import org.eclipse.jdt.internal.ui.JavaPlugin;
32 import org.eclipse.jface.dialogs.InputDialog;
33 import org.eclipse.jface.preference.IPreferenceStore;
34
35 import com.bull.eclipse.jonas.CreateJonasBase;
36 import com.bull.eclipse.jonas.JonasLauncherPlugin;
37 import com.bull.eclipse.jonas.JonasPluginResources;
38 import com.bull.eclipse.jonas.JonasProject;
39 import com.bull.eclipse.jonas.actions.JonasProjectAbstractActionDelegate;
40 import com.bull.eclipse.jonas.utils.AntUtils;
41 import com.bull.eclipse.jonas.utils.EjbManagement;
42 import com.bull.eclipse.jonas.utils.FileUtil;
43 import com.bull.eclipse.jonas.utils.TemplateDirUtil;
44
45 public class MiddlegenActionDelegate extends MiddlegenActionAbstract {
46     
47     public boolean doActionOn(JonasProject prj) throws Exception JavaDoc {
48         this.prj = prj;
49         IPath prjPath = prj.getProject().getLocation();
50                 
51 // middleGenDir = new File(prjPath.append("cmp2persistence").toOSString());
52
// tempMiddlegen = TemplateDirUtil.getTemplateDir().concat(File.separator).concat("middlegen");
53

54         copyConfigurationFile("hibernatepersistence", "cmp2persistence");
55         createPropertiesFile("cmp2");
56         
57         startIHM("ejbdoclet");
58         
59         generateBuildWithVelocity();
60         
61         
62         return false;
63     }
64             
65 }
66
Popular Tags