Replaced hard-coded gray color
This commit is contained in:
@@ -35,9 +35,9 @@ import com.intellij.codeInsight.lookup.LookupElementDecorator
|
|||||||
import com.intellij.codeInsight.lookup.LookupElementPresentation
|
import com.intellij.codeInsight.lookup.LookupElementPresentation
|
||||||
import org.jetbrains.jet.lang.types.JetType
|
import org.jetbrains.jet.lang.types.JetType
|
||||||
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
||||||
import java.awt.Color
|
|
||||||
import com.intellij.codeInsight.lookup.DefaultLookupItemRenderer
|
import com.intellij.codeInsight.lookup.DefaultLookupItemRenderer
|
||||||
import org.jetbrains.jet.lang.types.TypeUtils
|
import org.jetbrains.jet.lang.types.TypeUtils
|
||||||
|
import com.intellij.codeInsight.lookup.impl.LookupCellRenderer
|
||||||
|
|
||||||
public class LookupElementFactory(
|
public class LookupElementFactory(
|
||||||
private val receiverTypes: Collection<JetType>
|
private val receiverTypes: Collection<JetType>
|
||||||
@@ -78,7 +78,7 @@ public class LookupElementFactory(
|
|||||||
presentation.setItemTextBold(true)
|
presentation.setItemTextBold(true)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
presentation.setItemTextForeground(Color.GRAY)
|
presentation.setItemTextForeground(LookupCellRenderer.getGrayedForeground(false))
|
||||||
// gray all tail fragments too:
|
// gray all tail fragments too:
|
||||||
val fragments = presentation.getTailFragments()
|
val fragments = presentation.getTailFragments()
|
||||||
presentation.clearTail()
|
presentation.clearTail()
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.google.gson.JsonObject;
|
|||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.intellij.codeInsight.lookup.LookupElement;
|
import com.intellij.codeInsight.lookup.LookupElement;
|
||||||
import com.intellij.codeInsight.lookup.LookupElementPresentation;
|
import com.intellij.codeInsight.lookup.LookupElementPresentation;
|
||||||
|
import com.intellij.codeInsight.lookup.impl.LookupCellRenderer;
|
||||||
import com.intellij.openapi.util.text.StringUtil;
|
import com.intellij.openapi.util.text.StringUtil;
|
||||||
import com.intellij.ui.JBColor;
|
import com.intellij.ui.JBColor;
|
||||||
import com.intellij.util.ArrayUtil;
|
import com.intellij.util.ArrayUtil;
|
||||||
@@ -326,7 +327,7 @@ public class ExpectedCompletionUtils {
|
|||||||
}
|
}
|
||||||
Color foreground = presentation.getItemTextForeground();
|
Color foreground = presentation.getItemTextForeground();
|
||||||
if (!foreground.equals(JBColor.foreground())) {
|
if (!foreground.equals(JBColor.foreground())) {
|
||||||
assert foreground.equals(Color.GRAY);
|
assert foreground.equals(LookupCellRenderer.getGrayedForeground(false));
|
||||||
if (builder.length() > 0) builder.append(" ");
|
if (builder.length() > 0) builder.append(" ");
|
||||||
builder.append("grayed");
|
builder.append("grayed");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user