public class SaveAsNewFileHandler extends AbstractResultObjectHandler
IJobChangeListener implementation that can be registered on an XtendJob instance or a
M2MJob instance that encloses the latter and saves the result objects
produced by the XtendJob as new files in the workspace.| Constructor and Description |
|---|
SaveAsNewFileHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getContentTypeIdFor(org.eclipse.emf.ecore.EObject object) |
protected java.lang.String |
getFileExtensionFor(org.eclipse.emf.ecore.EObject object) |
protected org.eclipse.core.runtime.IPath |
getProjectRelativeResultPath(org.eclipse.core.resources.IFile inputFile,
org.eclipse.emf.ecore.EObject resultObject) |
protected org.eclipse.core.runtime.IPath |
getResultPath(java.lang.Object inputObject,
org.eclipse.emf.ecore.EObject resultObject) |
protected org.eclipse.core.runtime.IPath |
getUniqueResultPath(java.lang.Object inputObject,
org.eclipse.emf.ecore.EObject resultObject,
java.util.Set<org.eclipse.core.runtime.IPath> allocatedResultPaths) |
protected void |
handleResultObjects(java.util.Map<java.lang.Object,java.util.Collection<?>> resultObjects)
Invoked for handling the the
result objects produced by the XtendJob
behind the last job that has completed execution. |
protected boolean |
shouldSave(org.eclipse.emf.ecore.EObject object) |
handleResultdone, getCheckJob, getM2xJob, getXpandJob, getXtendJobprotected void handleResultObjects(java.util.Map<java.lang.Object,java.util.Collection<?>> resultObjects)
AbstractResultObjectHandlerresult objects produced by the XtendJob
behind the last job that has completed execution.
Clients are expected to override this method and for implementing the required result object handling behavior.
handleResultObjects in class AbstractResultObjectHandlerresultObjects - A map that is keyed by the input objects that had been passed to the XtendJob and yields the
collection of result objects that the XtendJob has produced for each of them as value.AbstractM2xResultHandler.getM2xJob()protected boolean shouldSave(org.eclipse.emf.ecore.EObject object)
protected org.eclipse.core.runtime.IPath getUniqueResultPath(java.lang.Object inputObject,
org.eclipse.emf.ecore.EObject resultObject,
java.util.Set<org.eclipse.core.runtime.IPath> allocatedResultPaths)
protected org.eclipse.core.runtime.IPath getResultPath(java.lang.Object inputObject,
org.eclipse.emf.ecore.EObject resultObject)
protected org.eclipse.core.runtime.IPath getProjectRelativeResultPath(org.eclipse.core.resources.IFile inputFile,
org.eclipse.emf.ecore.EObject resultObject)
protected java.lang.String getFileExtensionFor(org.eclipse.emf.ecore.EObject object)
protected java.lang.String getContentTypeIdFor(org.eclipse.emf.ecore.EObject object)