Skip to content

Commit

Permalink
fix: sort entries in theme preview grammar dropdown box
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Nov 16, 2023
1 parent fc31998 commit a8518eb
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.graphics.GC;
Expand Down Expand Up @@ -282,6 +283,7 @@ private void createThemePreviewContent(final Composite ancestor) {
grammarsCombo = new ComboViewer(parent);
grammarsCombo.setContentProvider(new GrammarDefinitionContentProvider());
grammarsCombo.setLabelProvider(new GrammarDefinitionLabelProvider());
grammarsCombo.setComparator(new ViewerComparator());
grammarsCombo.addSelectionChangedListener(e -> preview());
grammarsCombo.getControl().setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
grammarsCombo.setInput(grammarRegistryManager);
Expand Down

0 comments on commit a8518eb

Please sign in to comment.