/*
 * Copyright 2010 Jon S Akhtar (Sylvanaar)
 *
 *   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.editor.highlighter;

import com.intellij.openapi.editor.HighlighterColors;
import com.intellij.openapi.editor.SyntaxHighlighterColors;
import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.editor.markup.TextAttributes;
import org.jetbrains.annotations.NonNls;

import java.awt.*;


/**
 * Created by IntelliJ IDEA.
 * User: jon
 * Date: Apr 3, 2010
 * Time: 1:55:00 AM
 */
public class LuaHighlightingData {
    @NonNls
    static final String KEYWORD_ID = "LUA_KEYWORD";
    @NonNls
    static final String COMMENT_ID = "LUA_COMMENT";
    @NonNls
    static final String LONGCOMMENT_ID = "LUA_LONGCOMMENT";
    @NonNls
    static final String NUMBER_ID = "LUA_NUMBER";
    @NonNls
    static final String STRING_ID = "LUA_STRING";
    @NonNls
    static final String LONGSTRING_ID = "LUA_LONGSTRING";   
    @NonNls
    static final String LONGSTRING_BRACES_ID = "LUA_LONGSTRING_BRACES";
    @NonNls
    static final String LONGCOMMENT_BRACES_ID = "LUA_LONGCOMMENT_BRACES";
    @NonNls
    static final String BRACES_ID = "LUA_BRACES";
    @NonNls
    static final String PARENTHS_ID = "LUA_PARENTHS";
    @NonNls
    static final String BRACKETS_ID = "LUA_BRACKETS";
    @NonNls
    static final String BAD_CHARACTER_ID = "LUA_BAD_CHARACTER";
    @NonNls
    static final String IDENTIFIER_ID = "LUA_IDENTIFIER";
    @NonNls
    static final String VAR_ID = "LUA_VAR";
    @NonNls
    static final String COMMA_ID = "LUA_COMMA";
    @NonNls
    static final String SEMICOLON_ID = "LUA_SEMICOLON";
    @NonNls
    static final String SELF_ID = "LUA_SELF";
    @NonNls
    static final String DEFINED_CONSTANTS_ID = "LUA_DEFINED_CONSTANTS";
    @NonNls
    static final String LOCAL_VAR_ID = "LUA_LOCAL_VAR";
    @NonNls
    static final String GLOBAL_VAR_ID = "LUA_GLOBAL_VAR";
    @NonNls
    static final String FIELD_ID = "LUA_FIELD";
    @NonNls
    static final String TAIL_CALL_ID = "LUA_TAIL_CALL";
    @NonNls
    static final String PARAMETER_ID = "LUA_PARAMETER";

    private static TextAttributes LOCAL_VAR_ATTR = HighlighterColors.TEXT.getDefaultAttributes().clone();
    public static final TextAttributesKey LOCAL_VAR =
        TextAttributesKey.createTextAttributesKey(LOCAL_VAR_ID, LOCAL_VAR_ATTR);

    private static TextAttributes PARAMETER_ATTR = HighlighterColors.TEXT.getDefaultAttributes().clone();
    public static final TextAttributesKey PARAMETER =
        TextAttributesKey.createTextAttributesKey(PARAMETER_ID, PARAMETER_ATTR);


    private static TextAttributes GLOBAL_VAR_ATTR = HighlighterColors.TEXT.getDefaultAttributes().clone();
    public static final TextAttributesKey GLOBAL_VAR =
        TextAttributesKey.createTextAttributesKey(GLOBAL_VAR_ID, GLOBAL_VAR_ATTR);

    
    public static final TextAttributesKey FIELD =
        TextAttributesKey.createTextAttributesKey(FIELD_ID, HighlighterColors.TEXT.getDefaultAttributes().clone());

    static TextAttributes TAIL_CALL_ATTR = SyntaxHighlighterColors.TEXT.getDefaultAttributes().clone();
    
    public static final TextAttributesKey TAIL_CALL =
        TextAttributesKey.createTextAttributesKey(TAIL_CALL_ID, TAIL_CALL_ATTR);

    public static final TextAttributesKey KEYWORD =
        TextAttributesKey.createTextAttributesKey(KEYWORD_ID, SyntaxHighlighterColors.KEYWORD.getDefaultAttributes().clone());

    public static final TextAttributesKey COMMENT =
        TextAttributesKey.createTextAttributesKey(COMMENT_ID, SyntaxHighlighterColors.LINE_COMMENT.getDefaultAttributes().clone());
    public static final TextAttributesKey LONGCOMMENT =
        TextAttributesKey.createTextAttributesKey(LONGCOMMENT_ID, SyntaxHighlighterColors.JAVA_BLOCK_COMMENT.getDefaultAttributes().clone());

    static TextAttributes LONGCOMMENT_BRACES_ATTR = SyntaxHighlighterColors.JAVA_BLOCK_COMMENT.getDefaultAttributes().clone();

    public static final TextAttributesKey LONGCOMMENT_BRACES =
        TextAttributesKey.createTextAttributesKey(LONGCOMMENT_BRACES_ID, LONGCOMMENT_BRACES_ATTR);
    
    public static final TextAttributesKey NUMBER =
        TextAttributesKey.createTextAttributesKey(NUMBER_ID, SyntaxHighlighterColors.NUMBER.getDefaultAttributes().clone());
    public static final TextAttributesKey STRING =
        TextAttributesKey.createTextAttributesKey(STRING_ID, SyntaxHighlighterColors.STRING.getDefaultAttributes().clone());

    private static TextAttributes LONGSTRING_ATTR = SyntaxHighlighterColors.STRING.getDefaultAttributes().clone();
    private static TextAttributes LONGSTRING_BRACES_ATTR = SyntaxHighlighterColors.STRING.getDefaultAttributes().clone();
    public static final TextAttributesKey LONGSTRING =
        TextAttributesKey.createTextAttributesKey(LONGSTRING_ID, LONGSTRING_ATTR);
    public static final TextAttributesKey LONGSTRING_BRACES =
        TextAttributesKey.createTextAttributesKey(LONGSTRING_BRACES_ID, LONGSTRING_BRACES_ATTR);
    public static final TextAttributesKey BRACKETS =
        TextAttributesKey.createTextAttributesKey(BRACKETS_ID, SyntaxHighlighterColors.BRACKETS.getDefaultAttributes().clone());
    public static final TextAttributesKey BRACES =
        TextAttributesKey.createTextAttributesKey(BRACES_ID, SyntaxHighlighterColors.BRACES.getDefaultAttributes().clone());
        public static final TextAttributesKey PARENTHS =
        TextAttributesKey.createTextAttributesKey(PARENTHS_ID, SyntaxHighlighterColors.PARENTHS.getDefaultAttributes().clone());
    public static final TextAttributesKey BAD_CHARACTER =
        TextAttributesKey.createTextAttributesKey(BAD_CHARACTER_ID, HighlighterColors.BAD_CHARACTER.getDefaultAttributes().clone());



    public static final TextAttributesKey IDENTIFIER =
        TextAttributesKey.createTextAttributesKey(IDENTIFIER_ID, HighlighterColors.TEXT.getDefaultAttributes().clone());

    public static final TextAttributesKey SELF =
        TextAttributesKey.createTextAttributesKey(SELF_ID, SyntaxHighlighterColors.KEYWORD.getDefaultAttributes().clone());

    public static final TextAttributesKey COMMA =
        TextAttributesKey.createTextAttributesKey(COMMA_ID, SyntaxHighlighterColors.COMMA.getDefaultAttributes().clone());
    
    public static final TextAttributesKey SEMICOLON =
        TextAttributesKey.createTextAttributesKey(SEMICOLON_ID, SyntaxHighlighterColors.JAVA_SEMICOLON.getDefaultAttributes().clone());

    private static TextAttributes DEFINED_CONSTANTS_ATTR = SyntaxHighlighterColors.KEYWORD.getDefaultAttributes().clone();

    public static final TextAttributesKey DEFINED_CONSTANTS =
         TextAttributesKey.createTextAttributesKey(DEFINED_CONSTANTS_ID, DEFINED_CONSTANTS_ATTR);



    static {
        DEFINED_CONSTANTS_ATTR.setForegroundColor(Color.MAGENTA);

//        LONGCOMMENT_BRACES_ATTR.setFontType(SimpleTextAttributes.STYLE_BOLD);
//        LONGCOMMENT_BRACES_ATTR.setBackgroundColor(Color.LIGHT_GRAY);
//        LONGSTRING_BRACES_ATTR.setBackgroundColor(Color.LIGHT_GRAY);
//        LONGSTRING_BRACES_ATTR.setFontType(SimpleTextAttributes.STYLE_BOLD);
        LONGSTRING_ATTR.setBackgroundColor(new Color(0xD0, 0xD0, 0xD0));

        GLOBAL_VAR_ATTR.setForegroundColor(new Color(128, 0, 0));
        LOCAL_VAR_ATTR.setForegroundColor(new Color(0, 153, 153));
        PARAMETER_ATTR.setForegroundColor(new Color(153, 102, 255));

//        TAIL_CALL_ATTR.setEffectType(EffectType.LINE_UNDERSCORE);
    }




}

@@ -3694,38 +3694,32 @@
 AIL_CALL_ATTR = 
-Syntax
 HighlighterColor

correct last commit