Search in sources :

Example 16 with ICommonsBuilder

use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.

the class FeaturePattern method apply.

public void apply(IBuilderOperation op) {
    IModelsBuilder b0 = (IModelsBuilder) op.wGetBuilder(ModelsLanguageKit.URI);
    ICommonsBuilder cb = (ICommonsBuilder) op.wGetBuilder(CommonsLanguageKit.URI);
    b0.Feature_();
    b0.FeatureModifiers();
    cb.Variable("featureType", "http://lang.whole.org/Models#SimpleName", "MANDATORY");
    cb.Variable("featureName", "http://lang.whole.org/Models#SimpleName", "MANDATORY");
    b0._Feature();
}
Also used : IModelsBuilder(org.whole.lang.models.builders.IModelsBuilder) ICommonsBuilder(org.whole.lang.commons.builders.ICommonsBuilder)

Example 17 with ICommonsBuilder

use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.

the class ArtifactsGeneratorTest method getMetadataPattern.

private IEntity getMetadataPattern() {
    ModelBuilderOperation op = new ModelBuilderOperation();
    IArtifactsBuilder b0 = (IArtifactsBuilder) op.wGetBuilder(ArtifactsLanguageKit.URI);
    ICommonsBuilder cb = (ICommonsBuilder) op.wGetBuilder(CommonsLanguageKit.URI);
    b0.Workspace_();
    cb.Resolver();
    b0.Projects_(1);
    b0.Project_();
    b0.Name("test.java.project2");
    b0.Natures_(1);
    b0.Nature("org.eclipse.jdt.core.javanature");
    b0._Natures();
    cb.Resolver();
    b0.Artifacts_(1);
    b0.FolderArtifact_();
    b0.Name("src/org.whole.lang");
    b0.Metadata_();
    b0.Copyright("Copyright 2004-2013 _name_.");
    b0.License("* All rights reserved. This program and the accompanying materials\n* are made available under the terms of the GNU Lesser General Public License\n* which accompanies this distribution, and is available at\n* http://www.gnu.org/copyleft/lesser.html");
    b0.Author("_name_");
    b0.Attributes_(1);
    b0.Attribute("source");
    b0._Attributes();
    b0._Metadata();
    b0.Artifacts_(1);
    b0.PackageArtifact_();
    b0.Name("org.whole.lang");
    cb.Resolver();
    b0.Artifacts();
    b0._PackageArtifact();
    b0._Artifacts();
    b0._FolderArtifact();
    b0._Artifacts();
    b0._Project();
    b0._Projects();
    b0._Workspace();
    return op.wGetResult();
}
Also used : ModelBuilderOperation(org.whole.lang.builders.ModelBuilderOperation) IArtifactsBuilder(org.whole.lang.artifacts.builders.IArtifactsBuilder) ICommonsBuilder(org.whole.lang.commons.builders.ICommonsBuilder)

Aggregations

ICommonsBuilder (org.whole.lang.commons.builders.ICommonsBuilder)17 ModelBuilderOperation (org.whole.lang.builders.ModelBuilderOperation)8 IArtifactsBuilder (org.whole.lang.artifacts.builders.IArtifactsBuilder)5 IXmlBuilder (org.whole.lang.xml.builders.IXmlBuilder)5 IImpBuilder (org.whole.examples.lang.imp.builders.IImpBuilder)3 IModelsBuilder (org.whole.lang.models.builders.IModelsBuilder)3 IBuilder (org.whole.lang.builders.IBuilder)1 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)1 CommonsGenericBuilderAdapter (org.whole.lang.commons.builders.CommonsGenericBuilderAdapter)1 CommonsSpecificBuilderAdapter (org.whole.lang.commons.builders.CommonsSpecificBuilderAdapter)1 CommonsContentAssistVisitor (org.whole.lang.commons.visitors.CommonsContentAssistVisitor)1 CommonsDynamicCompilerVisitor (org.whole.lang.commons.visitors.CommonsDynamicCompilerVisitor)1 CommonsInterpreterVisitor (org.whole.lang.commons.visitors.CommonsInterpreterVisitor)1 CommonsPrettyPrinterVisitor (org.whole.lang.commons.visitors.CommonsPrettyPrinterVisitor)1 IEntityContext (org.whole.lang.contexts.IEntityContext)1 IOperation (org.whole.lang.operations.IOperation)1 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)1 AbstractTemplateFactory (org.whole.lang.templates.AbstractTemplateFactory)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1