@@ -0,0 +1,1862 @@
+package org.csstudio.utility.adlparser.fileParser;%0A%0Aimport java.util.ArrayList;%0A%0Aimport org.csstudio.utility.adlparser.internationalization.Messages;%0Aimport org.eclipse.swt.graphics.RGB;%0A%0Apublic class ColorMap %7B%0A%09private RGB%5B%5D colors = new RGB%5B0%5D;%0A%09private int numColors;%0A%09%0A%09public ColorMap(ADLWidget colorMap) throws WrongADLFormatException %7B%0A%09%09// find out the number of colors%0A%09%09%0A%09%09for (FileLine fileLine : colorMap.getBody())%7B%0A%09%09%09String bodyPart = fileLine.getLine();%0A%09%09%09String%5B%5D row = bodyPart.trim().split(%22=%22);%0A%09%09%09if (row.length %3C 2)%7B%0A%09%09%09%09throw new WrongADLFormatException(Messages.Label_WrongADLFormatException_Parameter_Begin + bodyPart + Messages.Label_WrongADLFormatException_Parameter_End);%0A%09%09%09%7D%0A%09%09%09if (row%5B0%5D.trim().equals(%22ncolors%22))%7B%0A%09%09%09%09numColors = Integer.parseInt(row%5B1%5D.replaceAll(%22%5C%22%22, %22%22).trim());%0A%09%09%09%7D%0A%09%09%09colors = new RGB%5BnumColors%5D;%0A%09%09%7D%0A%09%09%09%0A%0A%09%09ADLWidget colorsWidget = colorMap.getObjects().get(0);%0A%09%09if (colorsWidget.getType().equals(%22colors%22))%7B%0A%09%09%09int colorCounter = 0;%0A%09%09%09for (FileLine fileLine  : colorsWidget.getBody())%7B%0A%09%09%09%09String bodyPart = fileLine.getLine();%0A%09%09%09%09String%5B%5D row = bodyPart.split(%22,%22);%0A%09%09%09%09if (row.length == 1)%7B%0A%09%09%09%09%09String color = row%5B0%5D.trim();%0A%09%09%09%09%09colors%5BcolorCounter%5D = getRGBColor(color);%0A%09%09%09%09%09colorCounter++;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09%0A%09%09%7D%0A%09%7D%0A%0A%09/** %0A%09 * @return Object%5B%5D colors%0A%09 */%0A%09public RGB%5B%5D getColors() %7B%0A%09%09return colors;%0A%09%7D%0A%0A%09public int getNumColors() %7B%0A%09%09return numColors;%0A%09%7D%0A%09public RGB getRGBColor(String inColor)%7B%0A%09%09String redStr = %22#%22.concat(inColor.substring(0, 2));%0A%09%09String greenStr = %22#%22.concat(inColor.substring(2, 4));%0A%09%09String blueStr = %22#%22.concat(inColor.substring(4, 6));%0A%09%09int red = Integer.decode(redStr);%0A%09%09int green = Integer.decode(greenStr);%0A%09%09int blue = Integer.decode(blueStr);%0A%09%09System.out.println(%22Red, Green, Blue:%22+ red +%22, %22 + green + %22, %22 +blue);%0A%09%09return new RGB(red, green, blue);%0A%09%7D%0A%7D%0A

Add to decode the color map