Enable members sorting in file structure view

This commit is contained in:
Nikolay Krasko
2014-05-27 15:55:42 +04:00
parent 58d9375a25
commit d941deb17c
5 changed files with 29 additions and 20 deletions
@@ -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;
}
}