| <%@ jet package="org.eclipse.emf.refactor.metrics" class="MetricFinderClass" |
| imports="org.eclipse.emf.refactor.metrics.generator.core.MetricInfo"%> |
| <%MetricInfo info = (MetricInfo) argument; %> |
| package <%=info.getPackage()%>; |
| |
| import java.util.List; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.refactor.metrics.interfaces.IMetricCalculator; |
| |
| public final class <%=info.getClassName()%> implements IMetricCalculator { |
| |
| private List<EObject> context; |
| |
| @Override |
| public void setContext(List<EObject> context) { |
| this.context=context; |
| } |
| |
| @Override |
| public double calculate() { |
| <%=info.getImportPackage()%>.<%=info.getContext()%> in = (<%=info.getImportPackage()%>.<%=info.getContext()%>) context.get(0); |
| double ret = 0.0; |
| |
| // TODO fill 'ret' |
| |
| return ret; |
| } |
| } |