package org.whole.lang.templates.codebase;
import org.whole.lang.model.IEntity;
import org.whole.lang.templates.AbstractTemplateFactory;
import org.whole.lang.templates.AbstractTemplateManager;
import org.whole.lang.templates.ITemplateFactory;
public class ProjectsArtifactsTemplateManager extends AbstractTemplateManager {
private static class SingletonHolder {
private static final ProjectsArtifactsTemplateManager instance = new ProjectsArtifactsTemplateManager();
}
public static ProjectsArtifactsTemplateManager instance() {
return SingletonHolder.instance;
}
private ProjectsArtifactsTemplateManager() {
put("WholeProject", newWholeProject());
put("WholePluginProject", newWholePluginProject());
}
public ITemplateFactory<IEntity> newWholeProject() {
return new AbstractTemplateFactory<IEntity>() {
public void apply(org.whole.lang.builders.IBuilderOperation op) {
org.whole.lang.artifacts.builders.IArtifactsBuilder b0 = (org.whole.lang.artifacts.builders.IArtifactsBuilder) op.wGetBuilder(org.whole.lang.artifacts.reflect.ArtifactsLanguageKit.URI);
b0.Workspace_();
org.whole.lang.commons.builders.ICommonsBuilder b1 = (org.whole.lang.commons.builders.ICommonsBuilder) op.wGetBuilder(org.whole.lang.commons.reflect.CommonsLanguageKit.URI);
b1.Resolver();
b0.Projects_(1);
b0.Project_();
b1.Variable_();
b1.VarType("http://lang.whole.org/Artifacts#Name");
b1.VarName("projectName");
b1.Quantifier("!");
b1._Variable();
b0.Natures_(1);
b0.Nature("org.eclipse.jdt.core.javanature");
b0._Natures();
b0.Metadata_();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.PersistenceKitId("org.whole.lang.xml.codebase.XmlSourcePersistenceKit");
b0._Metadata();
b0.Artifacts_(3);
b0.FileArtifact_();
b0.Name(".classpath");
b1.Resolver();
b1.StageUpFragment_();
org.whole.lang.xml.builders.IXmlBuilder b2 = (org.whole.lang.xml.builders.IXmlBuilder) op.wGetBuilder(org.whole.lang.xml.reflect.XmlLanguageKit.URI);
b2.Document_();
b2.Prolog_();
b2.XMLDecl_();
b2.Version("1.0");
b2.Encoding("UTF-8");
b1.Resolver();
b2._XMLDecl();
b1.Resolver();
b2.Misc();
b2._Prolog();
b2.Element_();
b2.Name("classpath");
b2.Attributes();
b2.Content_(4);
b2.Element_();
b2.Name("classpathentry");
b2.Attributes_(2);
b2.Attribute_();
b2.Name("kind");
b2.Value("src");
b2._Attribute();
b2.Attribute_();
b2.Name("path");
b2.Value("src");
b2._Attribute();
b2._Attributes();
b2.Content();
b2._Element();
b2.Element_();
b2.Name("classpathentry");
b2.Attributes_(2);
b2.Attribute_();
b2.Name("kind");
b2.Value("con");
b2._Attribute();
b2.Attribute_();
b2.Name("path");
b2.Value("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8");
b2._Attribute();
b2._Attributes();
b2.Content();
b2._Element();
b2.Element_();
b2.Name("classpathentry");
b2.Attributes_(2);
b2.Attribute_();
b2.Name("kind");
b2.Value("con");
b2._Attribute();
b2.Attribute_();
b2.Name("path");
b2.Value("org.whole.lang.ide.WHOLERT_CONTAINER");
b2._Attribute();
b2._Attributes();
b2.Content();
b2._Element();
b2.Element_();
b2.Name("classpathentry");
b2.Attributes_(2);
b2.Attribute_();
b2.Name("kind");
b2.Value("output");
b2._Attribute();
b2.Attribute_();
b2.Name("path");
b2.Value("bin");
b2._Attribute();
b2._Attributes();
b2.Content();
b2._Element();
b2._Content();
b2._Element();
b2._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FileArtifact_();
b0.Name(".project");
b1.Resolver();
b1.StageUpFragment_();
b2.Document_();
b2.Prolog_();
b2.XMLDecl_();
b2.Version("1.0");
b2.Encoding("UTF-8");
b1.Resolver();
b2._XMLDecl();
b1.Resolver();
b2.Misc();
b2._Prolog();
b2.Element_();
b2.Name("projectDescription");
b2.Attributes();
b2.Content_(5);
b2.Element_();
b2.Name("name");
b2.Attributes();
b2.Content_(1);
b1.Variable_();
b1.VarType("http://lang.whole.org/Xml#CharData");
b1.VarName("projectName");
b1.Quantifier("!");
b1._Variable();
b2._Content();
b2._Element();
b2.Element_();
b2.Name("comment");
b2.Attributes();
b2.Content();
b2._Element();
b2.Element_();
b2.Name("projects");
b2.Attributes();
b2.Content();
b2._Element();
b2.Element_();
b2.Name("buildSpec");
b2.Attributes();
b2.Content_(2);
b2.Element_();
b2.Name("buildCommand");
b2.Attributes();
b2.Content_(2);
b2.Element_();
b2.Name("name");
b2.Attributes();
b2.Content_(1);
b2.CharData("org.eclipse.jdt.core.javabuilder");
b2._Content();
b2._Element();
b2.Element_();
b2.Name("arguments");
b2.Attributes();
b2.Content();
b2._Element();
b2._Content();
b2._Element();
b2.Element_();
b2.Name("buildCommand");
b2.Attributes();
b2.Content_(2);
b2.Element_();
b2.Name("name");
b2.Attributes();
b2.Content_(1);
b2.CharData("org.whole.lang.ui.WholeBuilder");
b2._Content();
b2._Element();
b2.Element_();
b2.Name("arguments");
b2.Attributes();
b2.Content();
b2._Element();
b2._Content();
b2._Element();
b2._Content();
b2._Element();
b2.Element_();
b2.Name("natures");
b2.Attributes();
b2.Content_(2);
b2.Element_();
b2.Name("nature");
b2.Attributes();
b2.Content_(1);
b2.CharData("org.eclipse.jdt.core.javanature");
b2._Content();
b2._Element();
b2.Element_();
b2.Name("nature");
b2.Attributes();
b2.Content_(1);
b2.CharData("org.whole.lang.ui.WholeNature");
b2._Content();
b2._Element();
b2._Content();
b2._Element();
b2._Content();
b2._Element();
b2._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FolderArtifact_();
b0.Name("src");
b1.Resolver();
b0.Artifacts();
b0._FolderArtifact();
b0._Artifacts();
b1.Variable_();
b1.VarType("http://lang.whole.org/Artifacts#LocationURI");
b1.VarName("locationURI");
b1.Quantifier("?");
b1._Variable();
b0._Project();
b0._Projects();
b0._Workspace();
}
};
}
public ITemplateFactory<IEntity> newWholePluginProject() {
return new AbstractTemplateFactory<IEntity>() {
public void apply(org.whole.lang.builders.IBuilderOperation op) {
org.whole.lang.artifacts.builders.IArtifactsBuilder b0 = (org.whole.lang.artifacts.builders.IArtifactsBuilder) op.wGetBuilder(org.whole.lang.artifacts.reflect.ArtifactsLanguageKit.URI);
b0.Workspace_();
org.whole.lang.commons.builders.ICommonsBuilder b1 = (org.whole.lang.commons.builders.ICommonsBuilder) op.wGetBuilder(org.whole.lang.commons.reflect.CommonsLanguageKit.URI);
b1.Resolver();
b0.Projects_(1);
b0.Project_();
b1.Variable_();
b1.VarType("http://lang.whole.org/Artifacts#Name");
b1.VarName("projectName");
b1.Quantifier("!");
b1._Variable();
b0.Natures_(1);
b0.Nature("org.eclipse.jdt.core.javanature");
b0._Natures();
b0.Metadata_();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.PersistenceKitId("org.whole.lang.xml.codebase.XmlSourcePersistenceKit");
b0._Metadata();
b0.Artifacts_(7);
b0.FolderArtifact_();
b0.Name("src");
b1.Resolver();
b0.Artifacts();
b0._FolderArtifact();
b0.FolderArtifact_();
b0.Name("META-INF");
b0.Metadata_();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.PersistenceKitId("org.whole.lang.text.codebase.TextSourcePersistenceKit");
b0._Metadata();
b0.Artifacts_(1);
b0.FileArtifact_();
b0.Name("MANIFEST.MF");
b1.Resolver();
b1.StageUpFragment_();
org.whole.lang.text.builders.ITextBuilder b2 = (org.whole.lang.text.builders.ITextBuilder) op.wGetBuilder(org.whole.lang.text.reflect.TextLanguageKit.URI);
b2.Document_(27);
b2.Row_(1);
b2.Text("Manifest-Version: 1.0");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-ManifestVersion: 2");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-Name: %pluginName");
b2._Row();
b2.Row_(3);
b2.Text("Bundle-SymbolicName:");
b1.Variable_();
b1.VarType("http://lang.whole.org/Text#Text");
b1.VarName("pluginId");
b1.Quantifier("!");
b1._Variable();
b2.Text("; singleton:=true");
b2._Row();
b2.Row_(2);
b2.Text("Bundle-Version:");
b1.Variable_();
b1.VarType("http://lang.whole.org/Text#Text");
b1.VarName("pluginVersion");
b1.Quantifier("!");
b1._Variable();
b2._Row();
b2.Row_(1);
b2.Text("Bundle-ClassPath: .");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-Vendor: %providerName");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-Localization: plugin");
b2._Row();
b2.Row_(1);
b2.Text("Require-Bundle: org.eclipse.core.runtime,");
b2._Row();
b2.Row_(1);
b2.Text(" org.eclipse.ui,");
b2._Row();
b2.Row_(1);
b2.Text(" org.eclipse.ui.views,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.lang,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.legacy,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.legacy.op,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.core,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.core.op,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.db,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.db.op,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.lang.ui,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.legacy.ui,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.langs.core.ui,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.lang.ui.notations,");
b2._Row();
b2.Row_(1);
b2.Text(" org.whole.lang.gen");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-ActivationPolicy: lazy");
b2._Row();
b2.Row_(1);
b2.Text("Eclipse-RegisterBuddy: org.whole.lang");
b2._Row();
b2.Row_(1);
b2.Text("Bundle-RequiredExecutionEnvironment: JavaSE-1.8");
b2._Row();
b2.Row();
b2._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0._Artifacts();
b0._FolderArtifact();
b0.FileArtifact_();
b0.Name("build.properties");
b0.Metadata_();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.PersistenceKitId("org.whole.lang.text.codebase.TextSourcePersistenceKit");
b0._Metadata();
b1.StageUpFragment_();
b2.Document_(7);
b2.Row_(1);
b2.Text("source.. = src/");
b2._Row();
b2.Row_(1);
b2.Text("output.. = bin/");
b2._Row();
b2.Row_(1);
b2.Text("");
b2._Row();
b2.Row_(1);
b2.Text("bin.includes = META-INF/,\\");
b2._Row();
b2.Row_(1);
b2.Text(" .,\\");
b2._Row();
b2.Row_(1);
b2.Text(" plugin.properties,\\");
b2._Row();
b2.Row_(1);
b2.Text(" plugin.xml");
b2._Row();
b2._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FileArtifact_();
b0.Name(".classpath");
b1.Resolver();
b1.StageUpFragment_();
org.whole.lang.xml.builders.IXmlBuilder b3 = (org.whole.lang.xml.builders.IXmlBuilder) op.wGetBuilder(org.whole.lang.xml.reflect.XmlLanguageKit.URI);
b3.Document_();
b3.Prolog_();
b3.XMLDecl_();
b3.Version("1.0");
b3.Encoding("UTF-8");
b1.Resolver();
b3._XMLDecl();
b1.Resolver();
b3.Misc();
b3._Prolog();
b3.Element_();
b3.Name("classpath");
b3.Attributes();
b3.Content_(4);
b3.Element_();
b3.Name("classpathentry");
b3.Attributes_(2);
b3.Attribute_();
b3.Name("kind");
b3.Value("src");
b3._Attribute();
b3.Attribute_();
b3.Name("path");
b3.Value("src");
b3._Attribute();
b3._Attributes();
b3.Content();
b3._Element();
b3.Element_();
b3.Name("classpathentry");
b3.Attributes_(2);
b3.Attribute_();
b3.Name("kind");
b3.Value("con");
b3._Attribute();
b3.Attribute_();
b3.Name("path");
b3.Value("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8");
b3._Attribute();
b3._Attributes();
b3.Content();
b3._Element();
b3.Element_();
b3.Name("classpathentry");
b3.Attributes_(2);
b3.Attribute_();
b3.Name("kind");
b3.Value("con");
b3._Attribute();
b3.Attribute_();
b3.Name("path");
b3.Value("org.eclipse.pde.core.requiredPlugins");
b3._Attribute();
b3._Attributes();
b3.Content();
b3._Element();
b3.Element_();
b3.Name("classpathentry");
b3.Attributes_(2);
b3.Attribute_();
b3.Name("kind");
b3.Value("output");
b3._Attribute();
b3.Attribute_();
b3.Name("path");
b3.Value("bin");
b3._Attribute();
b3._Attributes();
b3.Content();
b3._Element();
b3._Content();
b3._Element();
b3._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FileArtifact_();
b0.Name(".project");
b1.Resolver();
b1.StageUpFragment_();
b3.Document_();
b3.Prolog_();
b3.XMLDecl_();
b3.Version("1.0");
b3.Encoding("UTF-8");
b1.Resolver();
b3._XMLDecl();
b1.Resolver();
b3.Misc();
b3._Prolog();
b3.Element_();
b3.Name("projectDescription");
b3.Attributes();
b3.Content_(5);
b3.Element_();
b3.Name("name");
b3.Attributes();
b3.Content_(1);
b1.Variable_();
b1.VarType("http://lang.whole.org/Xml#CharData");
b1.VarName("projectName");
b1.Quantifier("!");
b1._Variable();
b3._Content();
b3._Element();
b3.Element_();
b3.Name("comment");
b3.Attributes();
b3.Content();
b3._Element();
b3.Element_();
b3.Name("projects");
b3.Attributes();
b3.Content();
b3._Element();
b3.Element_();
b3.Name("buildSpec");
b3.Attributes();
b3.Content_(3);
b3.Element_();
b3.Name("buildCommand");
b3.Attributes();
b3.Content_(2);
b3.Element_();
b3.Name("name");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.eclipse.jdt.core.javabuilder");
b3._Content();
b3._Element();
b3.Element_();
b3.Name("arguments");
b3.Attributes();
b3.Content();
b3._Element();
b3._Content();
b3._Element();
b3.Element_();
b3.Name("buildCommand");
b3.Attributes();
b3.Content_(2);
b3.Element_();
b3.Name("name");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.eclipse.pde.ManifestBuilder");
b3._Content();
b3._Element();
b3.Element_();
b3.Name("arguments");
b3.Attributes();
b3.Content();
b3._Element();
b3._Content();
b3._Element();
b3.Element_();
b3.Name("buildCommand");
b3.Attributes();
b3.Content_(2);
b3.Element_();
b3.Name("name");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.eclipse.pde.SchemaBuilder");
b3._Content();
b3._Element();
b3.Element_();
b3.Name("arguments");
b3.Attributes();
b3.Content();
b3._Element();
b3._Content();
b3._Element();
b3._Content();
b3._Element();
b3.Element_();
b3.Name("natures");
b3.Attributes();
b3.Content_(3);
b3.Element_();
b3.Name("nature");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.eclipse.pde.PluginNature");
b3._Content();
b3._Element();
b3.Element_();
b3.Name("nature");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.eclipse.jdt.core.javanature");
b3._Content();
b3._Element();
b3.Element_();
b3.Name("nature");
b3.Attributes();
b3.Content_(1);
b3.CharData("org.whole.lang.ui.WholeNature");
b3._Content();
b3._Element();
b3._Content();
b3._Element();
b3._Content();
b3._Element();
b3._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FileArtifact_();
b0.Name("plugin.properties");
b0.Metadata_();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.PersistenceKitId("org.whole.lang.text.codebase.TextSourcePersistenceKit");
b0._Metadata();
b1.StageUpFragment_();
b2.Document_(2);
b2.Row_(2);
b2.Text("pluginName=");
b1.Variable_();
b1.VarType("http://lang.whole.org/Text#Text");
b1.VarName("pluginName");
b1.Quantifier("!");
b1._Variable();
b2._Row();
b2.Row_(2);
b2.Text("providerName=");
b1.Variable_();
b1.VarType("http://lang.whole.org/Text#Text");
b1.VarName("pluginProvider");
b1.Quantifier("!");
b1._Variable();
b2._Row();
b2._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0.FileArtifact_();
b0.Name("plugin.xml");
b1.Resolver();
b1.StageUpFragment_();
b3.Document_();
b3.Prolog_();
b3.XMLDecl_();
b3.Version("1.0");
b3.Encoding("UTF-8");
b1.Resolver();
b3._XMLDecl();
b1.Resolver();
b3.Misc_(1);
b3.PI_();
b3.Name("eclipse");
b3.Instruction("version=\"3.2\"");
b3._PI();
b3._Misc();
b3._Prolog();
b3.Element_();
b3.Name("plugin");
b3.Attributes();
b3.Content();
b3._Element();
b3._Document();
b1._StageUpFragment();
b0._FileArtifact();
b0._Artifacts();
b1.Variable_();
b1.VarType("http://lang.whole.org/Artifacts#LocationURI");
b1.VarName("locationURI");
b1.Quantifier("?");
b1._Variable();
b0._Project();
b0._Projects();
b0._Workspace();
}
};
}
}