Got rid of open/closed icon concept, since it is removed from IDEA.
This commit is contained in:
@@ -73,7 +73,7 @@ public final class JetDescriptorIconProvider {
|
||||
|
||||
public static Icon getBaseIcon(@NotNull DeclarationDescriptor descriptor) {
|
||||
if (descriptor instanceof NamespaceDescriptor) {
|
||||
return PlatformIcons.PACKAGE_OPEN_ICON;
|
||||
return PlatformIcons.PACKAGE_ICON;
|
||||
}
|
||||
if (descriptor instanceof FunctionDescriptor) {
|
||||
FunctionDescriptor functionDescriptor = (FunctionDescriptor) descriptor;
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.jetbrains.jet.plugin;
|
||||
|
||||
import com.intellij.ide.IconProvider;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
@@ -48,7 +47,7 @@ public class JetIconProvider extends IconProvider {
|
||||
return mainClass != null && file.getDeclarations().size() == 1 ? getIcon(mainClass, flags) : JetIcons.FILE;
|
||||
}
|
||||
if (psiElement instanceof JetNamespaceHeader) {
|
||||
return (flags & Iconable.ICON_FLAG_OPEN) != 0 ? PlatformIcons.PACKAGE_OPEN_ICON : PlatformIcons.PACKAGE_ICON;
|
||||
return PlatformIcons.PACKAGE_ICON;
|
||||
}
|
||||
if (psiElement instanceof JetNamedFunction) {
|
||||
if (((JetFunction) psiElement).getReceiverTypeRef() != null) {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class JetClassPresenter implements ItemPresentationProvider<JetClass> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(boolean open) {
|
||||
public Icon getIcon(boolean unused) {
|
||||
return JetIconProvider.INSTANCE.getIcon(item, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ public class JetFunctionPresenter implements ItemPresentationProvider<JetNamedFu
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(boolean open) {
|
||||
public Icon getIcon(boolean unused) {
|
||||
return JetIconProvider.INSTANCE.getIcon(function, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.jetbrains.jet.plugin.structureView;
|
||||
import com.intellij.ide.structureView.StructureViewTreeElement;
|
||||
import com.intellij.ide.util.treeView.smartTree.TreeElement;
|
||||
import com.intellij.navigation.ItemPresentation;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.NavigatablePsiElement;
|
||||
import com.intellij.util.Function;
|
||||
@@ -97,11 +96,9 @@ public class JetStructureViewElement implements StructureViewTreeElement {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon(boolean open) {
|
||||
public Icon getIcon(boolean unused) {
|
||||
if (myElement.isValid()) {
|
||||
return PsiIconUtil.getProvidersIcon(
|
||||
myElement,
|
||||
open ? Iconable.ICON_FLAG_OPEN : Iconable.ICON_FLAG_CLOSED);
|
||||
return PsiIconUtil.getProvidersIcon(myElement, 0);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user