This commit is contained in:
anna
2010-07-20 13:00:35 +04:00
parent 2bacc5e0ed
commit c93c6966bf
2 changed files with 3 additions and 2 deletions
@@ -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();
}