buf.append(count);
buf.append("</td><td class=\"percent pct").append(pct).append("\">");
buf.append(pct);
// if it's an attribute
if (ft instanceof EAttribute) {
EAttribute attr = (EAttribute) ft;
int counta = state.uniqueAttributes.getUniqueAttributes(cls, attr);
buf.append("</td><td class=\"unique uniq").append(counta).append("\">");
buf.append(counta);
} else {
buf.append("</td><td class=\"unique\">");
}
buf.append("</td></tr>\n");
}
// get all the defined supertypes first
for (EClass supertype : sortedClasses(cls.getEAllSuperTypes())) {
int c2 = state.supertypeUsageMap.getUsage(cls, supertype);
String pct2 = getPercent(c2, c3);
buf.append("<tr class=\"super class\"><th class=\"name\">");
if (supertype.isAbstract() || supertype.isInterface()) buf.append("<i>");
buf.append(supertype.getName());
if (supertype.isAbstract() || supertype.isInterface()) buf.append("</i>");
buf.append("</th><td class=\"instances count").append(c2).append("\">");
buf.append(c2);
buf.append("</td><td class=\"percent pct").append(pct2).append("\">");
buf.append(pct2);
buf.append("</td><td class=\"unique\">");
buf.append("</td></tr>\n");
// for every local structural feature
for (EStructuralFeature ft : sortedFeatures(supertype.getEStructuralFeatures())) {
int count = state.featureCount.getFeatureInstanceCount(cls, ft);
String pct = getPercent(count, c2);
buf.append("<tr class=\"feature\">");
buf.append("<th class=\"name\">");
buf.append(ft.getName());
buf.append("</th><td class=\"instances count").append(count).append("\">");
buf.append(count);
buf.append("</td><td class=\"percent pct").append(pct).append("\">");
buf.append(pct);
// if it's an attribute
if (ft instanceof EAttribute) {
EAttribute attr = (EAttribute) ft;
int counta = state.uniqueAttributes.getUniqueAttributes(cls, attr);
buf.append("</td><td class=\"unique uniq").append(counta).append("\">");
buf.append(counta);
} else {
buf.append("</td><td class=\"unique\">");