Examples of SourceCodeBuffer


Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
      ThreadLocalToolkit.log(new VelocityException.TemplateNotFound(fontFaceRulesTemplate));
      return null;
    }

    SourceCodeBuffer out = new SourceCodeBuffer();

    try
    {
      VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, mxmlConfiguration.debug(), out, null);
      VelocityContext vc = VelocityManager.getCodeGenContext(util);
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
      ThreadLocalToolkit.log(new VelocityException.TemplateNotFound(styleDefTemplate));
      return null;
    }

    SourceCodeBuffer out = new SourceCodeBuffer();

    try
    {
      VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, mxmlConfiguration.debug(), out, null);
      VelocityContext vc = VelocityManager.getCodeGenContext(util);
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
            ThreadLocalToolkit.log(new TemplateNotFound(templateName));
            return null;
        }

        SourceCodeBuffer sourceCodeBuffer = new SourceCodeBuffer();

        String genFileName = (configuration.getGeneratedDirectory() +
                              File.separatorChar +
                              styleModule.getName() +
                              "-generated.as");

        Source source = compilationUnit.getSource();

        DualModeLineNumberMap lineNumberMap = new DualModeLineNumberMap(source.getNameForReporting(), genFileName);
        styleModule.setLineNumberMap(lineNumberMap);

        try
        {
            VelocityUtil velocityUtil = new VelocityUtil(TEMPLATE_PATH, configuration.debug(),
                                                         sourceCodeBuffer, lineNumberMap);
            VelocityContext velocityContext = VelocityManager.getCodeGenContext(velocityUtil);
            velocityContext.put(STYLE_MODULE_KEY, styleModule);
            template.merge(velocityContext, sourceCodeBuffer);
        }
        catch (Exception e)
        {
            ThreadLocalToolkit.log(new GenerateException(styleModule.getName(), e.getLocalizedMessage()));
            return null;
        }

        String sourceCode = sourceCodeBuffer.toString();

        if (configuration.keepGeneratedActionScript())
        {
            try
            {
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        String className = dataBindingInfo.getWatcherSetupUtilClassName();
        String shortName = className.substring(className.lastIndexOf(DOT) + 1);

        String generatedName = className.replace('.', File.separatorChar) + DOT_AS;

        SourceCodeBuffer out = new SourceCodeBuffer();

        try
        {
            VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, false, out, null);
            VelocityContext velocityContext = VelocityManager.getCodeGenContext(util);
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
      ThreadLocalToolkit.log(new VelocityException.TemplateNotFound(fontFaceRulesTemplate));
      return null;
    }

    SourceCodeBuffer out = new SourceCodeBuffer();

    try
    {
      VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, mxmlConfiguration.debug(), out, null);
      VelocityContext vc = VelocityManager.getCodeGenContext(util);
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
      ThreadLocalToolkit.log(new VelocityException.TemplateNotFound(styleDefTemplate));
      return null;
    }

    SourceCodeBuffer out = new SourceCodeBuffer();

    try
    {
      VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, mxmlConfiguration.debug(), out, null);
      VelocityContext vc = VelocityManager.getCodeGenContext(util);
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        {
            ThreadLocalToolkit.log(new TemplateNotFound(templateName));
            return null;
        }

        SourceCodeBuffer sourceCodeBuffer = new SourceCodeBuffer();

        String genFileName = (configuration.getGeneratedDirectory() +
                              File.separatorChar +
                              styleModule.getName() +
                              "-generated.as");

        Source source = compilationUnit.getSource();

        DualModeLineNumberMap lineNumberMap = new DualModeLineNumberMap(source.getNameForReporting(), genFileName);
        styleModule.setLineNumberMap(lineNumberMap);

        try
        {
            VelocityUtil velocityUtil = new VelocityUtil(TEMPLATE_PATH, configuration.debug(),
                                                         sourceCodeBuffer, lineNumberMap);
            VelocityContext velocityContext = VelocityManager.getCodeGenContext(velocityUtil);
            velocityContext.put(STYLE_MODULE_KEY, styleModule);
            template.merge(velocityContext, sourceCodeBuffer);
        }
        catch (Exception e)
        {
            ThreadLocalToolkit.log(new GenerateException(styleModule.getName(), e.getLocalizedMessage()));
            return null;
        }

        String sourceCode = sourceCodeBuffer.toString();

        if (configuration.keepGeneratedActionScript())
        {
            try
            {
View Full Code Here

Examples of flex2.compiler.mxml.SourceCodeBuffer

        String className = dataBindingInfo.getWatcherSetupUtilClassName();
        String shortName = className.substring(className.lastIndexOf(DOT) + 1);

        String generatedName = className.replace('.', File.separatorChar) + DOT_AS;

        SourceCodeBuffer out = new SourceCodeBuffer();

        try
        {
            VelocityUtil util = new VelocityUtil(TEMPLATE_PATH, false, out, null);
            VelocityContext velocityContext = VelocityManager.getCodeGenContext(util);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.