// Path: src/net/bitpot/railways/gui/RailwaysColors.java
// public class RailwaysColors {
// 
//     // Color of selection.
//     public static final Color HIGHLIGHT_BG_COLOR =
//             EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes()
//                     .getBackgroundColor();
// 
//     // Route token colors
//     // Scheme color names can be taken in RubyMine/lib/resources.jar!/colorSchemes directory.
//     public static final Color PARAM_TOKEN_COLOR = schemeColor("RUBY_SYMBOL");
//     public static final Color METHOD_COLOR = schemeColor("RUBY_METHOD_NAME");
//     public static final Color OPTIONAL_TOKEN_COLOR = JBColor.GRAY;
// 
//     // Color of the nonexistent action that's referenced by a route.
//     public static final Color DISABLED_ITEM_COLOR = JBColor.GRAY;
// 
// 
// 
//     // Text attributes
// 
//     public static final SimpleTextAttributes REGULAR_HL_ATTR = plainTextAttr(null, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes PARAM_TOKEN_ATTR = plainTextAttr(PARAM_TOKEN_COLOR, null);
//     public static final SimpleTextAttributes PARAM_TOKEN_HL_ATTR = plainTextAttr(PARAM_TOKEN_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes OPTIONAL_TOKEN_ATTR = plainTextAttr(OPTIONAL_TOKEN_COLOR, null);
//     public static final SimpleTextAttributes OPTIONAL_TOKEN_HL_ATTR = plainTextAttr(OPTIONAL_TOKEN_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes METHOD_ATTR = plainTextAttr(METHOD_COLOR, null);
//     public static final SimpleTextAttributes METHOD_HL_ATTR = plainTextAttr(METHOD_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes DISABLED_ITEM_ATTR = plainTextAttr(DISABLED_ITEM_COLOR, null);
//     public static final SimpleTextAttributes DISABLED_ITEM_HL_ATTR = plainTextAttr(DISABLED_ITEM_COLOR, HIGHLIGHT_BG_COLOR);
// 
// 
//     private static Color schemeColor(String name) {
//         return TextAttributesKey.find(name)
//                 .getDefaultAttributes().getForegroundColor();
//     }
// 
// 
//     private static SimpleTextAttributes plainTextAttr(Color fgColor, Color bgColor) {
//         return new SimpleTextAttributes(bgColor, fgColor,
//                 null, SimpleTextAttributes.STYLE_PLAIN);
//     }
// }


import com.intellij.ui.SimpleTextAttributes;
import net.bitpot.railways.gui.RailwaysColors;
import org.jetbrains.annotations.NotNull;
package net.bitpot.railways.parser.route;



public class RoutePathChunk extends TextChunk {
    public final static int PLAIN = 0;
    public final static int PARAMETER = 1;
    public final static int OPTIONAL = 2;


    public RoutePathChunk(@NotNull String text, int chunkType, int offsetAbs) {
        super(text, chunkType, offsetAbs);
    }

    @Override
    public SimpleTextAttributes getTextAttrs() {
        switch(getType()) {
            case RoutePathChunk.PARAMETER:
// Path: src/net/bitpot/railways/gui/RailwaysColors.java
// public class RailwaysColors {
// 
//     // Color of selection.
//     public static final Color HIGHLIGHT_BG_COLOR =
//             EditorColors.TEXT_SEARCH_RESULT_ATTRIBUTES.getDefaultAttributes()
//                     .getBackgroundColor();
// 
//     // Route token colors
//     // Scheme color names can be taken in RubyMine/lib/resources.jar!/colorSchemes directory.
//     public static final Color PARAM_TOKEN_COLOR = schemeColor("RUBY_SYMBOL");
//     public static final Color METHOD_COLOR = schemeColor("RUBY_METHOD_NAME");
//     public static final Color OPTIONAL_TOKEN_COLOR = JBColor.GRAY;
// 
//     // Color of the nonexistent action that's referenced by a route.
//     public static final Color DISABLED_ITEM_COLOR = JBColor.GRAY;
// 
// 
// 
//     // Text attributes
// 
//     public static final SimpleTextAttributes REGULAR_HL_ATTR = plainTextAttr(null, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes PARAM_TOKEN_ATTR = plainTextAttr(PARAM_TOKEN_COLOR, null);
//     public static final SimpleTextAttributes PARAM_TOKEN_HL_ATTR = plainTextAttr(PARAM_TOKEN_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes OPTIONAL_TOKEN_ATTR = plainTextAttr(OPTIONAL_TOKEN_COLOR, null);
//     public static final SimpleTextAttributes OPTIONAL_TOKEN_HL_ATTR = plainTextAttr(OPTIONAL_TOKEN_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes METHOD_ATTR = plainTextAttr(METHOD_COLOR, null);
//     public static final SimpleTextAttributes METHOD_HL_ATTR = plainTextAttr(METHOD_COLOR, HIGHLIGHT_BG_COLOR);
// 
//     public static final SimpleTextAttributes DISABLED_ITEM_ATTR = plainTextAttr(DISABLED_ITEM_COLOR, null);
//     public static final SimpleTextAttributes DISABLED_ITEM_HL_ATTR = plainTextAttr(DISABLED_ITEM_COLOR, HIGHLIGHT_BG_COLOR);
// 
// 
//     private static Color schemeColor(String name) {
//         return TextAttributesKey.find(name)
//                 .getDefaultAttributes().getForegroundColor();
//     }
// 
// 
//     private static SimpleTextAttributes plainTextAttr(Color fgColor, Color bgColor) {
//         return new SimpleTextAttributes(bgColor, fgColor,
//                 null, SimpleTextAttributes.STYLE_PLAIN);
//     }
// }


// Path: src/net/bitpot/railways/parser/route/RoutePathChunk.java
import com.intellij.ui.SimpleTextAttributes;
import net.bitpot.railways.gui.RailwaysColors;
import org.jetbrains.annotations.NotNull;

package net.bitpot.railways.parser.route;



public class RoutePathChunk extends TextChunk {
    public final static int PLAIN = 0;
    public final static int PARAMETER = 1;
    public final static int OPTIONAL = 2;


    public RoutePathChunk(@NotNull String text, int chunkType, int offsetAbs) {
        super(text, chunkType, offsetAbs);
    }

    @Override
    public SimpleTextAttributes getTextAttrs() {
        switch(getType()) {
            case RoutePathChunk.PARAMETER:
                return isHighlighted() ? RailwaysColors.PARAM_TOKEN_HL_ATTR :