provide element type name for multi-declaration entries; enable in-place rename for those; show local properties as "variable"

#KT-7627 Fixed
This commit is contained in:
Dmitry Jemerov
2015-04-29 19:40:31 +02:00
parent 0582d1947d
commit b1c4a5670a
9 changed files with 57 additions and 41 deletions
@@ -18,6 +18,8 @@ package org.jetbrains.kotlin.psi;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.search.LocalSearchScope;
import com.intellij.psi.search.SearchScope;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -134,4 +136,13 @@ public class JetMultiDeclarationEntry extends JetNamedDeclarationNotStubbed impl
public FqName getFqName() {
return null;
}
@NotNull
@Override
public SearchScope getUseScope() {
JetElement enclosingBlock = JetPsiUtil.getEnclosingElementForLocalDeclaration(this, false);
if (enclosingBlock != null) return new LocalSearchScope(enclosingBlock);
return super.getUseScope();
}
}