support content type inheritance in calculations
diff --git a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ConfigurationPointCalculator.java b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ConfigurationPointCalculator.java
index 18cda87..ca58e44 100644
--- a/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ConfigurationPointCalculator.java
+++ b/bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/extensions/ConfigurationPointCalculator.java
@@ -15,6 +15,9 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.part.MultiPageEditorSite;
@@ -39,7 +42,7 @@
protected String fSubContext = null;
/**
- *
+ *
*/
public ConfigurationPointCalculator() {
super();
@@ -72,8 +75,14 @@
points.add(editorClass.getName());
editorClass = editorClass.getSuperclass();
}
- if (fContentType != null && !points.contains(fContentType))
- points.add(fContentType);
+
+ IContentType contentType = Platform.getContentTypeManager().getContentType(fContentType);
+ while (contentType != null && !contentType.getId().equals(IContentTypeManager.CT_TEXT)) {
+ if (!points.contains(contentType.getId()))
+ points.add(contentType.getId());
+ contentType = contentType.getBaseType();
+ }
+
if (!points.contains(fRootClass.getName()))
points.add(fRootClass.getName());
return (String[]) points.toArray(new String[0]);