IDEA-164522 Failed to run IDE

This commit is contained in:
Vladimir Krivosheev
2016-11-28 14:39:03 +01:00
parent 9d447ceee2
commit 08091da5a9
2 changed files with 12 additions and 5 deletions
@@ -913,10 +913,10 @@ class SchemeManagerImpl<T : Scheme, MUTABLE_SCHEME : T>(val fileSpec: String,
override fun getCurrentSchemeName() = currentScheme?.name ?: currentPendingSchemeName
private fun processPendingCurrentSchemeName(newScheme: T) {
if (newScheme.name == currentPendingSchemeName) {
setCurrent(newScheme, false)
if (newScheme.name == currentPendingSchemeName) {
setCurrent(newScheme, false)
}
}
}
override fun removeScheme(schemeName: String) = removeFirstScheme(schemes) {it.name == schemeName}
@@ -30,6 +30,7 @@ import com.intellij.openapi.options.FontSize;
import com.intellij.openapi.options.SchemeManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Couple;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.util.JdomKt;
import com.intellij.util.PlatformUtils;
@@ -302,7 +303,8 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial
return getName();
}
public void readExternal(Element parentNode) {
@Override
public void readExternal(@NotNull Element parentNode) {
UISettings settings = UISettings.getInstance();
ColorBlindness blindness = settings == null ? null : settings.COLOR_BLINDNESS;
myValueReader.setAttribute(blindness == null ? null : blindness.name());
@@ -310,7 +312,12 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme, Serial
readScheme(parentNode);
}
else {
for (Element element : parentNode.getChildren(SCHEME_ELEMENT)) {
List<Element> children = parentNode.getChildren(SCHEME_ELEMENT);
if (children.isEmpty()) {
throw new InvalidDataException("Scheme is not valid");
}
for (Element element : children) {
readScheme(element);
}
}