diff options
Diffstat (limited to 'platform/platform-api/src/com/intellij/ui/SimpleColoredText.java')
-rw-r--r-- | platform/platform-api/src/com/intellij/ui/SimpleColoredText.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/platform-api/src/com/intellij/ui/SimpleColoredText.java b/platform/platform-api/src/com/intellij/ui/SimpleColoredText.java index af851951e363..8c899f1a6b5c 100644 --- a/platform/platform-api/src/com/intellij/ui/SimpleColoredText.java +++ b/platform/platform-api/src/com/intellij/ui/SimpleColoredText.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,12 @@ public class SimpleColoredText implements ColoredTextContainer { myAttributes.add(attributes); } + public void insert(int index, @NotNull String fragment, @NotNull SimpleTextAttributes attributes) { + myTexts.add(index, fragment); + myCachedToString = null; + myAttributes.add(index, attributes); + } + @Override public void append(@NotNull String fragment, @NotNull SimpleTextAttributes attributes, Object tag) { append(fragment, attributes); |