diff --git a/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java b/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java index fd5c973a3..2e22c036c 100644 --- a/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java +++ b/org.eclipse.tm4e.languageconfiguration/src/main/java/org/eclipse/tm4e/languageconfiguration/internal/wizards/SelectLanguageConfigurationWizardPage.java @@ -8,6 +8,7 @@ * * Contributors: * Lucas Bullen (Red Hat Inc.) - initial API and implementation + * Sebastian Thomschke (Vegard IT GmbH) - fixed content type selection */ package org.eclipse.tm4e.languageconfiguration.internal.wizards; @@ -229,7 +230,7 @@ public Object[] getChildren(@Nullable final Object parentElement) { final var elements = new ArrayList<>(); final var baseType = (IContentType) parentElement; for (final var contentType : manager.getAllContentTypes()) { - if (Objects.equals(baseType, contentType)) { + if (Objects.equals(baseType, contentType.getBaseType())) { elements.add(contentType); } } @@ -252,7 +253,7 @@ public boolean hasChildren(@Nullable final Object element) { @Override public Object[] getElements(@Nullable final Object inputElement) { - return getChildren(null); + return getChildren(manager.getContentType(IContentTypeManager.CT_TEXT)); } @Override