/*
 * 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
 *
 * 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.
 */

/*
 * @author max
 */
package com.intellij.lang;

import com.intellij.lang.documentation.CompositeDocumentationProvider;
import com.intellij.lang.documentation.DocumentationProvider;

public class LanguageDocumentation extends LanguageExtension<DocumentationProvider> {
  public static final LanguageDocumentation INSTANCE = new LanguageDocumentation();

  private LanguageDocumentation() {
    super("com.intellij.lang.documentationProvider");
  }

  public DocumentationProvider forLanguage(final Language l) {
    return CompositeDocumentationProvider.wrapProviders(allForLanguage(l));
  }
}
@@ -779,16 +779,40 @@
 vider;%0A%0A
+import java.util.List;%0A%0A
 public c
@@ -1128,24 +1128,166 @@
 nguage l) %7B%0A
+    final List%3CDocumentationProvider%3E providers = allForLanguage(l);%0A    if (providers.size() %3C 2) %7B%0A      return super.forLanguage(l);%0A    %7D%0A
     return C
@@ -1330,33 +1330,25 @@
 oviders(
-allForLanguage(l)
+providers
 );%0A  %7D%0A%7D

revert previous changes & fix CCE in CssDocumentationProvider