From 80c46b281052225a1a7c351ecb9cf5d6bdcb64c1 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 27 Jul 2009 13:58:54 +0400 Subject: [PATCH] - initial draft of language-independent UML --- .../src/com/intellij/ui/SimpleColoredText.java | 25 +++++++++++++--------- .../src/META-INF/LangExtensionPoints.xml | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/platform-api/src/com/intellij/ui/SimpleColoredText.java b/platform-api/src/com/intellij/ui/SimpleColoredText.java index 199cf85abc..a5d49a4547 100644 --- a/platform-api/src/com/intellij/ui/SimpleColoredText.java +++ b/platform-api/src/com/intellij/ui/SimpleColoredText.java @@ -1,17 +1,17 @@ /* - * Copyright 2000-2007 JetBrains s.r.o. + * Copyright 2000-2009 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. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.intellij.ui; @@ -31,6 +31,11 @@ public class SimpleColoredText { myAttributes = new ArrayList(3); } + public SimpleColoredText(@NotNull String fragment, @NotNull SimpleTextAttributes attributes) { + this(); + append(fragment, attributes); + } + public void append(@NotNull String fragment, @NotNull SimpleTextAttributes attributes){ myTexts.add(fragment); myCachedToString = null; diff --git a/platform-resources/src/META-INF/LangExtensionPoints.xml b/platform-resources/src/META-INF/LangExtensionPoints.xml index 2ca8742d08..4199624983 100644 --- a/platform-resources/src/META-INF/LangExtensionPoints.xml +++ b/platform-resources/src/META-INF/LangExtensionPoints.xml @@ -102,6 +102,8 @@ beanClass="com.intellij.lang.LanguageExtensionPoint"/> +