Skip to content

Commit

Permalink
fix: don't implement SortableTreeElement, we don't need to customiz…
Browse files Browse the repository at this point in the history
…e the text shown in the structure view (fixes #659 and #650)
  • Loading branch information
bjansen committed Sep 14, 2023
1 parent b70e21d commit f698730
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.antlr.intellij.plugin.structview;

import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.util.treeView.smartTree.SortableTreeElement;
import com.intellij.ide.util.treeView.smartTree.TreeElement;
import com.intellij.navigation.ItemPresentation;
import com.intellij.navigation.NavigationItem;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiNamedElement;
import com.intellij.psi.PsiRecursiveElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import org.antlr.intellij.plugin.ANTLRv4FileRoot;
Expand All @@ -17,7 +15,7 @@
import java.util.List;
import java.util.Objects;

public class ANTLRv4StructureViewElement implements StructureViewTreeElement, SortableTreeElement {
public class ANTLRv4StructureViewElement implements StructureViewTreeElement {
private final PsiElement element;

public ANTLRv4StructureViewElement(PsiElement element) {
Expand Down Expand Up @@ -48,12 +46,6 @@ public boolean canNavigateToSource() {
((NavigationItem)element).canNavigateToSource();
}

@NotNull
@Override
public String getAlphaSortKey() {
return element instanceof PsiNamedElement ? ((PsiNamedElement) element).getName() : "";
}

@NotNull
@Override
public ItemPresentation getPresentation() {
Expand Down

0 comments on commit f698730

Please sign in to comment.