You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/02/14 16:27:29 UTC

svn commit: r1446230 [1/3] - in /uima/sandbox/textmarker/trunk: textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/ textmarker-core/src/main/java/org/apache/uima/textmarker/ textmarker-core/src/main/java/org/apache/uima/textmarker/action...

Author: pkluegl
Date: Thu Feb 14 15:27:29 2013
New Revision: 1446230

URL: http://svn.apache.org/r1446230
Log:
UIMA-2620
- added four actions: ADDFILTERTYPE, ADDRETAINTYPE, REMOVEFILTERTYPE, REMOVERETAINTYPE
- extended grammars
- added documentation
- updated hover documentation
- added tests

Added:
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddFilterTypeAction.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddRetainTypeAction.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveFilterTypeAction.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveRetainTypeAction.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddFilterTypeTest.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddRetainTypeTest.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveFilterTypeTest.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveRetainTypeTest.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.tm
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.txt
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.tm
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.txt
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.tm
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.txt
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.tm
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.txt
Modified:
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.g
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/FilterManager.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/TextMarkerStream.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
    uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/AllActionsTest.java
    uima/sandbox/textmarker/trunk/textmarker-docbook/src/docbook/tools.textmarker.language.actions.xml
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/resources/org/apache/uima/textmarker/ide/ui/documentation/Actions.html
    uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/resources/org/apache/uima/textmarker/ide/ui/documentation/Conditions.html

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.g
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.g?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.g (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.g Thu Feb 14 15:27:29 2013
@@ -273,7 +273,21 @@ ENDSWITH 	
 	:	'ENDSWITH'	 
 	;
 
-
+ADDRETAINTYPE
+  : 'ADDRETAINTYPE'
+  ;
+
+REMOVERETAINTYPE
+  : 'REMOVERETAINTYPE'
+  ;
+
+ADDFILTERTYPE
+  : 'ADDFILTERTYPE'
+  ;
+
+REMOVEFILTERTYPE
+  : 'REMOVEFILTERTYPE'
+  ;
 
 NOT
 	:	'NOT'

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerLexer.tokens Thu Feb 14 15:27:29 2013
@@ -1,152 +1,156 @@
-STAR=139
-FloatTypeSuffix=114
-OctalLiteral=112
-LOG=37
-CONTAINS=8
-REMOVE=66
-GREATEREQUAL=152
-MARKFAST=41
-CONDITION=92
-MATCHEDTEXT=72
-COUNT=14
-LOGN=101
-DYNAMICANCHORING=57
-NOT=64
-Identifier=124
-ACTION=93
-NOTEQUAL=149
-CLEAR=74
-VBAR=141
-DOUBLELIST=96
-ENDSWITH=63
-RPAREN=126
-CREATE=31
-GREATER=144
-SIN=102
-EXP=100
-CURRENTCOUNT=16
-COS=103
-TAN=104
-TYPELIST=99
-FloatString=87
-LESS=143
-REGEXP=25
-GET=69
-PARTOF=22
-UNMARK=53
-LAST=18
-COMMENT=154
-REMOVEDUPLICATE=67
-UNMARKALL=54
-RBRACK=128
-NEAR=20
-LINE_COMMENT=155
-IntegerTypeSuffix=109
-MARKSCORE=39
-REMOVESTRING=73
-TRANSFER=55
-LCURLY=129
-TRIE=7
-FILTERTYPE=46
-STRINGLIST=98
-MARKONCE=40
-ScriptString=80
-EngineString=81
-WS=153
-WORDTABLE=11
-WORDLIST=10
-AutomataBlockString=83
-FloatingPointLiteral=115
-INTLIST=95
-OR=21
-TRIM=58
-JavaIDDigit=123
-FLOATLIST=97
-CALL=47
-Annotation=5
-FALSE=107
-LESSEQUAL=151
-RessourceLiteral=119
-VOTE=27
-Letter=122
-EscapeSequence=116
-SIZE=71
-BasicAnnotationType=76
-LBRACK=127
-CharacterLiteral=117
-DEL=36
-ATTRIBUTE=34
-TypeString=84
-SHIFT=56
-Exponent=113
-ASSIGN_EQUAL=145
-RETAINTYPE=45
-AND=12
-TypeSystemString=90
-BlockString=82
-IntString=85
-HexDigit=108
-COLOR=35
-LPAREN=125
-POSITION=24
-IF=28
-AT=132
-LogLevel=77
-CONFIGURE=49
-SLASH=140
-THEN=75
-FILL=33
-COMMA=135
-IS=61
-AMPER=142
-REPLACE=44
-GETLIST=70
-EQUAL=148
-GATHER=32
-INLIST=17
-PLUS=137
-BooleanString=89
-GETFEATURE=52
-DOT=133
-ListIdentifier=6
-PARTOFNEQ=23
-BOOLEANLIST=94
-ADD=65
-MARKTABLE=42
-HexLiteral=110
-XOR=105
-PERCENT=146
-MARK=38
-PARSE=30
-PackageString=79
-OldColor=78
-MARKLAST=43
-MERGE=68
-CONTEXTCOUNT=13
-BEFORE=59
-EXEC=48
-MINUS=138
-AFTER=60
-DecimalLiteral=111
-SEMI=136
-TRUE=106
-FEATURE=29
-SymbolString=91
-COLON=134
-StringLiteral=118
-StringString=88
-SCORE=26
-QUESTION=147
-UnicodeEscape=120
-RCURLY=130
-STARTSWITH=62
-ASSIGN=50
-TOTALCOUNT=15
-DECLARE=9
-DocComment=4
-MOFN=19
-OctalEscape=121
-SETFEATURE=51
-DoubleString=86
-CIRCUMFLEX=131
-ALT_NOTEQUAL=150
+ACTION=4
+ADD=5
+ADDFILTERTYPE=6
+ADDRETAINTYPE=7
+AFTER=8
+ALT_NOTEQUAL=9
+AMPER=10
+AND=11
+ASSIGN=12
+ASSIGN_EQUAL=13
+AT=14
+ATTRIBUTE=15
+Annotation=16
+AutomataBlockString=17
+BEFORE=18
+BOOLEANLIST=19
+BasicAnnotationType=20
+BlockString=21
+BooleanString=22
+CALL=23
+CIRCUMFLEX=24
+CLEAR=25
+COLON=26
+COLOR=27
+COMMA=28
+COMMENT=29
+CONDITION=30
+CONFIGURE=31
+CONTAINS=32
+CONTEXTCOUNT=33
+COS=34
+COUNT=35
+CREATE=36
+CURRENTCOUNT=37
+CharacterLiteral=38
+DECLARE=39
+DEL=40
+DOT=41
+DOUBLELIST=42
+DYNAMICANCHORING=43
+DecimalLiteral=44
+DocComment=45
+DoubleString=46
+ENDSWITH=47
+EQUAL=48
+EXEC=49
+EXP=50
+EngineString=51
+EscapeSequence=52
+Exponent=53
+FALSE=54
+FEATURE=55
+FILL=56
+FILTERTYPE=57
+FLOATLIST=58
+FloatString=59
+FloatTypeSuffix=60
+FloatingPointLiteral=61
+GATHER=62
+GET=63
+GETFEATURE=64
+GETLIST=65
+GREATER=66
+GREATEREQUAL=67
+HexDigit=68
+HexLiteral=69
+IF=70
+INLIST=71
+INTLIST=72
+IS=73
+Identifier=74
+IntString=75
+IntegerTypeSuffix=76
+JavaIDDigit=77
+LAST=78
+LBRACK=79
+LCURLY=80
+LESS=81
+LESSEQUAL=82
+LINE_COMMENT=83
+LOG=84
+LOGN=85
+LPAREN=86
+Letter=87
+ListIdentifier=88
+LogLevel=89
+MARK=90
+MARKFAST=91
+MARKLAST=92
+MARKONCE=93
+MARKSCORE=94
+MARKTABLE=95
+MATCHEDTEXT=96
+MERGE=97
+MINUS=98
+MOFN=99
+NEAR=100
+NOT=101
+NOTEQUAL=102
+OR=103
+OctalEscape=104
+OctalLiteral=105
+OldColor=106
+PARSE=107
+PARTOF=108
+PARTOFNEQ=109
+PERCENT=110
+PLUS=111
+POSITION=112
+PackageString=113
+QUESTION=114
+RBRACK=115
+RCURLY=116
+REGEXP=117
+REMOVE=118
+REMOVEDUPLICATE=119
+REMOVEFILTERTYPE=120
+REMOVERETAINTYPE=121
+REMOVESTRING=122
+REPLACE=123
+RETAINTYPE=124
+RPAREN=125
+RessourceLiteral=126
+SCORE=127
+SEMI=128
+SETFEATURE=129
+SHIFT=130
+SIN=131
+SIZE=132
+SLASH=133
+STAR=134
+STARTSWITH=135
+STRINGLIST=136
+ScriptString=137
+StringLiteral=138
+StringString=139
+SymbolString=140
+TAN=141
+THEN=142
+TOTALCOUNT=143
+TRANSFER=144
+TRIE=145
+TRIM=146
+TRUE=147
+TYPELIST=148
+TypeString=149
+TypeSystemString=150
+UNMARK=151
+UNMARKALL=152
+UnicodeEscape=153
+VBAR=154
+VOTE=155
+WORDLIST=156
+WORDTABLE=157
+WS=158
+XOR=159

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/antlr3/org/apache/uima/textmarker/parser/TextMarkerParser.g Thu Feb 14 15:27:29 2013
@@ -6,7 +6,6 @@ options {
 }
 
 
-
 @parser::header {
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -1116,6 +1115,10 @@ action  returns [AbstractTextMarkerActio
 	| a = actionConfigure
 	| a = actionDynamicAnchoring
 	| a = actionTrim 
+	| a = actionAddRetainType
+	| a = actionRemoveRetainType
+	| a = actionAddFilterType
+	| a = actionRemoveFilterType
 	| (a = externalAction)=> a = externalAction
 //	| a = variableAction
 	) {result = a;}
@@ -1571,6 +1574,41 @@ actionClear returns [AbstractTextMarkerA
     {action = ActionFactory.createClearAction(var, $blockDeclaration::env);}
     ;
 
+actionAddRetainType returns [AbstractTextMarkerAction action = null]
+@init {
+List<TypeExpression> list = new ArrayList<TypeExpression>();
+}
+    :
+    ADDRETAINTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)
+    {action = ActionFactory.createAddRetainTypeAction(list,$blockDeclaration::env);}
+    ;     
+
+actionRemoveRetainType returns [AbstractTextMarkerAction action = null]
+@init {
+List<TypeExpression> list = new ArrayList<TypeExpression>();
+}
+    :
+    REMOVERETAINTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)
+    {action = ActionFactory.createRemoveRetainTypeAction(list,$blockDeclaration::env);}
+    ;   
+
+actionAddFilterType returns [AbstractTextMarkerAction action = null]
+@init {
+List<TypeExpression> list = new ArrayList<TypeExpression>();
+}
+    :
+    ADDFILTERTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)
+    {action = ActionFactory.createAddFilterTypeAction(list,$blockDeclaration::env);}
+    ;   
+
+actionRemoveFilterType returns [AbstractTextMarkerAction action = null]
+@init {
+List<TypeExpression> list = new ArrayList<TypeExpression>();
+}
+    :
+    REMOVEFILTERTYPE (LPAREN id = typeExpression {list.add(id);} (COMMA id = typeExpression {list.add(id);})* RPAREN)
+    {action = ActionFactory.createRemoveFilterTypeAction(list,$blockDeclaration::env);}
+    ;     
 
 varArgumentList returns [List args = new ArrayList()]
 	:

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/FilterManager.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/FilterManager.java?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/FilterManager.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/FilterManager.java Thu Feb 14 15:27:29 2013
@@ -136,6 +136,22 @@ public class FilterManager {
     currentFilterTypes = list;
   }
 
+  public void addFilterTypes(List<Type> types) {
+    currentFilterTypes.addAll(types);
+  }
+
+  public void addRetainTypes(List<Type> types) {
+    currentRetainTypes.addAll(types);
+  }
+
+  public void removeFilterTypes(List<Type> types) {
+    currentFilterTypes.removeAll(types);
+  }
+
+  public void removeRetainTypes(List<Type> types) {
+    currentRetainTypes.removeAll(types);
+  }
+  
   public Collection<Type> getDefaultFilterTypes() {
     return defaultFilterTypes;
   }
@@ -174,4 +190,6 @@ public class FilterManager {
     }
   }
 
+  
+
 }

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/TextMarkerStream.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/TextMarkerStream.java?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/TextMarkerStream.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/TextMarkerStream.java Thu Feb 14 15:27:29 2013
@@ -600,15 +600,34 @@ public class TextMarkerStream extends FS
 
   public void retainTypes(List<Type> list) {
     filter.retainTypes(list);
-    FSMatchConstraint defaultConstraint = filter.getDefaultConstraint();
-    currentIt = cas.createFilteredIterator(basicIt, defaultConstraint);
+    currentIt = filter.createFilteredIterator(cas, basicType);
   }
 
   public void filterTypes(List<Type> list) {
     filter.filterTypes(list);
-    FSMatchConstraint defaultConstraint = filter.getDefaultConstraint();
-    currentIt = cas.createFilteredIterator(basicIt, defaultConstraint);
+    currentIt = filter.createFilteredIterator(cas, basicType);
   }
+  
+  public void addFilterTypes(List<Type> types) {
+    filter.addFilterTypes(types);
+    currentIt = filter.createFilteredIterator(cas, basicType);
+  }
+
+  public void addRetainTypes(List<Type> types) {
+    filter.addRetainTypes(types);
+    currentIt = filter.createFilteredIterator(cas, basicType);
+  }
+
+  public void removeFilterTypes(List<Type> types) {
+    filter.removeFilterTypes(types);
+    currentIt = filter.createFilteredIterator(cas, basicType);
+  }
+
+  public void removeRetainTypes(List<Type> types) {
+    filter.removeRetainTypes(types);
+    currentIt = filter.createFilteredIterator(cas, basicType);
+  }
+  
 
   public FilterManager getFilter() {
     return filter;
@@ -686,4 +705,6 @@ public class TextMarkerStream extends FS
     this.simpleGreedyForComposed = simpleGreedyForComposed;
   }
 
+  
+
 }

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/ActionFactory.java Thu Feb 14 15:27:29 2013
@@ -131,6 +131,26 @@ public class ActionFactory {
     return new FilterTypeAction(types);
   }
 
+  public static AbstractTextMarkerAction createAddRetainTypeAction(List<TypeExpression> types,
+          TextMarkerBlock env) {
+    return new AddRetainTypeAction(types);
+  }
+  
+  public static AbstractTextMarkerAction createRemoveRetainTypeAction(List<TypeExpression> types,
+          TextMarkerBlock env) {
+    return new RemoveRetainTypeAction(types);
+  }
+  
+  public static AbstractTextMarkerAction createAddFilterTypeAction(List<TypeExpression> types,
+          TextMarkerBlock env) {
+    return new AddFilterTypeAction(types);
+  }
+  
+  public static AbstractTextMarkerAction createRemoveFilterTypeAction(List<TypeExpression> types,
+          TextMarkerBlock env) {
+    return new RemoveFilterTypeAction(types);
+  }
+  
   public static AbstractTextMarkerAction createSetFeatureAction(StringExpression f, Object v,
           TextMarkerBlock parent) {
     if (v instanceof NumberExpression) {
@@ -244,4 +264,6 @@ public class ActionFactory {
     return new TrimAction(types, typeList);
   }
 
+  
+
 }

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddFilterTypeAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddFilterTypeAction.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddFilterTypeAction.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddFilterTypeAction.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.cas.Type;
+import org.apache.uima.textmarker.TextMarkerStream;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
+import org.apache.uima.textmarker.rule.RuleElement;
+import org.apache.uima.textmarker.rule.RuleMatch;
+import org.apache.uima.textmarker.visitor.InferenceCrowd;
+
+public class AddFilterTypeAction extends AbstractTextMarkerAction {
+
+  public List<TypeExpression> getList() {
+    return list;
+  }
+
+  private List<TypeExpression> list;
+
+  public AddFilterTypeAction(List<TypeExpression> list) {
+    super();
+    this.list = list;
+  }
+
+  @Override
+  public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
+          InferenceCrowd crowd) {
+    List<Type> types = new ArrayList<Type>();
+    for (TypeExpression each : list) {
+      types.add(each.getType(element.getParent()));
+    }
+    stream.addFilterTypes(types);
+  }
+
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddRetainTypeAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddRetainTypeAction.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddRetainTypeAction.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/AddRetainTypeAction.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.cas.Type;
+import org.apache.uima.textmarker.TextMarkerStream;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
+import org.apache.uima.textmarker.rule.RuleElement;
+import org.apache.uima.textmarker.rule.RuleMatch;
+import org.apache.uima.textmarker.visitor.InferenceCrowd;
+
+public class AddRetainTypeAction extends AbstractTextMarkerAction {
+
+  public List<TypeExpression> getList() {
+    return list;
+  }
+
+  private List<TypeExpression> list;
+
+  public AddRetainTypeAction(List<TypeExpression> list) {
+    super();
+    this.list = list;
+  }
+
+  @Override
+  public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
+          InferenceCrowd crowd) {
+    List<Type> types = new ArrayList<Type>();
+    for (TypeExpression each : list) {
+      types.add(each.getType(element.getParent()));
+    }
+    stream.addRetainTypes(types);
+  }
+
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveFilterTypeAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveFilterTypeAction.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveFilterTypeAction.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveFilterTypeAction.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.cas.Type;
+import org.apache.uima.textmarker.TextMarkerStream;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
+import org.apache.uima.textmarker.rule.RuleElement;
+import org.apache.uima.textmarker.rule.RuleMatch;
+import org.apache.uima.textmarker.visitor.InferenceCrowd;
+
+public class RemoveFilterTypeAction extends AbstractTextMarkerAction {
+
+  public List<TypeExpression> getList() {
+    return list;
+  }
+
+  private List<TypeExpression> list;
+
+  public RemoveFilterTypeAction(List<TypeExpression> list) {
+    super();
+    this.list = list;
+  }
+
+  @Override
+  public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
+          InferenceCrowd crowd) {
+    List<Type> types = new ArrayList<Type>();
+    for (TypeExpression each : list) {
+      types.add(each.getType(element.getParent()));
+    }
+    stream.removeFilterTypes(types);
+  }
+
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveRetainTypeAction.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveRetainTypeAction.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveRetainTypeAction.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/main/java/org/apache/uima/textmarker/action/RemoveRetainTypeAction.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.uima.cas.Type;
+import org.apache.uima.textmarker.TextMarkerStream;
+import org.apache.uima.textmarker.expression.type.TypeExpression;
+import org.apache.uima.textmarker.rule.RuleElement;
+import org.apache.uima.textmarker.rule.RuleMatch;
+import org.apache.uima.textmarker.visitor.InferenceCrowd;
+
+public class RemoveRetainTypeAction extends AbstractTextMarkerAction {
+
+  public List<TypeExpression> getList() {
+    return list;
+  }
+
+  private List<TypeExpression> list;
+
+  public RemoveRetainTypeAction(List<TypeExpression> list) {
+    super();
+    this.list = list;
+  }
+
+  @Override
+  public void execute(RuleMatch match, RuleElement element, TextMarkerStream stream,
+          InferenceCrowd crowd) {
+    List<Type> types = new ArrayList<Type>();
+    for (TypeExpression each : list) {
+      types.add(each.getType(element.getParent()));
+    }
+    stream.removeRetainTypes(types);
+  }
+
+}

Modified: uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/AllActionsTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/AllActionsTest.java?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/AllActionsTest.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/AllActionsTest.java Thu Feb 14 15:27:29 2013
@@ -19,6 +19,8 @@
 
 package org.apache.uima.textmarker;
 
+import org.apache.uima.textmarker.action.AddFilterTypeTest;
+import org.apache.uima.textmarker.action.AddRetainTypeTest;
 import org.apache.uima.textmarker.action.ClearTest;
 import org.apache.uima.textmarker.action.CreateTest;
 import org.apache.uima.textmarker.action.FillTest;
@@ -36,6 +38,8 @@ import org.apache.uima.textmarker.action
 import org.apache.uima.textmarker.action.MatchedTextTest;
 import org.apache.uima.textmarker.action.MergeTest;
 import org.apache.uima.textmarker.action.RemoveDuplicateTest;
+import org.apache.uima.textmarker.action.RemoveFilterTypeTest;
+import org.apache.uima.textmarker.action.RemoveRetainTypeTest;
 import org.apache.uima.textmarker.action.RemoveTest;
 import org.apache.uima.textmarker.action.ReplaceTest;
 import org.apache.uima.textmarker.action.RetainTypeTest;
@@ -52,13 +56,14 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
-@SuiteClasses({ ClearTest.class, CreateTest.class, FillTest.class, FilterTypeTest.class,
-    GatherTest.class, GetFeatureTest.class, GetListTest.class, GetTest.class, MarkFastTest.class,
-    MarkLastTest.class, MarkOnceTest.class, MarkScoreTest.class, MarkTableTest.class,
-    MarkTest.class, MatchedTextTest.class, MergeTest.class, RemoveDuplicateTest.class,
-    RemoveTest.class, ReplaceTest.class, RetainTypeTest.class, SetFeatureTest.class,
-    ShiftTest.class, ShiftTest2.class, TransferTest.class, TrieTest.class, TrimTest.class, UnmarkAllTest.class,
-    UnmarkTest.class })
+@SuiteClasses({ AddFilterTypeTest.class, AddRetainTypeTest.class, ClearTest.class,
+    CreateTest.class, FillTest.class, FilterTypeTest.class, GatherTest.class, GetFeatureTest.class,
+    GetListTest.class, GetTest.class, MarkFastTest.class, MarkLastTest.class, MarkOnceTest.class,
+    MarkScoreTest.class, MarkTableTest.class, MarkTest.class, MatchedTextTest.class,
+    MergeTest.class, RemoveDuplicateTest.class, RemoveFilterTypeTest.class,
+    RemoveRetainTypeTest.class, RemoveTest.class, ReplaceTest.class, RetainTypeTest.class,
+    SetFeatureTest.class, ShiftTest.class, ShiftTest2.class, TransferTest.class, TrieTest.class,
+    TrimTest.class, UnmarkAllTest.class, UnmarkTest.class })
 public class AllActionsTest {
 
 }

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddFilterTypeTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddFilterTypeTest.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddFilterTypeTest.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddFilterTypeTest.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class AddFilterTypeTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    iterator = ai.iterator();
+    assertEquals(1, ai.size());
+    assertEquals(" text<br/>", iterator.next().getCoveredText());
+   
+    cas.release();
+  }
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddRetainTypeTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddRetainTypeTest.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddRetainTypeTest.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/AddRetainTypeTest.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class AddRetainTypeTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    iterator = ai.iterator();
+    assertEquals(1, ai.size());
+    assertEquals(" text<br/>", iterator.next().getCoveredText());
+   
+    cas.release();
+  }
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveFilterTypeTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveFilterTypeTest.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveFilterTypeTest.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveFilterTypeTest.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class RemoveFilterTypeTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    iterator = ai.iterator();
+    assertEquals(1, ai.size());
+    assertEquals("some text", iterator.next().getCoveredText());
+   
+    cas.release();
+  }
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveRetainTypeTest.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveRetainTypeTest.java?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveRetainTypeTest.java (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/java/org/apache/uima/textmarker/action/RemoveRetainTypeTest.java Thu Feb 14 15:27:29 2013
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.textmarker.action;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.junit.Test;
+
+public class RemoveRetainTypeTest {
+
+  @Test
+  public void test() {
+    String name = this.getClass().getSimpleName();
+    String namespace = this.getClass().getPackage().getName().replaceAll("\\.", "/");
+    
+    CAS cas = null;
+    try {
+      cas = TextMarkerTestUtils.process(namespace + "/" + name + ".tm", namespace + "/" + name
+              + ".txt", 50);
+    } catch (Exception e) {
+      e.printStackTrace();
+      assert (false);
+    }
+    Type t = null;
+    AnnotationIndex<AnnotationFS> ai = null;
+    FSIterator<AnnotationFS> iterator = null;
+
+    t = TextMarkerTestUtils.getTestType(cas, 1);
+    ai = cas.getAnnotationIndex(t);
+    iterator = ai.iterator();
+    assertEquals(1, ai.size());
+    assertEquals(" text<br/>", iterator.next().getCoveredText());
+   
+    cas.release();
+  }
+}

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.tm?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.tm (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.tm Thu Feb 14 15:27:29 2013
@@ -0,0 +1,8 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+Document{ -> RETAINTYPE(SPACE, MARKUP)};
+Document{ -> ADDFILTERTYPE(W)};
+SPACE MARKUP{-> MARK(T1,1,2)};
+

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.txt?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.txt (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddFilterTypeTest.txt Thu Feb 14 15:27:29 2013
@@ -0,0 +1 @@
+only some text<br/>
\ No newline at end of file

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.tm?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.tm (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.tm Thu Feb 14 15:27:29 2013
@@ -0,0 +1,8 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+Document{ -> ADDRETAINTYPE(SPACE, MARKUP)};
+Document{ -> FILTERTYPE(W)};
+SPACE MARKUP{-> MARK(T1,1,2)};
+

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.txt?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.txt (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/AddRetainTypeTest.txt Thu Feb 14 15:27:29 2013
@@ -0,0 +1 @@
+only some text<br/>
\ No newline at end of file

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.tm?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.tm (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.tm Thu Feb 14 15:27:29 2013
@@ -0,0 +1,10 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+
+Document{ -> RETAINTYPE(MARKUP)};
+Document{ -> FILTERTYPE(W, NUM)};
+Document{ -> REMOVEFILTERTYPE(W)};
+ANY ANY MARKUP{-> MARK(T1,1,2)};
+

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.txt?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.txt (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveFilterTypeTest.txt Thu Feb 14 15:27:29 2013
@@ -0,0 +1 @@
+only some text<br/>
\ No newline at end of file

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.tm
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.tm?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.tm (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.tm Thu Feb 14 15:27:29 2013
@@ -0,0 +1,9 @@
+PACKAGE org.apache.uima;
+
+DECLARE T1, T2, T3, T4, T5, T6, T7, T8;
+
+Document{ -> RETAINTYPE(SPACE, MARKUP, CW, SW, NUM)};
+Document{ -> REMOVERETAINTYPE(CW, SW, NUM)};
+Document{ -> FILTERTYPE(W)};
+SPACE MARKUP{-> MARK(T1,1,2)};
+

Added: uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.txt
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.txt?rev=1446230&view=auto
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.txt (added)
+++ uima/sandbox/textmarker/trunk/textmarker-core/src/test/resources/org/apache/uima/textmarker/action/RemoveRetainTypeTest.txt Thu Feb 14 15:27:29 2013
@@ -0,0 +1 @@
+only some text<br/>
\ No newline at end of file

Modified: uima/sandbox/textmarker/trunk/textmarker-docbook/src/docbook/tools.textmarker.language.actions.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-docbook/src/docbook/tools.textmarker.language.actions.xml?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-docbook/src/docbook/tools.textmarker.language.actions.xml (original)
+++ uima/sandbox/textmarker/trunk/textmarker-docbook/src/docbook/tools.textmarker.language.actions.xml Thu Feb 14 15:27:29 2013
@@ -57,7 +57,62 @@ under the License.
       </para>
     </section>
   </section>
-
+  
+  <section id="ugr.tools.tm.language.actions.addfiltertype">
+    <title>ADDFILTERTYPE</title>
+    <para>
+      The ADDFILTERTYPE action adds its arguments to the list of filtered types, 
+      which restrict the visibility of the rules.
+    </para>
+    <section>
+      <title>
+        <emphasis role="bold">Definition:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[ADDFILTERTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>
+      </para>
+    </section>
+    <section>
+      <title>
+        <emphasis role="bold">Example:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[Document{->ADDFILTERTYPE(CW)};]]></programlisting>
+      </para>
+      <para>
+        After applying this rule, capitalized words are invisible additionally to the previously filtered types.
+      </para>
+    </section>
+  </section>
+  
+    <section id="ugr.tools.tm.language.actions.addretaintype">
+    <title>ADDRETAINTYPE</title>
+    <para>
+      The ADDFILTERTYPE action adds its arguments to the list of retained types, 
+      which extend the visibility of the rules.
+    </para>
+    <section>
+      <title>
+        <emphasis role="bold">Definition:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[ADDRETAINTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>
+      </para>
+    </section>
+    <section>
+      <title>
+        <emphasis role="bold">Example:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[Document{->ADDRETAINTYPE(MARKUP)};]]></programlisting>
+      </para>
+      <para>
+        After applying this rule, markup is visible additionally to the previously retained types.
+      </para>
+    </section>
+  </section>
+  
+  
   <section id="ugr.tools.tm.language.actions.assign">
     <title>ASSIGN</title>
     <para>
@@ -964,6 +1019,61 @@ Document{-> MARKTABLE(Struct, 1, TestTab
     </section>
   </section>
 
+  <section id="ugr.tools.tm.language.actions.removefiltertype">
+    <title>REMOVEFILTERTYPE</title>
+    <para>
+      The REMOVEFILTERTYPE action removes its arguments from the list of filtered types, 
+      which restrict the visibility of the rules.
+    </para>
+    <section>
+      <title>
+        <emphasis role="bold">Definition:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[REMOVEFILTERTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>
+      </para>
+    </section>
+    <section>
+      <title>
+        <emphasis role="bold">Example:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[Document{->REMOVEFILTERTYPE(W)};]]></programlisting>
+      </para>
+      <para>
+        After applying this rule, words are possibly visible again depending on the current filtering settings.
+      </para>
+    </section>
+  </section>
+  
+    <section id="ugr.tools.tm.language.actions.removeretaintype">
+    <title>REMOVERETAINTYPE</title>
+    <para>
+      The REMOVEFILTERTYPE action removes its arguments from the list of retained types, 
+      which extend the visibility of the rules.
+    </para>
+    <section>
+      <title>
+        <emphasis role="bold">Definition:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[REMOVERETAINTYPE(TypeExpression(,TypeExpression)*)]]></programlisting>
+      </para>
+    </section>
+    <section>
+      <title>
+        <emphasis role="bold">Example:</emphasis>
+      </title>
+      <para>
+        <programlisting><![CDATA[Document{->REMOVERETAINTYPE(W)};]]></programlisting>
+      </para>
+      <para>
+        After applying this rule, words are possibly not visible anymore depending on the current filtering settings.
+      </para>
+    </section>
+  </section>
+
+
   <section id="ugr.tools.tm.language.actions.replace">
     <title>REPLACE</title>
     <para>

Modified: uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g (original)
+++ uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.g Thu Feb 14 15:27:29 2013
@@ -30,7 +30,7 @@ tokens {
  * under the License.
 */
 
-	package org.apache.uima.textmarker.ide.core.parser;
+	package org.apache.uima.textmarker.parser;
 }
 
 @lexer::members {
@@ -273,7 +273,21 @@ ENDSWITH 	
 	:	'ENDSWITH'	 
 	;
 
+ADDRETAINTYPE
+  : 'ADDRETAINTYPE'
+  ;
+
+REMOVERETAINTYPE
+  : 'REMOVERETAINTYPE'
+  ;
 
+ADDFILTERTYPE
+  : 'ADDFILTERTYPE'
+  ;
+
+REMOVEFILTERTYPE
+  : 'REMOVEFILTERTYPE'
+  ;
 
 NOT
 	:	'NOT'

Modified: uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens (original)
+++ uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerLexer.tokens Thu Feb 14 15:27:29 2013
@@ -1,152 +1,156 @@
-STAR=139
-FloatTypeSuffix=114
-OctalLiteral=112
-LOG=37
-CONTAINS=8
-REMOVE=66
-GREATEREQUAL=152
-MARKFAST=41
-CONDITION=92
-MATCHEDTEXT=72
-COUNT=14
-LOGN=101
-DYNAMICANCHORING=57
-NOT=64
-Identifier=124
-ACTION=93
-NOTEQUAL=149
-CLEAR=74
-VBAR=141
-DOUBLELIST=96
-ENDSWITH=63
-RPAREN=126
-CREATE=31
-GREATER=144
-SIN=102
-EXP=100
-CURRENTCOUNT=16
-COS=103
-TAN=104
-TYPELIST=99
-FloatString=87
-LESS=143
-REGEXP=25
-GET=69
-PARTOF=22
-UNMARK=53
-LAST=18
-COMMENT=154
-REMOVEDUPLICATE=67
-UNMARKALL=54
-RBRACK=128
-NEAR=20
-LINE_COMMENT=155
-IntegerTypeSuffix=109
-MARKSCORE=39
-REMOVESTRING=73
-TRANSFER=55
-LCURLY=129
-TRIE=7
-FILTERTYPE=46
-STRINGLIST=98
-MARKONCE=40
-ScriptString=80
-EngineString=81
-WS=153
-WORDTABLE=11
-WORDLIST=10
-AutomataBlockString=83
-FloatingPointLiteral=115
-INTLIST=95
-OR=21
-TRIM=58
-JavaIDDigit=123
-FLOATLIST=97
-CALL=47
-Annotation=5
-FALSE=107
-LESSEQUAL=151
-RessourceLiteral=119
-VOTE=27
-Letter=122
-EscapeSequence=116
-SIZE=71
-BasicAnnotationType=76
-LBRACK=127
-CharacterLiteral=117
-DEL=36
-ATTRIBUTE=34
-TypeString=84
-SHIFT=56
-Exponent=113
-ASSIGN_EQUAL=145
-RETAINTYPE=45
-AND=12
-TypeSystemString=90
-BlockString=82
-IntString=85
-HexDigit=108
-COLOR=35
-LPAREN=125
-POSITION=24
-IF=28
-AT=132
-LogLevel=77
-CONFIGURE=49
-SLASH=140
-THEN=75
-FILL=33
-COMMA=135
-IS=61
-AMPER=142
-REPLACE=44
-GETLIST=70
-EQUAL=148
-GATHER=32
-INLIST=17
-PLUS=137
-BooleanString=89
-GETFEATURE=52
-DOT=133
-ListIdentifier=6
-PARTOFNEQ=23
-BOOLEANLIST=94
-ADD=65
-MARKTABLE=42
-HexLiteral=110
-XOR=105
-PERCENT=146
-MARK=38
-PARSE=30
-PackageString=79
-OldColor=78
-MARKLAST=43
-MERGE=68
-CONTEXTCOUNT=13
-BEFORE=59
-EXEC=48
-MINUS=138
-AFTER=60
-DecimalLiteral=111
-SEMI=136
-TRUE=106
-FEATURE=29
-SymbolString=91
-COLON=134
-StringLiteral=118
-StringString=88
-SCORE=26
-QUESTION=147
-UnicodeEscape=120
-RCURLY=130
-STARTSWITH=62
-ASSIGN=50
-TOTALCOUNT=15
-DECLARE=9
-DocComment=4
-MOFN=19
-OctalEscape=121
-SETFEATURE=51
-DoubleString=86
-CIRCUMFLEX=131
-ALT_NOTEQUAL=150
+ACTION=4
+ADD=5
+ADDFILTERTYPE=6
+ADDRETAINTYPE=7
+AFTER=8
+ALT_NOTEQUAL=9
+AMPER=10
+AND=11
+ASSIGN=12
+ASSIGN_EQUAL=13
+AT=14
+ATTRIBUTE=15
+Annotation=16
+AutomataBlockString=17
+BEFORE=18
+BOOLEANLIST=19
+BasicAnnotationType=20
+BlockString=21
+BooleanString=22
+CALL=23
+CIRCUMFLEX=24
+CLEAR=25
+COLON=26
+COLOR=27
+COMMA=28
+COMMENT=29
+CONDITION=30
+CONFIGURE=31
+CONTAINS=32
+CONTEXTCOUNT=33
+COS=34
+COUNT=35
+CREATE=36
+CURRENTCOUNT=37
+CharacterLiteral=38
+DECLARE=39
+DEL=40
+DOT=41
+DOUBLELIST=42
+DYNAMICANCHORING=43
+DecimalLiteral=44
+DocComment=45
+DoubleString=46
+ENDSWITH=47
+EQUAL=48
+EXEC=49
+EXP=50
+EngineString=51
+EscapeSequence=52
+Exponent=53
+FALSE=54
+FEATURE=55
+FILL=56
+FILTERTYPE=57
+FLOATLIST=58
+FloatString=59
+FloatTypeSuffix=60
+FloatingPointLiteral=61
+GATHER=62
+GET=63
+GETFEATURE=64
+GETLIST=65
+GREATER=66
+GREATEREQUAL=67
+HexDigit=68
+HexLiteral=69
+IF=70
+INLIST=71
+INTLIST=72
+IS=73
+Identifier=74
+IntString=75
+IntegerTypeSuffix=76
+JavaIDDigit=77
+LAST=78
+LBRACK=79
+LCURLY=80
+LESS=81
+LESSEQUAL=82
+LINE_COMMENT=83
+LOG=84
+LOGN=85
+LPAREN=86
+Letter=87
+ListIdentifier=88
+LogLevel=89
+MARK=90
+MARKFAST=91
+MARKLAST=92
+MARKONCE=93
+MARKSCORE=94
+MARKTABLE=95
+MATCHEDTEXT=96
+MERGE=97
+MINUS=98
+MOFN=99
+NEAR=100
+NOT=101
+NOTEQUAL=102
+OR=103
+OctalEscape=104
+OctalLiteral=105
+OldColor=106
+PARSE=107
+PARTOF=108
+PARTOFNEQ=109
+PERCENT=110
+PLUS=111
+POSITION=112
+PackageString=113
+QUESTION=114
+RBRACK=115
+RCURLY=116
+REGEXP=117
+REMOVE=118
+REMOVEDUPLICATE=119
+REMOVEFILTERTYPE=120
+REMOVERETAINTYPE=121
+REMOVESTRING=122
+REPLACE=123
+RETAINTYPE=124
+RPAREN=125
+RessourceLiteral=126
+SCORE=127
+SEMI=128
+SETFEATURE=129
+SHIFT=130
+SIN=131
+SIZE=132
+SLASH=133
+STAR=134
+STARTSWITH=135
+STRINGLIST=136
+ScriptString=137
+StringLiteral=138
+StringString=139
+SymbolString=140
+TAN=141
+THEN=142
+TOTALCOUNT=143
+TRANSFER=144
+TRIE=145
+TRIM=146
+TRUE=147
+TYPELIST=148
+TypeString=149
+TypeSystemString=150
+UNMARK=151
+UNMARKALL=152
+UnicodeEscape=153
+VBAR=154
+VOTE=155
+WORDLIST=156
+WORDTABLE=157
+WS=158
+XOR=159

Modified: uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g (original)
+++ uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/antlr3/org/apache/uima/textmarker/ide/core/parser/TextMarkerParser.g Thu Feb 14 15:27:29 2013
@@ -1194,6 +1194,10 @@ result = ActionFactory.createEmptyAction
 	| a = actionConfigure
 	| a = actionDynamicAnchoring
 	| a = actionTrim
+	| a = actionAddFilterType
+	| a = actionAddRetainType
+	| a = actionRemoveFilterType
+	| a = actionRemoveRetainType
 	| (a = externalAction)=> a = externalAction
 	| a = variableAction
 	) {result = a;}
@@ -1455,6 +1459,59 @@ List<Expression> list = new ArrayList<Ex
     {action = ActionFactory.createAction(name, list);}
     ;       
 
+actionAddFilterType returns [TextMarkerAction action = null]
+@init {
+List<Expression> list = new ArrayList<Expression>();
+}
+    :   
+    name = ADDFILTERTYPE (LPAREN id = typeExpression {list.add(id);} 
+    {action = ActionFactory.createAction(name, list);}
+    (COMMA id = typeExpression {list.add(id);})* 
+    {action = ActionFactory.createAction(name, list);}
+    RPAREN)
+    {action = ActionFactory.createAction(name, list);}
+    ;   
+
+actionAddRetainType returns [TextMarkerAction action = null]
+@init {
+List<Expression> list = new ArrayList<Expression>();
+}
+    :   
+    name = ADDRETAINTYPE (LPAREN id = typeExpression {list.add(id);} 
+    {action = ActionFactory.createAction(name, list);}
+    (COMMA id = typeExpression {list.add(id);})* 
+    {action = ActionFactory.createAction(name, list);}
+    RPAREN)
+    {action = ActionFactory.createAction(name, list);}
+    ;   
+
+
+actionRemoveFilterType returns [TextMarkerAction action = null]
+@init {
+List<Expression> list = new ArrayList<Expression>();
+}
+    :   
+    name = REMOVEFILTERTYPE (LPAREN id = typeExpression {list.add(id);} 
+    {action = ActionFactory.createAction(name, list);}
+    (COMMA id = typeExpression {list.add(id);})* 
+    {action = ActionFactory.createAction(name, list);}
+    RPAREN)
+    {action = ActionFactory.createAction(name, list);}
+    ;   
+
+actionRemoveRetainType returns [TextMarkerAction action = null]
+@init {
+List<Expression> list = new ArrayList<Expression>();
+}
+    :   
+    name = REMOVERETAINTYPE (LPAREN id = typeExpression {list.add(id);} 
+    {action = ActionFactory.createAction(name, list);}
+    (COMMA id = typeExpression {list.add(id);})* 
+    {action = ActionFactory.createAction(name, list);}
+    RPAREN)
+    {action = ActionFactory.createAction(name, list);}
+    ; 
+
 actionCall returns [TextMarkerAction action = null]
 @init {
 String string = "";

Modified: uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java
URL: http://svn.apache.org/viewvc/uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java?rev=1446230&r1=1446229&r2=1446230&view=diff
==============================================================================
--- uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java (original)
+++ uima/sandbox/textmarker/trunk/textmarker-ep-ide/src/main/java/org/apache/uima/textmarker/ide/core/TextMarkerKeywords.java Thu Feb 14 15:27:29 2013
@@ -21,22 +21,21 @@ package org.apache.uima.textmarker.ide.c
 
 public class TextMarkerKeywords implements ITextMarkerKeywords {
 
-  private static String[] condition = { "CONTAINS", "IF", "INLIST", "PARTOF",
-      "TOTALCOUNT", "CURRENTCOUNT", "CONTEXTCOUNT", "LAST", "VOTE", "COUNT", "NEAR", "REGEXP",
-      "POSITION", "SCORE", "ISLISTEMPTY", "MOFN", "AND", "OR", "FEATURE", "PARSE", "IS", "BEFORE",
-      "AFTER", "STARTSWITH", "ENDSWITH", "PARTOFNEQ", "SIZE", "NOT" };
+  private static String[] condition = { "CONTAINS", "IF", "INLIST", "PARTOF", "TOTALCOUNT",
+      "CURRENTCOUNT", "CONTEXTCOUNT", "LAST", "VOTE", "COUNT", "NEAR", "REGEXP", "POSITION",
+      "SCORE", "ISLISTEMPTY", "MOFN", "AND", "OR", "FEATURE", "PARSE", "IS", "BEFORE", "AFTER",
+      "STARTSWITH", "ENDSWITH", "PARTOFNEQ", "SIZE", "NOT" };
 
   private static String[] declaration = { "WORDLIST", "DECLARE", "BOOLEAN", "PACKAGE", "TYPE",
-      "TYPESYSTEM", "INT", "DOUBLE", "FLOAT", "STRING", "SCRIPT", "WORDTABLE", "ENGINE", 
-      "BLOCK", "RULES", "BOOLEANLIST", "INTLIST", "DOUBLELIST", "FLOATLIST","STRINGLIST",
-      "TYPELIST" };
-
-  private static String[] action = { "DEL", "CALL", "MARK", "MARKSCORE", "COLOR", "LOG",
-      "REPLACE", "FILLOBJECT", "RETAINTYPE", "SETFEATURE", "ASSIGN", "PUTINLIST",
-      "ATTRIBUTE", "MARKFAST", "FILTERTYPE", "CREATE", "FILL", "MARKTABLE",
-      "UNMARK", "TRANSFER", "MARKONCE", "TRIE", "GATHER", "EXEC", "MARKLAST", "ADD", "REMOVE",
-      "MERGE", "GET", "GETLIST", "REMOVEDUPLICATE", "GETFEATURE", "MATCHEDTEXT", "CLEAR",
-      "UNMARKALL", "SHIFT", "CONFIGURE", "DYNAMICANCHORING", "TRIM" };
+      "TYPESYSTEM", "INT", "DOUBLE", "FLOAT", "STRING", "SCRIPT", "WORDTABLE", "ENGINE", "BLOCK",
+      "RULES", "BOOLEANLIST", "INTLIST", "DOUBLELIST", "FLOATLIST", "STRINGLIST", "TYPELIST" };
+
+  private static String[] action = { "DEL", "CALL", "MARK", "MARKSCORE", "COLOR", "LOG", "REPLACE",
+      "FILLOBJECT", "RETAINTYPE", "SETFEATURE", "ASSIGN", "PUTINLIST", "ATTRIBUTE", "MARKFAST",
+      "FILTERTYPE", "CREATE", "FILL", "MARKTABLE", "UNMARK", "TRANSFER", "MARKONCE", "TRIE",
+      "GATHER", "EXEC", "MARKLAST", "ADD", "REMOVE", "MERGE", "GET", "GETLIST", "REMOVEDUPLICATE",
+      "GETFEATURE", "MATCHEDTEXT", "CLEAR", "UNMARKALL", "SHIFT", "CONFIGURE", "DYNAMICANCHORING",
+      "TRIM", "ADDRETAINTYPE", "REMOVERETAINTYPE", "ADDFILTERTYPE", "REMOVEFILTERTYPE" };
 
   private static String[] basic = { "ALL", "ANY", "AMP", "BREAK", "W", "NUM", "PM", "Document",
       "MARKUP", "SW", "CW", "CAP", "PERIOD", "NBSP", "SENTENCEEND", "COLON", "COMMA", "SEMICOLON",