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

COVERAGE SUMMARY FOR SOURCE FILE [TagRule.java]

nameclass, %method, %block, %line, %
TagRule.java0%   (0/1)0%   (0/2)0%   (0/41)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TagRule0%   (0/1)0%   (0/2)0%   (0/41)0%   (0/13)
TagRule (IToken): void 0%   (0/1)0%   (0/6)0%   (0/2)
sequenceDetected (ICharacterScanner, char [], boolean): boolean 0%   (0/1)0%   (0/35)0%   (0/11)

1package de.uka.ipd.sdq.pcm.gmf.resource.editors;
2 
3import org.eclipse.jface.text.rules.ICharacterScanner;
4import org.eclipse.jface.text.rules.IToken;
5import org.eclipse.jface.text.rules.MultiLineRule;
6 
7public class TagRule extends MultiLineRule {
8 
9        public TagRule(IToken token) {
10                super("<", ">", token);
11        }
12        protected boolean sequenceDetected(
13                ICharacterScanner scanner,
14                char[] sequence,
15                boolean eofAllowed) {
16                int c = scanner.read();
17                if (sequence[0] == '<') {
18                        if (c == '?') {
19                                // processing instruction - abort
20                                scanner.unread();
21                                return false;
22                        }
23                        if (c == '!') {
24                                scanner.unread();
25                                // comment - abort
26                                return false;
27                        }
28                } else if (sequence[0] == '>') {
29                        scanner.unread();
30                }
31                return super.sequenceDetected(scanner, sequence, eofAllowed);
32        }
33}

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