KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > utils > TemplateDirUtil


1 /*
2  * Created on 18 avr. 2003
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  *
7  * (c) Copyright Bull SA 2003.
8  * All Rights Reserved.
9  */

10  
11 package com.bull.eclipse.jonas.utils;
12
13 import org.eclipse.core.runtime.Platform;
14
15 import com.bull.eclipse.jonas.JonasLauncherPlugin;
16
17 /**
18  * @author riase
19  *
20  * To change the template for this generated type comment go to
21  * Window>Preferences>Java>Code Generation>Code and Comments
22  */

23
24 public class TemplateDirUtil {
25     public static String JavaDoc getTemplateDir() {
26         String JavaDoc templateFileLocation = "";
27         templateFileLocation = getBuildFileLocation() + "/template";
28
29         return templateFileLocation;
30     }
31
32     public static String JavaDoc getBuildFileLocation() {
33         String JavaDoc buildFileLocation = "";
34         try{
35             buildFileLocation = Platform.resolve(
36                 JonasLauncherPlugin.getDefault().getDescriptor().getInstallURL()
37             ).getPath();
38         }catch(java.io.IOException JavaDoc e){};
39         return buildFileLocation;
40     }
41     
42 }
43
Popular Tags