org.eclipse.jface.text.rules.WordPatternRule.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(168)

本文整理了Java中org.eclipse.jface.text.rules.WordPatternRule.<init>()方法的一些代码示例,展示了WordPatternRule.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WordPatternRule.<init>()方法的具体详情如下:
包路径:org.eclipse.jface.text.rules.WordPatternRule
类名称:WordPatternRule
方法名:<init>

WordPatternRule.<init>介绍

[英]Creates a rule for the given starting and ending word pattern which, if detected, will return the specified token. A word detector is used to identify words.
[中]为给定的起始和结束字模式创建规则,如果检测到该规则,将返回指定的标记。单词检测器用于识别单词。

代码示例

代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor

rules.add(new IndicatorCharacterRule(indicatorCharToken));
rules.add(new WhitespaceRule(whitespaceToken));
rules.add(new WordPatternRule(new AnchorWordDetector(), "&", "", anchorToken));
rules.add(new WordPatternRule(new AnchorWordDetector(), "*", "", aliasToken));
rules.add(new WordPatternRule(new TagWordDetector(), "!", "", tagPropToken));

代码示例来源:origin: oyse/yedit

rules.add(new IndicatorCharacterRule(indicatorCharToken));
rules.add(new WhitespaceRule(whitespaceToken));
rules.add(new WordPatternRule(new AnchorWordDetector(), "&", "", anchorToken));
rules.add(new WordPatternRule(new AnchorWordDetector(), "*", "", aliasToken));
rules.add(new WordPatternRule(new TagWordDetector(), "!", "", tagPropToken));

相关文章