EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.internal.production.jet
Class JetProductionContributor

java.lang.Object
  extended by org.eclipse.egf.pattern.internal.production.jet.JetProductionContributor
All Implemented Interfaces:
IProductionContributor

public class JetProductionContributor
extends Object
implements IProductionContributor


Constructor Summary
JetProductionContributor()
           
 
Method Summary
 boolean compileTemplate(String patternTemplatePath_p, PatternHandler.PatternData patternData_p)
          Compile given template, if applicable.
 Couple<StringBuilder,StringBuilder> createPatternMatchingTemplates(PatternHandler.PatternData patternData_p, List<ParameterRelation> parameters_p)
          Create pre/post pattern matching templates.
 void fillGenerateHeader(PatternHandler.PatternData patternData_p, AnnotationHandler handler_p)
          Fill, if applicable, generateHeader method of the pattern, if it does not exist or is empty.
protected static void performManifestChanges(PatternHandler.PatternData patternData_p, IPluginChangesCommand command_p)
          Perform changes on manifest file.
protected static void performPluginChanges(PatternHandler.PatternData patternData_p, IPluginChangesCommand command_p)
          Perform changes on plugin.xml file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JetProductionContributor

public JetProductionContributor()
Method Detail

createPatternMatchingTemplates

public Couple<StringBuilder,StringBuilder> createPatternMatchingTemplates(PatternHandler.PatternData patternData_p,
                                                                          List<ParameterRelation> parameters_p)
Description copied from interface: IProductionContributor
Create pre/post pattern matching templates.
Those are supposed to be produced in the generated templates folder.
Their physical form depends on the template engine used (as for the file extension for instance).

Specified by:
createPatternMatchingTemplates in interface IProductionContributor
Parameters:
patternData_p - The structure containing most of the pattern required data for generation.
parameters_p - The fully resolved list of parameters (including parent hierarchy) for considered pattern.
Returns:
A couple of (pre-matching, post-matching) StringBuilder containing resulting template code, null if there is no such content.
See Also:
IProductionContributor.createPatternMatchingTemplates(org.eclipse.egf.pattern.ecore.PatternHandler.PatternData, java.util.List)

compileTemplate

public boolean compileTemplate(String patternTemplatePath_p,
                               PatternHandler.PatternData patternData_p)
                        throws Exception
Description copied from interface: IProductionContributor
Compile given template, if applicable.

Specified by:
compileTemplate in interface IProductionContributor
Returns:
Throws:
Exception
See Also:
IProductionContributor.compileTemplate(java.lang.String, org.eclipse.egf.pattern.ecore.PatternHandler.PatternData)

fillGenerateHeader

public void fillGenerateHeader(PatternHandler.PatternData patternData_p,
                               AnnotationHandler handler_p)
                        throws Exception
Description copied from interface: IProductionContributor
Fill, if applicable, generateHeader method of the pattern, if it does not exist or is empty.
Given content should ensure pattern compilation phase, whether this lead to a valid status or not.
The user will then be able to choose a more convenient content.

Specified by:
fillGenerateHeader in interface IProductionContributor
handler_p - A usable annotation handler, null if none.
Throws:
Exception
See Also:
IProductionContributor.fillGenerateHeader(org.eclipse.egf.pattern.ecore.PatternHandler.PatternData, org.eclipse.egf.pattern.ecore.AnnotationHandler)

performManifestChanges

protected static void performManifestChanges(PatternHandler.PatternData patternData_p,
                                             IPluginChangesCommand command_p)
Perform changes on manifest file.

Parameters:
patternData_p -
command_p -

performPluginChanges

protected static void performPluginChanges(PatternHandler.PatternData patternData_p,
                                           IPluginChangesCommand command_p)
Perform changes on plugin.xml file.

Parameters:
patternData_p -
command_p -

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.