org.eclipse.xtend.profiler
Class ProfilerComponent
java.lang.Object
org.eclipse.emf.mwe.core.container.CompositeComponent
org.eclipse.xtend.profiler.ProfilerComponent
- All Implemented Interfaces:
- org.eclipse.emf.mwe.core.WorkflowComponent, org.eclipse.emf.mwe.core.WorkflowComponentWithID, org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent, VetoableCallback
public class ProfilerComponent
- extends org.eclipse.emf.mwe.core.container.CompositeComponent
- implements VetoableCallback
Use this workflow component to wrap other inside a workflow. Then, refer
to this via idref as a callback. In the end a profiling model will be stored
in the resultslot and can be used with one of the templates.
<component id="profiler" class="org.eclipse.xtend.profiler.ProfilerComponent">
<resultSlot value="profilingResult" />
<component class="org.eclipse.xtend.check.CheckComponent">
<vetoableCallback idRef="profiler" />
...
</component>
<component class="org.eclipse.xtend.XtendComponent">
<vetoableCallback idRef="profiler" />
...
</component>
<component class="org.eclipse.xpand2.Generator">
<vetoableCallback idRef="profiler" />
...
</component>
</component>
<component class="org.eclipse.xpand2.Generator" fileEncoding="ISO-8859-1">
<metaModel idRef="mm"/>
<expand value="org::eclipse::xtend::profiler::templates::Html::Main FOR profilingResult"/>
<outlet overwrite="true" path="profiling"/>
</component>
- Author:
- Heiko Behrens - Initial contribution and API
Fields inherited from class org.eclipse.emf.mwe.core.container.CompositeComponent |
components, log |
Methods inherited from class org.eclipse.emf.mwe.core.container.CompositeComponent |
addBean, addCartridge, addComponent, addFeature, addIf, getBridge, getComponentName, getComponents, getContainer, getId, getLocation, getLogMessage, getName, getOwnLocation, getResource, invoke, postInvoke, preInvoke, put, setContainer, setId, setLocation, setOwnLocation, setResource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProfilerComponent
public ProfilerComponent()
setResultSlot
public void setResultSlot(java.lang.String resultSlot)
getResultSlot
public java.lang.String getResultSlot()
getProfilingResult
public ProfilingResult getProfilingResult()
checkConfiguration
public void checkConfiguration(org.eclipse.emf.mwe.core.issues.Issues issues)
throws org.eclipse.emf.mwe.core.ConfigurationException
- Specified by:
checkConfiguration
in interface org.eclipse.emf.mwe.core.WorkflowComponent
- Overrides:
checkConfiguration
in class org.eclipse.emf.mwe.core.container.CompositeComponent
- Throws:
org.eclipse.emf.mwe.core.ConfigurationException
invoke
public void invoke(org.eclipse.emf.mwe.core.WorkflowContext ctx,
org.eclipse.emf.mwe.core.monitor.ProgressMonitor monitor,
org.eclipse.emf.mwe.core.issues.Issues issues)
- Specified by:
invoke
in interface org.eclipse.emf.mwe.core.WorkflowComponent
- Overrides:
invoke
in class org.eclipse.emf.mwe.core.container.CompositeComponent
finalizeProfiler
public void finalizeProfiler()
prepareProfiler
public void prepareProfiler()
pre
public boolean pre(SyntaxElement ele,
ExecutionContext ctx)
- Description copied from interface:
VetoableCallback
- Called before an element is being processed.
- Specified by:
pre
in interface VetoableCallback
- Parameters:
ele
- The element being processed. Never null.ctx
- The execution context in which processing occurs. Never null.
- Returns:
- true if processing should continue normally, false if this element should be skipped.
post
public void post(SyntaxElement ele,
ExecutionContext ctx,
java.lang.Object expressionResult)
- Description copied from interface:
VetoableCallback
- Called after an element has been processed.
- Specified by:
post
in interface VetoableCallback
- Parameters:
ele
- The element being processed. Never null.ctx
- The execution context in which processing occurs. Never null.expressionResult
- the result of the evaluation (an instance of Type
in analyzation phase) if syntax element was
an instance of Expression