1 package org.eclipse.emf.codegen.ecore.templates.editor; 2 3 import org.eclipse.emf.codegen.ecore.genmodel.*; 4 5 public class BuildProperties 6 { 7 protected static String nl; 8 public static synchronized BuildProperties create(String lineSeparator) 9 { 10 nl = lineSeparator; 11 BuildProperties result = new BuildProperties(); 12 nl = null; 13 return result; 14 } 15 16 protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; 17 protected final String TEXT_1 = ""; 18 protected final String TEXT_2 = "# <copyright>" + NL + "# </copyright>" + NL + "#" + NL + "# "; 19 protected final String TEXT_3 = "Id"; 20 protected final String TEXT_4 = NL + NL + "bin.includes = "; 21 protected final String TEXT_5 = ",\\" + NL + " icons/,\\"; 22 protected final String TEXT_6 = NL + " META-INF/,\\"; 23 protected final String TEXT_7 = NL + " plugin.xml,\\" + NL + " plugin.properties" + NL + "jars.compile.order = "; 24 protected final String TEXT_8 = NL + "source."; 25 protected final String TEXT_9 = " = src/" + NL + "output."; 26 protected final String TEXT_10 = " = bin/"; 27 28 public String generate(Object argument) 29 { 30 StringBuffer stringBuffer = new StringBuffer (); 31 32 46 47 GenModel genModel = (GenModel)argument; 48 String pluginClassesLocation = genModel.isRuntimeJar() ? genModel.getEditorPluginID()+".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 |