add API for configuring file colors

This commit is contained in:
Dmitry Jemerov
2015-12-07 19:14:29 +01:00
parent 1a2521a92a
commit b2dcf41ce9
2 changed files with 8 additions and 2 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -44,7 +44,6 @@ public abstract class FileColorManager {
public abstract Project getProject();
@SuppressWarnings({"MethodMayBeStatic"})
@Nullable
public abstract Color getColor(@NotNull String name);
@@ -65,4 +64,6 @@ public abstract class FileColorManager {
@Nullable
public abstract Color getRendererBackground(PsiFile file);
public abstract void addScopeColor(@NotNull String scopeName, @NotNull String colorName, boolean isProjectLevel);
}
@@ -196,6 +196,11 @@ public class FileColorManagerImpl extends FileColorManager implements Persistent
return getRendererBackground(vFile);
}
@Override
public void addScopeColor(@NotNull String scopeName, @NotNull String colorName, boolean isProjectLevel) {
myModel.add(scopeName, colorName, isProjectLevel);
}
@Override
@Nullable
public Color getFileColor(@NotNull final PsiFile file) {