]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | package no.uio.ifi.refaktor.popup.actions; |
2 | ||
3 | import no.uio.ifi.refaktor.metrics.RefaktorCyclomaticComplexity; | |
4 | ||
5 | import org.eclipse.jface.action.IAction; | |
6 | import org.eclipse.jface.dialogs.MessageDialog; | |
7 | ||
8 | import com.stateofflow.eclipse.metrics.metric.Metric; | |
9 | ||
10 | public class CyclomaticComplexityAction extends IMethodAction { | |
11 | ||
12 | @Override | |
13 | public void run(IAction action) { | |
14 | Metric metric = new RefaktorCyclomaticComplexity().measure(m); | |
15 | MessageDialog.openInformation( | |
16 | shell, | |
17 | "no.uio.ifi.refaktor", | |
18 | "Cyclomatic Complexity for '" + metric.getLocation().getMethodInfo().getSimpleName() + "' is " + metric.getValue()); | |
19 | } | |
20 | ||
21 | } |