1 package com.stateofflow.eclipse.metrics.preferences.builder;
2
3 import java.util.Collection;
4
5 import org.eclipse.jface.preference.FieldEditor;
6 import org.eclipse.jface.preference.IPreferenceStore;
7 import org.eclipse.swt.widgets.Composite;
8 import org.eclipse.swt.widgets.Group;
9 import org.eclipse.swt.widgets.TabFolder;
10
11 import com.stateofflow.eclipse.metrics.calculators.cohesion.LackOfCohesionInMethodsCalculator;
12
13 public final class LackOfCohesionTabBuilder extends TabBuilder {
14 public LackOfCohesionTabBuilder(final Collection<FieldEditor> fieldEditors, final IPreferenceStore preferenceStore) {
15 super(fieldEditors, preferenceStore);
16 }
17
18 @Override
19 public void create(final TabFolder folder) {
20 final Composite root = createCompositeForTabItem(folder, "Cohesion", "Lack of Cohesion in Methods Metrics");
21 final Group group = createGroupForPreferredUpperBounds(root);
22 addEnableMetricFields(group, LackOfCohesionInMethodsCalculator.CHIDAMBER_KEMERER_METRIC_ID, "Chidamber and Kimerer");
23 addEnableMetricFields(group, LackOfCohesionInMethodsCalculator.HENDERSON_SELLERS_METRIC_ID, "Henderson-Sellers (%)");
24 addEnableMetricFields(group, LackOfCohesionInMethodsCalculator.TOTAL_CORRELATION_METRIC_ID, "Total Correlation (%)");
25 addEnableMetricFields(group, LackOfCohesionInMethodsCalculator.PAIRWISE_FIELD_IRRELATION_METRIC_ID, "Pairwise Field Irrelation (%)");
26 }
27 }
28