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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user