/*
 * Copyright 2009 Max Ishchenko
 *
 * 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.
 */

package com.sylvanaar.idea.Lua.lang;

import com.intellij.lang.Commenter;

/**
 * Created by IntelliJ IDEA.
 * User: Max
 * Date: 04.07.2009
 * Time: 14:12:45
 */
public class LuaCommenter implements Commenter {

    public String getLineCommentPrefix() {
        return "--";
    }

    public String getBlockCommentPrefix() {
        return "--[[";
    }

    public String getBlockCommentSuffix() {
        return "]]";

    }

    @Override
    public String getCommentedBlockCommentPrefix() {
        return null;
    }

    @Override
    public String getCommentedBlockCommentSuffix() {
        return null;
    }
}

@@ -668,25 +668,435 @@
 ij.lang.
+ASTNode;%0D%0Aimport com.intellij.lang.CodeDocumentationAwareCommenterEx;%0D%0Aimport com.intellij.psi.JavaDocTokenType;%0D%0Aimport com.intellij.psi.PsiComment;%0D%0Aimport com.intellij.psi.PsiElement;%0D%0Aimport com.intellij.psi.tree.IElementType;%0D%0Aimport com.sylvanaar.idea.Lua.lang.lexer.LuaTokenTypes;%0D%0Aimport com.sylvanaar.idea.Lua.lang.luadoc.lexer.LuaDocTokenTypes;%0D%0Aimport com.sylvanaar.idea.Lua.lang.luadoc.psi.api.LuaDoc
 Comment
-er
 ;%0D%0A%0D%0A/**
@@ -1223,16 +1223,38 @@
 lements 
+CodeDocumentationAware
 Commente
@@ -1254,16 +1254,18 @@
 ommenter
+Ex
  %7B%0D%0A%0D%0A  
@@ -1684,18 +1684,1093 @@
  null;%0D%0A
-
     %7D%0D%0A
+%0D%0A%0D%0A  public boolean isDocumentationCommentText(final PsiElement element) %7B%0D%0A    if (element == null) return false;%0D%0A    final ASTNode node = element.getNode();%0D%0A    return node != null && node.getElementType() == LuaDocTokenTypes.LDOC_COMMENT_DATA;%0D%0A  %7D%0D%0A%0D%0A    @Override%0D%0A    public IElementType getLineCommentTokenType() %7B%0D%0A        return LuaTokenTypes.SHORTCOMMENT;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public IElementType getBlockCommentTokenType() %7B%0D%0A        return LuaTokenTypes.LONGCOMMENT;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public IElementType getDocumentationCommentTokenType() %7B%0D%0A        return LuaTokenTypes.LUADOC_COMMENT;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public String getDocumentationCommentPrefix() %7B%0D%0A        return %22---%22;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public String getDocumentationCommentLinePrefix() %7B%0D%0A        return %22--%22;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public String getDocumentationCommentSuffix() %7B%0D%0A        return null;%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public boolean isDocumentationComment(PsiComment element) %7B%0D%0A        return element instanceof LuaDocComment;%0D%0A    %7D%0D%0A%0D%0A%0D%0A
 %7D%0D%0A

implement the more advanced Commenter