Merge branch 'refactor-icons'

This commit is contained in:
Andrey Vlasovskikh
2013-01-16 16:53:31 +04:00
26 changed files with 44 additions and 30 deletions
@@ -57,7 +57,7 @@ public class PythonFacetType extends FacetType<PythonFacet, PythonFacetConfigura
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Python;
return PythonIcons.Python.Python;
}
public static class PythonFrameworkDetector extends FacetBasedFrameworkDetector<PythonFacet, PythonFacetConfiguration> {
@@ -22,7 +22,7 @@ public class PythonFrameworkSupportProvider extends FrameworkSupportProvider {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Python;
return PythonIcons.Python.Python;
}
@NotNull
+1
View File
@@ -4,6 +4,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

@@ -3,10 +3,10 @@ package com.jetbrains.python;
import com.intellij.lang.Language;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.openapi.vfs.VirtualFile;
import icons.PythonPsiApiIcons;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -27,15 +27,12 @@ public class PythonFileType extends LanguageFileType {
public static PythonFileType INSTANCE = new PythonFileType();
private final Icon _icon;
public PythonFileType() {
this(new PythonLanguage());
}
public PythonFileType(Language language) {
super(language);
_icon = IconLoader.getIcon("/com/jetbrains/python/icons/pythonFile.png");
}
@NotNull
@@ -55,7 +52,7 @@ public class PythonFileType extends LanguageFileType {
@NotNull
public Icon getIcon() {
return _icon;
return PythonPsiApiIcons.PythonFile;
}
@Override
@@ -0,0 +1,17 @@
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 PythonPsiApiIcons {
private static Icon load(String path) {
return IconLoader.getIcon(path, PythonPsiApiIcons.class);
}
public static final Icon PythonFile = load("/icons/com/jetbrains/python/pythonFile.png"); // 16x16
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

+1 -1
View File
@@ -13,5 +13,5 @@ public class RestIcons {
return IconLoader.getIcon(path, RestIcons.class);
}
public static final Icon Rst = load("/com/jetbrains/rest/res/rst.png"); // 16x16
public static final Icon Rst = load("/icons/com/jetbrains/rest/rst.png"); // 16x16
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

@@ -26,10 +26,10 @@ public abstract class PythonModuleTypeBase<T extends ModuleBuilder> extends Modu
}
public Icon getBigIcon() {
return PythonIcons.Python.Icons.Python_24;
return PythonIcons.Python.Python_24;
}
public Icon getNodeIcon(final boolean isOpened) {
return PythonIcons.Python.Icons.PythonClosed;
return PythonIcons.Python.PythonClosed;
}
}
@@ -50,6 +50,6 @@ public class BuildoutFacetType extends FacetType<BuildoutFacet, BuildoutFacetCon
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Buildout.Buildout;
return PythonIcons.Python.Buildout.Buildout;
}
}
@@ -38,7 +38,7 @@ public class BuildoutCfgFileType extends LanguageFileType {
@Nullable
public Icon getIcon() {
return PythonIcons.Python.Icons.Buildout.Buildout;
return PythonIcons.Python.Buildout.Buildout;
}
}
@@ -51,7 +51,7 @@ public class PySpecialMethodNamesCompletionContributor extends CompletionContrib
.create(entry.getKey() + entry.getValue().getSignature())
.bold()
.withTypeText("predefined")
.withIcon(PythonIcons.Python.Icons.Nodes.Cyan_dot)
.withIcon(PythonIcons.Python.Nodes.Cyan_dot)
;
result.addElement(TailTypeDecorator.withTail(item, TailType.CASE_COLON));
}
@@ -218,7 +218,7 @@ public class PythonDebugLanguageConsoleView extends JPanel implements ConsoleVie
public ShowDebugConsoleAction(final PythonDebugLanguageConsoleView console) {
super(ExecutionBundle.message("run.configuration.show.command.line.action.name"), null,
PythonIcons.Python.Icons.Debug.CommandLine);
PythonIcons.Python.Debug.CommandLine);
myConsole = console;
}
@@ -23,7 +23,6 @@ import com.jetbrains.python.run.PythonCommandLineState;
import com.jetbrains.python.sdk.PythonSdkType;
import icons.PythonIcons;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
@@ -34,7 +33,7 @@ public class RunPythonConsoleAction extends AnAction implements DumbAware {
public RunPythonConsoleAction() {
super();
getTemplatePresentation().setIcon(PythonIcons.Python.Icons.Python);
getTemplatePresentation().setIcon(PythonIcons.Python.Python);
}
@Override
@@ -89,13 +89,13 @@ public class PyFunctionImpl extends PyPresentableElementImpl<PyFunctionStub> imp
final Property property = getProperty();
if (property != null) {
if (property.getGetter().valueOrNull() == this) {
return PythonIcons.Python.Icons.PropertyGetter;
return PythonIcons.Python.PropertyGetter;
}
if (property.getSetter().valueOrNull() == this) {
return PythonIcons.Python.Icons.PropertySetter;
return PythonIcons.Python.PropertySetter;
}
if (property.getDeleter().valueOrNull() == this) {
return PythonIcons.Python.Icons.PropertyDeleter;
return PythonIcons.Python.PropertyDeleter;
}
return PlatformIcons.PROPERTY_ICON;
}
@@ -48,7 +48,7 @@ public class PythonConfigurationType implements ConfigurationType {
}
public Icon getIcon() {
return PythonIcons.Python.Icons.Python;
return PythonIcons.Python.Python;
}
public ConfigurationFactory[] getConfigurationFactories() {
@@ -94,7 +94,7 @@ public class PythonSdkType extends SdkType {
}
public Icon getIcon() {
return PythonIcons.Python.Icons.Python;
return PythonIcons.Python.Python;
}
@NotNull
@@ -84,6 +84,6 @@ public class IronPythonSdkFlavor extends PythonSdkFlavor {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Dotnet;
return PythonIcons.Python.Dotnet;
}
}
@@ -66,6 +66,6 @@ public class JythonSdkFlavor extends PythonSdkFlavor {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Jython;
return PythonIcons.Python.Jython;
}
}
@@ -77,6 +77,6 @@ public class PyPySdkFlavor extends PythonSdkFlavor {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Pypy;
return PythonIcons.Python.Pypy;
}
}
@@ -229,6 +229,6 @@ public abstract class PythonSdkFlavor {
}
public Icon getIcon() {
return PythonIcons.Python.Icons.Python;
return PythonIcons.Python.Python;
}
}
@@ -118,6 +118,6 @@ public class VirtualEnvSdkFlavor extends CPythonSdkFlavor {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.Virtualenv;
return PythonIcons.Python.Virtualenv;
}
}
@@ -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 = PythonIcons.Python.Icons.Nodes.Lock;
overlay = PythonIcons.Python.Nodes.Lock;
}
else if (myVisibility == Visibility.PREDEFINED) {
overlay = PythonIcons.Python.Icons.Nodes.Cyan_dot;
overlay = PythonIcons.Python.Nodes.Cyan_dot;
}
else if (myVisibility == Visibility.INVISIBLE) {
overlay = PythonIcons.Python.Icons.Nodes.Red_inv_triangle;
overlay = PythonIcons.Python.Nodes.Red_inv_triangle;
}
if (overlay != null) {
icon.setIcon(overlay, 1);
@@ -121,7 +121,7 @@ public class PythonTestConfigurationType implements ConfigurationType {
@Override
public Icon getIcon() {
return PythonIcons.Python.Icons.PythonTests;
return PythonIcons.Python.PythonTests;
}
@NotNull