mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Inline some static fields referencing newly introduced generated *Icons classes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
skip: *
|
||||
@@ -1,18 +0,0 @@
|
||||
package icons;
|
||||
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* NOTE THIS FILE IS AUTO-GENERATED by the build/scripts/icons.gant
|
||||
* Don't repeat mistakes of others ;-)
|
||||
*/
|
||||
public class PythonHelpersIcons {
|
||||
private static Icon load(String path) {
|
||||
return IconLoader.getIcon(path, PythonHelpersIcons.class);
|
||||
}
|
||||
|
||||
public static final Icon Keybd_closed = load("/coverage/htmlfiles/keybd_closed.png"); // 35x12
|
||||
public static final Icon Keybd_open = load("/coverage/htmlfiles/keybd_open.png"); // 35x12
|
||||
}
|
||||
@@ -26,7 +26,6 @@ import java.util.List;
|
||||
* @author yole
|
||||
*/
|
||||
public class PythonFacetType extends FacetType<PythonFacet, PythonFacetConfiguration> {
|
||||
public static final Icon ICON = PythonIcons.Python.Icons.Python;
|
||||
|
||||
@NonNls
|
||||
private static final String ID = "Python";
|
||||
@@ -58,7 +57,7 @@ public class PythonFacetType extends FacetType<PythonFacet, PythonFacetConfigura
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return ICON;
|
||||
return PythonIcons.Python.Icons.Python;
|
||||
}
|
||||
|
||||
public static class PythonFrameworkDetector extends FacetBasedFrameworkDetector<PythonFacet, PythonFacetConfiguration> {
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.intellij.ide.util.frameworkSupport.FrameworkSupportProvider;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleType;
|
||||
import com.jetbrains.python.module.PythonModuleType;
|
||||
import icons.PythonIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -21,7 +22,7 @@ public class PythonFrameworkSupportProvider extends FrameworkSupportProvider {
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return PythonFacetType.ICON;
|
||||
return PythonIcons.Python.Icons.Python;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.jetbrains.python;
|
||||
|
||||
import icons.PythonIcons;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Preloads python-specific icons.
|
||||
* User: dcheryasov
|
||||
* Date: Oct 29, 2008
|
||||
*/
|
||||
public interface PyIcons {
|
||||
@NonNls String DATA_ROOT = "icons/"; /*"/com/jetbrains/python/PyIcons";*/
|
||||
|
||||
Icon PRIVATE = PythonIcons.Python.Icons.Nodes.Lock;
|
||||
Icon PREDEFINED = PythonIcons.Python.Icons.Nodes.Cyan_dot;
|
||||
Icon INVISIBLE = PythonIcons.Python.Icons.Nodes.Red_inv_triangle;
|
||||
}
|
||||
@@ -48,10 +48,8 @@ public class BuildoutFacetType extends FacetType<BuildoutFacet, BuildoutFacetCon
|
||||
return (BuildoutFacetType)FacetTypeRegistry.getInstance().findFacetType(ID);
|
||||
}
|
||||
|
||||
public final static Icon BUILDOUT_ICON = PythonIcons.Python.Icons.Buildout.Buildout;
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return BUILDOUT_ICON;
|
||||
return PythonIcons.Python.Icons.Buildout.Buildout;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.jetbrains.python.buildout.config;
|
||||
|
||||
import com.intellij.openapi.fileTypes.LanguageFileType;
|
||||
import com.jetbrains.python.buildout.BuildoutFacetType;
|
||||
import icons.PythonIcons;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -38,7 +38,7 @@ public class BuildoutCfgFileType extends LanguageFileType {
|
||||
|
||||
@Nullable
|
||||
public Icon getIcon() {
|
||||
return BuildoutFacetType.BUILDOUT_ICON;
|
||||
return PythonIcons.Python.Icons.Buildout.Buildout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@ import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||||
import com.intellij.codeInsight.lookup.TailTypeDecorator;
|
||||
import com.intellij.util.ProcessingContext;
|
||||
import com.jetbrains.python.PyIcons;
|
||||
import com.jetbrains.python.PyNames;
|
||||
import com.jetbrains.python.PythonLanguage;
|
||||
import com.jetbrains.python.psi.PyClass;
|
||||
import com.jetbrains.python.psi.PyFunction;
|
||||
import icons.PythonIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -51,7 +51,7 @@ public class PySpecialMethodNamesCompletionContributor extends CompletionContrib
|
||||
.create(entry.getKey() + entry.getValue().getSignature())
|
||||
.bold()
|
||||
.withTypeText("predefined")
|
||||
.withIcon(PyIcons.PREDEFINED)
|
||||
.withIcon(PythonIcons.Python.Icons.Nodes.Cyan_dot)
|
||||
;
|
||||
result.addElement(TailTypeDecorator.withTail(item, TailType.CASE_COLON));
|
||||
}
|
||||
|
||||
@@ -44,9 +44,6 @@ import static com.jetbrains.python.psi.impl.PyCallExpressionHelper.interpretAsMo
|
||||
* Implements PyFunction.
|
||||
*/
|
||||
public class PyFunctionImpl extends PyPresentableElementImpl<PyFunctionStub> implements PyFunction {
|
||||
private static final Icon PROPERTY_GETTER = PythonIcons.Python.Icons.PropertyGetter;
|
||||
private static final Icon PROPERTY_SETTER = PythonIcons.Python.Icons.PropertySetter;
|
||||
private static final Icon PROPERTY_DELETER = PythonIcons.Python.Icons.PropertyDeleter;
|
||||
|
||||
public PyFunctionImpl(ASTNode astNode) {
|
||||
super(astNode);
|
||||
@@ -92,13 +89,13 @@ public class PyFunctionImpl extends PyPresentableElementImpl<PyFunctionStub> imp
|
||||
final Property property = getProperty();
|
||||
if (property != null) {
|
||||
if (property.getGetter().valueOrNull() == this) {
|
||||
return PROPERTY_GETTER;
|
||||
return PythonIcons.Python.Icons.PropertyGetter;
|
||||
}
|
||||
if (property.getSetter().valueOrNull() == this) {
|
||||
return PROPERTY_SETTER;
|
||||
return PythonIcons.Python.Icons.PropertySetter;
|
||||
}
|
||||
if (property.getDeleter().valueOrNull() == this) {
|
||||
return PROPERTY_DELETER;
|
||||
return PythonIcons.Python.Icons.PropertyDeleter;
|
||||
}
|
||||
return PlatformIcons.PROPERTY_ICON;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ public class PythonConfigurationType implements ConfigurationType {
|
||||
return null;
|
||||
}
|
||||
|
||||
private final Icon _icon = PythonIcons.Python.Icons.Python;
|
||||
|
||||
private static class PythonConfigurationFactory extends ConfigurationFactory {
|
||||
protected PythonConfigurationFactory(ConfigurationType configurationType) {
|
||||
super(configurationType);
|
||||
@@ -50,7 +48,7 @@ public class PythonConfigurationType implements ConfigurationType {
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return _icon;
|
||||
return PythonIcons.Python.Icons.Python;
|
||||
}
|
||||
|
||||
public ConfigurationFactory[] getConfigurationFactories() {
|
||||
|
||||
@@ -9,9 +9,9 @@ import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.ui.LayeredIcon;
|
||||
import com.intellij.util.Function;
|
||||
import com.jetbrains.python.PyIcons;
|
||||
import com.jetbrains.python.PyNames;
|
||||
import com.jetbrains.python.psi.*;
|
||||
import icons.PythonIcons;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -275,13 +275,13 @@ public class PyStructureViewElement implements StructureViewTreeElement {
|
||||
icon.setIcon(normal_icon, 0);
|
||||
Icon overlay = null;
|
||||
if (myVisibility == Visibility.PRIVATE || myVisibility == Visibility.PROTECTED) {
|
||||
overlay = PyIcons.PRIVATE;
|
||||
overlay = PythonIcons.Python.Icons.Nodes.Lock;
|
||||
}
|
||||
else if (myVisibility == Visibility.PREDEFINED) {
|
||||
overlay = PyIcons.PREDEFINED;
|
||||
overlay = PythonIcons.Python.Icons.Nodes.Cyan_dot;
|
||||
}
|
||||
else if (myVisibility == Visibility.INVISIBLE) {
|
||||
overlay = PyIcons.INVISIBLE;
|
||||
overlay = PythonIcons.Python.Icons.Nodes.Red_inv_triangle;
|
||||
}
|
||||
if (overlay != null) {
|
||||
icon.setIcon(overlay, 1);
|
||||
|
||||
@@ -29,8 +29,6 @@ public class PythonTestConfigurationType implements ConfigurationType {
|
||||
return ConfigurationTypeUtil.findConfigurationType(PythonTestConfigurationType.class);
|
||||
}
|
||||
|
||||
private static final Icon ICON = PythonIcons.Python.Icons.PythonTests;
|
||||
|
||||
private static class PythonUnitTestConfigurationFactory extends ConfigurationFactory {
|
||||
protected PythonUnitTestConfigurationFactory(ConfigurationType configurationType) {
|
||||
super(configurationType);
|
||||
@@ -123,7 +121,7 @@ public class PythonTestConfigurationType implements ConfigurationType {
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return ICON;
|
||||
return PythonIcons.Python.Icons.PythonTests;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user