mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-164522 Failed to run IDE
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
+9
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user