Class GapPatternPostProcessor
- java.lang.Object
-
- org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent
-
- org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
-
- tools.mdsd.ecoreworkflow.mwe2lib.component.GapPatternPostProcessor
-
- All Implemented Interfaces:
WorkflowComponent
,WorkflowComponentWithID
,IWorkflowComponent
public class GapPatternPostProcessor extends AbstractWorkflowComponent2
-
-
Field Summary
Fields Modifier and Type Field Description protected URIConverter
uriConverter
-
Constructor Summary
Constructors Constructor Description GapPatternPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFolders(GapPatternFolderSet folders)
protected String
convertUri(URI uri)
protected void
invokeInternal(WorkflowContext arg0, ProgressMonitor arg1, Issues arg2)
void
setCharset(Charset charset)
void
setReplacementPattern(String replacementPattern)
void
setSearchPattern(String searchPattern)
Sets the regex which is used to find the occurrences which are supposed to be replaced.-
Methods inherited from class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2
checkConfiguration, checkConfigurationInternal
-
Methods inherited from class org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent
checkRequiredConfigProperty, getBridge, getComponentName, getContainer, getId, getLocation, getLogMessage, invoke, invoke, postInvoke, preInvoke, setContainer, setId, setLocation, setSkipOnErrors
-
-
-
-
Field Detail
-
uriConverter
protected URIConverter uriConverter
-
-
Method Detail
-
setCharset
public void setCharset(Charset charset)
-
addFolders
public void addFolders(GapPatternFolderSet folders)
-
setSearchPattern
public void setSearchPattern(String searchPattern)
Sets the regex which is used to find the occurrences which are supposed to be replaced. The string should contain one string placeholder (%s), which will be used to insert the original class name during execution of this component. If not set, the following default case will be used. The default replacement pattern expects one matching group. If you adapt this regex make sure to adapt the replacement pattern as well."(? It comprises of the following aspects: *
(%s)
: the original class name (inserted by String.format) *\\b(%s)(?=[^a-zA-Z\\d_$])
: the original class name as separate word (preceeded by a word boundary and not followed by an alphanumerical, underscore or an dollar sign (positive lookahead). We can not use word boundary (\b) here as it does not prevent the latter two. *(?: not preceeded by "new " (negative lookbehind) to exclude explicit constructor calls. *
(?!\\W+eINSTANCE\\b)
: not followed by "eINSTANCE" to exclude static eINSTANCE fields in interfaces (negative lookahead).
-
setReplacementPattern
public void setReplacementPattern(String replacementPattern)
-
invokeInternal
protected void invokeInternal(WorkflowContext arg0, ProgressMonitor arg1, Issues arg2)
- Specified by:
invokeInternal
in classAbstractWorkflowComponent
-
-