This commit is contained in:
Alexey Kudravtsev
2016-11-22 15:34:37 +03:00
parent 41b438000b
commit b82f3309b1
3 changed files with 6 additions and 11 deletions
@@ -179,7 +179,7 @@ public class FileStatusMap implements Disposable {
public void markFileUpToDate(@NotNull Document document, int passId) {
synchronized(myDocumentToStatusMap){
FileStatus status = myDocumentToStatusMap.computeIfAbsent(document, k -> new FileStatus(myProject));
FileStatus status = myDocumentToStatusMap.computeIfAbsent(document, __ -> new FileStatus(myProject));
status.defensivelyMarked=false;
if (passId == Pass.WOLF) {
status.wolfPassFinished = true;
@@ -236,8 +236,7 @@ public class UpdateHighlightersUtil {
final SeverityRegistrar severityRegistrar = SeverityRegistrar.getSeverityRegistrar(project);
final HighlightersRecycler infosToRemove = new HighlightersRecycler();
DaemonCodeAnalyzerEx
.processHighlights(document, project, null, range.getStartOffset(), range.getEndOffset(), info -> {
DaemonCodeAnalyzerEx.processHighlights(document, project, null, range.getStartOffset(), range.getEndOffset(), info -> {
if (info.getGroup() == group) {
RangeHighlighter highlighter = info.highlighter;
int hiStart = highlighter.getStartOffset();
@@ -409,13 +408,9 @@ public class UpdateHighlightersUtil {
return layer;
}
@NotNull
private static RangeMarker getOrCreate(@NotNull Document document, @NotNull Map<TextRange, RangeMarker> ranges2markersCache, @NotNull TextRange textRange) {
RangeMarker marker = ranges2markersCache.get(textRange);
if (marker == null) {
marker = document.createRangeMarker(textRange);
ranges2markersCache.put(textRange, marker);
}
return marker;
return ranges2markersCache.computeIfAbsent(textRange, __ -> document.createRangeMarker(textRange));
}
private static final Key<Boolean> TYPING_INSIDE_HIGHLIGHTER_OCCURRED = Key.create("TYPING_INSIDE_HIGHLIGHTER_OCCURRED");
@@ -122,7 +122,7 @@ public interface RangeHighlighter extends RangeMarker {
void setErrorStripeMarkColor(@Nullable Color color);
/**
* Returns the object whose <code>toString()</code> method is called to get the text of the tooltip
* Returns the object whose {@code toString()} method is called to get the text of the tooltip
* for the error stripe marker added by the highlighter.
*
* @return the error stripe tooltip objects, or null if the highlighter does not add any error
@@ -132,7 +132,7 @@ public interface RangeHighlighter extends RangeMarker {
Object getErrorStripeTooltip();
/**
* Sets the object whose <code>toString()</code> method is called to get the text of the tooltip
* Sets the object whose {@code toString()} method is called to get the text of the tooltip
* for the error stripe marker added by the highlighter.
*
* @param tooltipObject the error stripe tooltip objects, or null if the highlighter does not