KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > codegen > ecore > templates > model > tests > BuildProperties


1 package org.eclipse.emf.codegen.ecore.templates.model.tests;
2
3 import org.eclipse.emf.codegen.ecore.genmodel.*;
4
5 public class BuildProperties
6 {
7   protected static String JavaDoc nl;
8   public static synchronized BuildProperties create(String JavaDoc lineSeparator)
9   {
10     nl = lineSeparator;
11     BuildProperties result = new BuildProperties();
12     nl = null;
13     return result;
14   }
15
16   protected final String JavaDoc NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
17   protected final String JavaDoc TEXT_1 = "";
18   protected final String JavaDoc TEXT_2 = "# <copyright>" + NL + "# </copyright>" + NL + "#" + NL + "# ";
19   protected final String JavaDoc TEXT_3 = "Id";
20   protected final String JavaDoc TEXT_4 = NL + NL + "bin.includes = ";
21   protected final String JavaDoc TEXT_5 = ",\\";
22   protected final String JavaDoc TEXT_6 = NL + " META-INF/,\\";
23   protected final String JavaDoc TEXT_7 = NL + " plugin.xml,\\" + NL + " plugin.properties" + NL + "jars.compile.order = ";
24   protected final String JavaDoc TEXT_8 = NL + "source.";
25   protected final String JavaDoc TEXT_9 = " = src/" + NL + "output.";
26   protected final String JavaDoc TEXT_10 = " = bin/";
27
28   public String JavaDoc generate(Object JavaDoc argument)
29   {
30     StringBuffer JavaDoc stringBuffer = new StringBuffer JavaDoc();
31     
32 /**
33  * <copyright>
34  *
35  * Copyright (c) 2005 IBM Corporation and others.
36  * All rights reserved. This program and the accompanying materials
37  * are made available under the terms of the Eclipse Public License v1.0
38  * which accompanies this distribution, and is available at
39  * http://www.eclipse.org/legal/epl-v10.html
40  *
41  * Contributors:
42  * IBM - Initial API and implementation
43  *
44  * </copyright>
45  */

46
47     GenModel genModel = (GenModel)argument;
48     String JavaDoc pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getTestsPluginID()+".jar" : ".";
49     stringBuffer.append(TEXT_1);
50     stringBuffer.append(TEXT_2);
51     stringBuffer.append("$");
52     stringBuffer.append(TEXT_3);
53     stringBuffer.append("$");
54     stringBuffer.append(TEXT_4);
55     stringBuffer.append(pluginClassesLocation);
56     stringBuffer.append(TEXT_5);
57     if (genModel.isBundleManifest()) {
58     stringBuffer.append(TEXT_6);
59     }
60     stringBuffer.append(TEXT_7);
61     stringBuffer.append(pluginClassesLocation);
62     stringBuffer.append(TEXT_8);
63     stringBuffer.append(pluginClassesLocation);
64     stringBuffer.append(TEXT_9);
65     stringBuffer.append(pluginClassesLocation);
66     stringBuffer.append(TEXT_10);
67     return stringBuffer.toString();
68   }
69 }
70
Popular Tags