Search in sources :

Example 1 with ExternalFeatureEnvyDetector

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

the class FMOutEnvy 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 ExternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) ExternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.ExternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Example 2 with ExternalFeatureEnvyDetector

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

the class AMOutEnvy 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 ExternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) ExternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.ExternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Example 3 with ExternalFeatureEnvyDetector

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

the class TMOutEnvy 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 ExternalFeatureEnvyDetector(myModule, count));
    return count.val();
}
Also used : Counter(org.eclipse.titanium.metrics.visitors.Counter) ExternalFeatureEnvyDetector(org.eclipse.titanium.metrics.visitors.ExternalFeatureEnvyDetector) Module(org.eclipse.titan.designer.AST.Module)

Example 4 with ExternalFeatureEnvyDetector

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

the class MMOutEnvy method measure.

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

Aggregations

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