try {
LinkedList<String> names = new LinkedList<String>();
LinkedList<String> uniq = new LinkedList<String>();
JackElement first = (JackElement) sources.getElements().next();
CaoApplication app = first.getApplication();
services.clear();
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(SERVICE_CREATE_NODE);
for (IConfigurationElement e : config) {
String title = e.getAttribute("title");
String appClass = e.getAttribute("application_class");
boolean ok = true;
if (!MString.isEmptyTrim(appClass)) {
ok = false;
// if (!ok) {
for (Class<?> c = app.getClass(); c != null; c = c.getSuperclass())
if (c.getName().equals(appClass)) {
ok = true;
break;
}
// }
if (!ok) {
for (Class<?> i : app.getClass().getInterfaces()) {
if (i.getName().equals(appClass)) {
ok = true;
break;
}
}