EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.ecore
Class PatternHandler.ProductionOptionsHandler

java.lang.Object
  extended by org.eclipse.egf.pattern.ecore.PatternHandler.ProductionOptionsHandler
Enclosing class:
PatternHandler

public class PatternHandler.ProductionOptionsHandler
extends Object

Production options handler.


Field Summary
protected  boolean _bufferModification
          Should buffers be modified, as opposed to using the default declaration.
protected  boolean _compileTemplate
          Should resulting template file be compiled ?
protected  boolean _enabled
          Are options enabled (true) or not (false) ?
protected  String _patternTemplatePath
          Pattern template path, if default behavior is to be overridden.
 
Constructor Summary
PatternHandler.ProductionOptionsHandler()
           
 
Method Summary
 String getPatternTemplatePath()
           
 boolean isEnabled()
          Are options locally enabled ?
 void setCompileTemplateTo(boolean compile_p)
          Set compile template flag to given one.
 void setEnabled(boolean enabled_p)
          Set options enablement to given value.
 void setModifyBufferTo(boolean modifyBuffer_p)
          Set modify buffer flag to given one.
 void setPatternTemplatePath(String patternTemplatePath_p)
          Set pattern template production relative path.
 boolean shouldCompileTemplate()
           
 boolean shouldModifyBuffer()
          Should template buffer be modified (true), including replacement, or should standard way be used (false) ?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_patternTemplatePath

protected String _patternTemplatePath
Pattern template path, if default behavior is to be overridden.


_compileTemplate

protected boolean _compileTemplate
Should resulting template file be compiled ?


_bufferModification

protected boolean _bufferModification
Should buffers be modified, as opposed to using the default declaration.


_enabled

protected boolean _enabled
Are options enabled (true) or not (false) ?
If false, the pattern annotation will be destroyed at next save time.

Constructor Detail

PatternHandler.ProductionOptionsHandler

public PatternHandler.ProductionOptionsHandler()
Method Detail

getPatternTemplatePath

public String getPatternTemplatePath()
Returns:
the patternTemplatePath

setPatternTemplatePath

public void setPatternTemplatePath(String patternTemplatePath_p)
Set pattern template production relative path.
If set to a not null, non-empty value, then default pattern production behavior is overridden.
The template is no longer produced in templates/generated folder, but in templates/patternTemplatePath_p instead. Set again to null or ICommonConstants.EMPTY_STRING if default behavior must be restored.

Parameters:
patternTemplatePath_p -

shouldCompileTemplate

public boolean shouldCompileTemplate()
Returns:
the compileTemplate

setCompileTemplateTo

public void setCompileTemplateTo(boolean compile_p)
Set compile template flag to given one.
If set to true (the default value), then the pattern template is compiled into a Java class.
If set to false, the pattern template file is assembled, but not compiled into a Java class.

Parameters:
compile_p -

shouldModifyBuffer

public boolean shouldModifyBuffer()
Should template buffer be modified (true), including replacement, or should standard way be used (false) ?

Returns:

setModifyBufferTo

public void setModifyBufferTo(boolean modifyBuffer_p)
Set modify buffer flag to given one.
The buffer modification is required for pattern reporting at runtime.
If set to true (the default value), then the reporting of generation at runtime is active.
If set to false, the default JET behavior is left untouched. That is compatible with EMF-like patterns, but no longer with Pattern Runner execution. Indeed, EMF-like patterns are expecting JET to behave standardly (and have no use of Pattern Runner as the execution environment).

Parameters:
modifyBuffer_p -

isEnabled

public boolean isEnabled()
Are options locally enabled ?

Returns:

setEnabled

public void setEnabled(boolean enabled_p)
Set options enablement to given value.

Parameters:
enabled_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.