Skip to content

Commit

Permalink
Fix #582 Content Type selector of Language Configuration Wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Aug 13, 2023
1 parent 950bea9 commit f2ee3c9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}
Expand All @@ -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
Expand Down

0 comments on commit f2ee3c9

Please sign in to comment.