mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
simple language: fix SimpleStructureViewModel.isAlwaysLeaf (reported by @chrisly42)
This commit is contained in:
parent
047fc44c2f
commit
d2dbc697b4
@ -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;
|
||||
|
||||
@ -7,7 +7,7 @@ import com.intellij.ide.structureView.StructureViewModelBase;
|
||||
import com.intellij.ide.structureView.StructureViewTreeElement;
|
||||
import com.intellij.ide.util.treeView.smartTree.Sorter;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.intellij.sdk.language.psi.SimpleFile;
|
||||
import org.intellij.sdk.language.psi.SimpleProperty;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class SimpleStructureViewModel extends StructureViewModelBase implements
|
||||
@ -30,7 +30,7 @@ public class SimpleStructureViewModel extends StructureViewModelBase implements
|
||||
|
||||
@Override
|
||||
public boolean isAlwaysLeaf(StructureViewTreeElement element) {
|
||||
return element instanceof SimpleFile;
|
||||
return element.getValue() instanceof SimpleProperty;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user