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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
uriConverter
-
-
Constructor Details
-
GapPatternPostProcessor
public GapPatternPostProcessor()
-
-
Method Details
-
setCharset
-
addFolders
-
setSearchPattern
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."(?<!\\bnew\\W)\\b(%s)(?=[^a-zA-Z\\d_$])(?!\\W+eINSTANCE\\b)"
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. *(?<!\\bnew\\W)
: 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
-
invokeInternal
- Specified by:
invokeInternal
in classAbstractWorkflowComponent
-
convertUri
-