simple language: fix SimpleStructureViewModel.isAlwaysLeaf (reported by @chrisly42)

This commit is contained in:
Yann Cébron 2021-07-20 14:08:21 +02:00
parent 047fc44c2f
commit d2dbc697b4

View File

@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.intellij.sdk.language; package org.intellij.sdk.language;
@ -7,7 +7,7 @@ import com.intellij.ide.structureView.StructureViewModelBase;
import com.intellij.ide.structureView.StructureViewTreeElement; import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.util.treeView.smartTree.Sorter; import com.intellij.ide.util.treeView.smartTree.Sorter;
import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFile;
import org.intellij.sdk.language.psi.SimpleFile; import org.intellij.sdk.language.psi.SimpleProperty;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
public class SimpleStructureViewModel extends StructureViewModelBase implements public class SimpleStructureViewModel extends StructureViewModelBase implements
@ -30,7 +30,7 @@ public class SimpleStructureViewModel extends StructureViewModelBase implements
@Override @Override
public boolean isAlwaysLeaf(StructureViewTreeElement element) { public boolean isAlwaysLeaf(StructureViewTreeElement element) {
return element instanceof SimpleFile; return element.getValue() instanceof SimpleProperty;
} }
} }