mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IDEA-96970 Non-existent paths in library editor aren't highlighted anymore (to 12.0.1)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -23,7 +23,9 @@ import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.openapi.vfs.ex.http.HttpFileSystem;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -42,7 +44,7 @@ class ItemElementDescriptor extends NodeDescriptor<ItemElement> {
|
||||
|
||||
@Override
|
||||
public boolean update() {
|
||||
Color color = myElement.isValid()? Color.BLACK : Color.RED;
|
||||
Color color = myElement.isValid()? UIUtil.getListForeground() : JBColor.RED;
|
||||
final boolean changes = !color.equals(myColor);
|
||||
myColor = color;
|
||||
return changes;
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.openapi.roots.ui.configuration.libraryEditor;
|
||||
|
||||
import com.intellij.ide.util.treeView.NodeDescriptor;
|
||||
import com.intellij.ui.ColoredTreeCellRenderer;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -31,7 +32,7 @@ public class LibraryTreeRenderer extends ColoredTreeCellRenderer {
|
||||
if (userObject instanceof NodeDescriptor) {
|
||||
final NodeDescriptor descriptor = (NodeDescriptor)userObject;
|
||||
setIcon(descriptor.getIcon());
|
||||
append(descriptor.toString());
|
||||
append(descriptor.toString(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, descriptor.getColor()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user