EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.pcm.dialogs.stoex]

COVERAGE SUMMARY FOR SOURCE FILE [StoExTokenMapper.java]

nameclass, %method, %block, %line, %
StoExTokenMapper.java0%   (0/1)0%   (0/2)0%   (0/104)0%   (0/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class StoExTokenMapper0%   (0/1)0%   (0/2)0%   (0/104)0%   (0/10)
StoExTokenMapper (): void 0%   (0/1)0%   (0/3)0%   (0/2)
mapColor (Token): Object 0%   (0/1)0%   (0/101)0%   (0/8)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.pcm.dialogs.stoex;
5 
6import org.antlr.runtime.Token;
7import org.eclipse.jface.text.TextAttribute;
8import org.eclipse.swt.SWT;
9import org.eclipse.swt.graphics.Color;
10import org.eclipse.swt.graphics.RGB;
11 
12import de.uka.ipd.sdq.pcm.stochasticexpressions.parser.PCMStoExLexer;
13 
14/**
15 * @author Steffen Becker
16 *
17 */
18public class StoExTokenMapper implements ITokenMapper {
19 
20        /**
21         * 
22         */
23        public StoExTokenMapper() {
24                // TODO Auto-generated constructor stub
25        }
26 
27        /* (non-Javadoc)
28         * @see de.uka.ipd.sdq.dialogs.selection.IColorMapper#mapColor(antlr.Token)
29         */
30        public Object mapColor(Token t) {
31                switch (t.getType()) {
32                case PCMStoExLexer.EQUAL:
33                case PCMStoExLexer.PLUS:
34                case PCMStoExLexer.MINUS:
35                case PCMStoExLexer.MUL:
36                case PCMStoExLexer.DIV:
37                case PCMStoExLexer.POW:
38                case PCMStoExLexer.LPAREN:
39                case PCMStoExLexer.RPAREN:
40                case PCMStoExLexer.AND:
41                case PCMStoExLexer.OR:
42                case PCMStoExLexer.XOR:
43                case PCMStoExLexer.NOT:
44                        return new TextAttribute (new Color( null, new RGB(0,0,0) ), null, SWT.BOLD);
45                case PCMStoExLexer.DOUBLEPDF:
46                case PCMStoExLexer.INTPMF:
47                case PCMStoExLexer.ENUMPMF:
48                case PCMStoExLexer.BOOLPMF:                        
49                case PCMStoExLexer.DOUBLEPMF:
50                        return new TextAttribute (new Color( null, new RGB(255,0,0) ), null, SWT.BOLD);
51                case PCMStoExLexer.NUMBER:
52                case PCMStoExLexer.STRING_LITERAL:
53                        return new TextAttribute (new Color( null, new RGB(0,0,255) ), null, SWT.BOLD);
54                case PCMStoExLexer.BYTESIZE:
55                case PCMStoExLexer.NUMBER_OF_ELEMENTS:
56                case PCMStoExLexer.STRUCTURE:
57                case PCMStoExLexer.VALUE:
58                case PCMStoExLexer.TYPE:
59                case PCMStoExLexer.INNER:
60                case PCMStoExLexer.FALSE:
61                case PCMStoExLexer.TRUE:
62                        return new TextAttribute (new Color( null, new RGB(255,0,255) ), null, SWT.ITALIC);
63                case PCMStoExLexer.ID:
64                        return new TextAttribute (new Color( null, new RGB(255,0,255) ), null, SWT.NONE);
65                case PCMStoExLexer.LINE_COMMENT:
66                case PCMStoExLexer.COMMENT:
67                        return new TextAttribute (new Color( null, new RGB(190,190,190) ), null, SWT.NONE);
68                default:
69                        return null;
70                }
71        }
72 
73}
74 

[all classes][de.uka.ipd.sdq.pcm.dialogs.stoex]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov