mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-574. Search results error mark color should be configurable by error mark color, not background color.
This commit is contained in:
@@ -153,10 +153,7 @@ public class HighlightManagerImpl extends HighlightManager implements ProjectCom
|
||||
if (hideByTextChange) {
|
||||
flags |= HighlightManagerImpl.HIDE_BY_TEXT_CHANGE;
|
||||
}
|
||||
Color scrollmarkColor = null;
|
||||
if (attributes.getBackgroundColor() != null) {
|
||||
scrollmarkColor = attributes.getBackgroundColor().darker();
|
||||
}
|
||||
Color scrollmarkColor = getScrollMarkColor(attributes);
|
||||
|
||||
for (int i = 0; i < occurrences.length; i++) {
|
||||
PsiReference occurrence = occurrences[i];
|
||||
@@ -177,10 +174,7 @@ public class HighlightManagerImpl extends HighlightManager implements ProjectCom
|
||||
if (hideByTextChange) {
|
||||
flags |= HighlightManagerImpl.HIDE_BY_TEXT_CHANGE;
|
||||
}
|
||||
Color scrollmarkColor = null;
|
||||
if (attributes.getBackgroundColor() != null) {
|
||||
scrollmarkColor = attributes.getBackgroundColor().darker();
|
||||
}
|
||||
Color scrollmarkColor = getScrollMarkColor(attributes);
|
||||
|
||||
for (int i = 0; i < elements.length; i++) {
|
||||
final PsiElement element = elements[i];
|
||||
@@ -213,10 +207,8 @@ public class HighlightManagerImpl extends HighlightManager implements ProjectCom
|
||||
if (hideByTextChange) {
|
||||
flags |= HighlightManagerImpl.HIDE_BY_TEXT_CHANGE;
|
||||
}
|
||||
Color scrollmarkColor = null;
|
||||
if (attributes.getBackgroundColor() != null) {
|
||||
scrollmarkColor = attributes.getBackgroundColor().darker();
|
||||
}
|
||||
|
||||
Color scrollmarkColor = getScrollMarkColor(attributes);
|
||||
|
||||
addOccurrenceHighlight(editor, startOffset, endOffset, attributes, flags, highlighters, scrollmarkColor);
|
||||
}
|
||||
@@ -229,10 +221,8 @@ public class HighlightManagerImpl extends HighlightManager implements ProjectCom
|
||||
if (hideByTextChange) {
|
||||
flags |= HighlightManagerImpl.HIDE_BY_TEXT_CHANGE;
|
||||
}
|
||||
Color scrollmarkColor = null;
|
||||
if (attributes.getBackgroundColor() != null) {
|
||||
scrollmarkColor = attributes.getBackgroundColor().darker();
|
||||
}
|
||||
|
||||
Color scrollmarkColor = getScrollMarkColor(attributes);
|
||||
|
||||
for (int i = 0; i < elements.length; i++) {
|
||||
PsiElement element = elements[i];
|
||||
@@ -243,6 +233,12 @@ public class HighlightManagerImpl extends HighlightManager implements ProjectCom
|
||||
}
|
||||
}
|
||||
|
||||
private Color getScrollMarkColor(final TextAttributes attributes) {
|
||||
if (attributes.getErrorStripeColor() != null) return attributes.getErrorStripeColor();
|
||||
if (attributes.getBackgroundColor() != null) return attributes.getBackgroundColor().darker();
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean hideHighlights(Editor editor, int mask) {
|
||||
ArrayList<RangeHighlighter> highlightersToRemove = new ArrayList<RangeHighlighter>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user