Search in sources :

Example 1 with InternalFeatureEnvyDetector

use of org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector in project titan.EclipsePlug-ins by eclipse.

the class MMInEnvy method measure.

@Override
public Number measure(final MetricData data, final Module module) {
    final Counter innerReferences = new Counter(0);
    final InternalFeatureEnvyDetector detector = new InternalFeatureEnvyDetector(module, innerReferences);
    module.accept(detector);
    return innerReferences.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) InternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector)

Example 2 with InternalFeatureEnvyDetector

use of org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector in project titan.EclipsePlug-ins by eclipse.

the class AMInEnvy method measure.

@Override
public Number measure(final MetricData data, final Def_Altstep altstep) {
    final Counter count = new Counter(0);
    final Module myModule = altstep.getMyScope().getModuleScope();
    altstep.accept(new InternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) InternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Example 3 with InternalFeatureEnvyDetector

use of org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector in project titan.EclipsePlug-ins by eclipse.

the class FMInEnvy method measure.

@Override
public Number measure(final MetricData data, final Def_Function function) {
    final Counter count = new Counter(0);
    final Module myModule = function.getMyScope().getModuleScope();
    function.accept(new InternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) InternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Example 4 with InternalFeatureEnvyDetector

use of org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector in project titan.EclipsePlug-ins by eclipse.

the class TMInEnvy method measure.

@Override
public Number measure(final MetricData data, final Def_Testcase testcase) {
    final Counter count = new Counter(0);
    final Module myModule = testcase.getMyScope().getModuleScope();
    testcase.accept(new InternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) InternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Aggregations

Counter (org.eclipse.titanium.metrics.visitors.Counter)4 InternalFeatureEnvyDetector (org.eclipse.titanium.metrics.visitors.InternalFeatureEnvyDetector)4 Module (org.eclipse.titan.designer.AST.Module)3