Enable members sorting in file structure view
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,13 +17,22 @@
|
||||
package org.jetbrains.jet.plugin.structureView;
|
||||
|
||||
import com.intellij.ide.structureView.StructureViewModelBase;
|
||||
import com.intellij.ide.util.treeView.smartTree.Sorter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.psi.JetDeclaration;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
|
||||
public class JetStructureViewModel extends StructureViewModelBase {
|
||||
private static final Sorter[] sorters = new Sorter[] {Sorter.ALPHA_SORTER};
|
||||
|
||||
public JetStructureViewModel(@NotNull JetFile jetFile) {
|
||||
super(jetFile, new JetStructureViewElement(jetFile));
|
||||
withSuitableClasses(JetDeclaration.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Sorter[] getSorters() {
|
||||
return sorters;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
-InheritedMembers.kt
|
||||
Test (<root>)
|
||||
Test
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
-Render.kt
|
||||
test1(): Unit
|
||||
test2(String?): Unit
|
||||
test3(T, U): Unit
|
||||
test4(T): Unit
|
||||
test5(): String
|
||||
test6(): Comparable<String>
|
||||
extension1() on String: Unit
|
||||
extension2() on Comparable<T>: Unit
|
||||
a: Int
|
||||
a: String on Comparable<T>
|
||||
b: Any
|
||||
A1
|
||||
-A2
|
||||
a: Int
|
||||
@@ -26,15 +15,26 @@
|
||||
-<class object>
|
||||
test(): Unit
|
||||
-A7
|
||||
a: Int
|
||||
<class initializer>
|
||||
a: Int
|
||||
a: Int
|
||||
a: String on Comparable<T>
|
||||
b: Any
|
||||
-Enum1 : Enum<Enum1>
|
||||
FIRST : Enum1
|
||||
SECOND : Enum1
|
||||
Trait
|
||||
Trait1 : Trait
|
||||
extension1() on String: Unit
|
||||
extension2() on Comparable<T>: Unit
|
||||
test1(): Unit
|
||||
test2(String?): Unit
|
||||
test3(T, U): Unit
|
||||
test4(T): Unit
|
||||
test5(): String
|
||||
test6(): Comparable<String>
|
||||
TestWithWhere
|
||||
testWithWhere(): Unit
|
||||
Trait
|
||||
Trait1 : Trait
|
||||
withDefaulArgs(Int = ..., String = ...): Unit
|
||||
-WithDefaultArgs
|
||||
a: Int
|
||||
withDefaulArgs(Int = ..., String = ...): Unit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-SeveralClasses.kt
|
||||
A
|
||||
B
|
||||
Some : B, A
|
||||
Other : A
|
||||
Some : B, A
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-Simple.kt
|
||||
-Test
|
||||
str: String
|
||||
some: Int
|
||||
foo(): Int
|
||||
other(): Unit
|
||||
some: Int
|
||||
str: String
|
||||
|
||||
Reference in New Issue
Block a user