1 package org.eclipse.emf.examples.jet.article2.codegen; 2 3 4 import org.eclipse.core.runtime.Platform; 5 6 7 13 public class Config 14 { 15 16 private Object mModel; 17 18 private String mPluginId; 19 20 private String mClasspathVariable; 21 22 private String mTemplateRelativeUri; 23 24 private String mMergeXmlRelativeUri; 25 26 private String mTargetFolder; 27 28 private String mTargetFile; 29 30 private String mPackageName; 31 32 private boolean mForceOverwrite = true; 33 34 37 public Config() 38 { 39 } 40 41 46 public Object getModel() 47 { 48 return mModel; 49 } 50 51 57 public void setModel(Object object) 58 { 59 mModel = object; 60 } 61 62 70 public String getPluginId() 71 { 72 return mPluginId; 73 } 74 75 84 public void setPluginId(String id) 85 { 86 mPluginId = id; 87 } 88 89 95 public String getMergeXmlRelativeUri() 96 { 97 return mMergeXmlRelativeUri; 98 } 99 100 107 public void setMergeXmlRelativeUri(String uri) 108 { 109 mMergeXmlRelativeUri = uri; 110 } 111 112 117 public String getTemplateRelativeUri() 118 { 119 return mTemplateRelativeUri; 120 } 121 122 128 public void setTemplateRelativeUri(String uri) 129 { 130 mTemplateRelativeUri = uri; 131 } 132 133 140 public String getTargetFolder() 141 { 142 return mTargetFolder; 143 } 144 145 153 public void setTargetFolder(String folder) 154 { 155 mTargetFolder = folder; 156 } 157 158 163 public String getPackageName() 164 { 165 return mPackageName; 166 } 167 168 174 public void setPackageName(String name) 175 { 176 mPackageName = name; 177 } 178 179 185 public boolean isForceOverwrite() 186 { 187 return mForceOverwrite; 188 } 189 190 196 public void setForceOverwrite(boolean force) 197 { 198 mForceOverwrite = force; 199 } 200 201 208 public String getTemplateFullUri() 209 { 210 return getUri(getPluginId(), getTemplateRelativeUri()); 211 } 212 213 222 public String getMergeXmlFullUri() 223 { 224 return getUri(getPluginId(), getMergeXmlRelativeUri()); 225 } 226 227 private String getUri(String pluginId, String relativeUri) 228 { 229 String base = Platform.getBundle(pluginId).getEntry("/").toString(); 230 String result = base + relativeUri; 231 return result; 232 } 233 234 239 public String getTargetFile() 240 { 241 return mTargetFile; 242 } 243 244 250 public void setTargetFile(String name) 251 { 252 mTargetFile = name; 253 } 254 255 261 public String getClasspathVariable() 262 { 263 return mClasspathVariable; 264 } 265 266 273 public void setClasspathVariable(String name) 274 { 275 mClasspathVariable = name; 276 } 277 278 } | Popular Tags |