Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-11-02 08:30:55 -0400
committerUwe Stieber2012-11-02 08:30:55 -0400
commit3ac9dde7efadba008fdb684d06542ede3dafbb23 (patch)
tree8ff96e42f5b9fe7566faab365122d44e14c54b15 /target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src
parentb750015ca4072af7cf459e968c6297b689ee11b3 (diff)
downloadorg.eclipse.tcf-3ac9dde7efadba008fdb684d06542ede3dafbb23.tar.gz
org.eclipse.tcf-3ac9dde7efadba008fdb684d06542ede3dafbb23.tar.xz
org.eclipse.tcf-3ac9dde7efadba008fdb684d06542ede3dafbb23.zip
Target Explorer: Fix service contribution not returned correctly if the service interface is declared in a superclass of the service implementation class
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java
index 1de409e6e..836e9abf9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime.services/src/org/eclipse/tcf/te/runtime/services/AbstractServiceManager.java
@@ -182,11 +182,15 @@ public abstract class AbstractServiceManager {
Assert.isNotNull(serviceTypeName);
if (service != null) {
- Class<?>[] interfaces = service.getClass().getInterfaces();
- for (Class<?> interfaze : interfaces) {
- if (serviceTypeName.equals(interfaze.getName())) {
- return true;
+ Class<?> clazz = service.getClass();
+ while (clazz != null) {
+ Class<?>[] interfaces = clazz.getInterfaces();
+ for (Class<?> interfaze : interfaces) {
+ if (serviceTypeName.equals(interfaze.getName())) {
+ return true;
+ }
}
+ clazz = clazz.getSuperclass();
}
}
else if (configElement != null) {

Back to the top