mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NPE
This commit is contained in:
@@ -23,7 +23,7 @@ public class TextChunk {
|
||||
private final AttributesFlyweight myAttributes;
|
||||
private final String myText;
|
||||
|
||||
public TextChunk(TextAttributes attributesKey, @NotNull String text) {
|
||||
public TextChunk(@NotNull TextAttributes attributesKey, @NotNull String text) {
|
||||
myAttributes = attributesKey.getFlyweight();
|
||||
myText = text;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.RangeMarker;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.intellij.openapi.fileEditor.*;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -91,7 +92,7 @@ public class UsageInfo2UsageAdapter implements UsageInModule, UsageInLibrary, Us
|
||||
initChunks();
|
||||
} else { // element over light virtual file
|
||||
myTextChunks = new TextChunk[] {
|
||||
new TextChunk(null, element.getText())
|
||||
new TextChunk(new TextAttributes(), element.getText())
|
||||
};
|
||||
myOffset = element.getTextOffset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user