org.drools.eclipse.editors.scanners
Class DRLPartionScanner

java.lang.Object
  extended by org.eclipse.jface.text.rules.RuleBasedScanner
      extended by org.eclipse.jface.text.rules.BufferedRuleBasedScanner
          extended by org.eclipse.jface.text.rules.RuleBasedPartitionScanner
              extended by org.drools.eclipse.editors.scanners.DRLPartionScanner
All Implemented Interfaces:
org.eclipse.jface.text.rules.ICharacterScanner, org.eclipse.jface.text.rules.IPartitionTokenScanner, org.eclipse.jface.text.rules.ITokenScanner

public class DRLPartionScanner
extends org.eclipse.jface.text.rules.RuleBasedPartitionScanner

Break apart the rule source, very very simply. The job of the partitioner is to identify if the cursor position is in a rule block, or not. Comments are also generated as a separate partition. TODO: add support for dialect based partitioning for correct syntaxhighlighting


Field Summary
static String[] LEGAL_CONTENT_TYPES
           
static String RULE_COMMENT
           
static String RULE_PART_CONTENT
           
 
Fields inherited from class org.eclipse.jface.text.rules.RuleBasedPartitionScanner
fContentType, fPartitionOffset
 
Fields inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
fColumn, fDefaultReturnToken, fDelimiters, fDocument, fOffset, fRangeEnd, fRules, fTokenOffset, UNDEFINED
 
Fields inherited from interface org.eclipse.jface.text.rules.ICharacterScanner
EOF
 
Constructor Summary
DRLPartionScanner()
           
 
Method Summary
 
Methods inherited from class org.eclipse.jface.text.rules.RuleBasedPartitionScanner
nextToken, setPartialRange, setPredicateRules, setRange, setRules
 
Methods inherited from class org.eclipse.jface.text.rules.BufferedRuleBasedScanner
read, setBufferSize, unread
 
Methods inherited from class org.eclipse.jface.text.rules.RuleBasedScanner
getColumn, getLegalLineDelimiters, getTokenLength, getTokenOffset, setDefaultReturnToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.text.rules.ITokenScanner
getTokenLength, getTokenOffset
 

Field Detail

RULE_PART_CONTENT

public static final String RULE_PART_CONTENT
See Also:
Constant Field Values

RULE_COMMENT

public static final String RULE_COMMENT
See Also:
Constant Field Values

LEGAL_CONTENT_TYPES

public static final String[] LEGAL_CONTENT_TYPES
Constructor Detail

DRLPartionScanner

public DRLPartionScanner()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.