本文整理汇总了Java中org.fife.ui.rsyntaxtextarea.TokenTypes.VARIABLE属性的典型用法代码示例。如果您正苦于以下问题:Java TokenTypes.VARIABLE属性的具体用法?Java TokenTypes.VARIABLE怎么用?Java TokenTypes.VARIABLE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.fife.ui.rsyntaxtextarea.TokenTypes
的用法示例。
在下文中一共展示了TokenTypes.VARIABLE属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetMarkOccurrencesOfTokenType
@Test
public void testGetMarkOccurrencesOfTokenType() {
UnixShellTokenMaker tm = new UnixShellTokenMaker();
for (int i=0; i<TokenTypes.DEFAULT_NUM_TOKEN_TYPES; i++) {
boolean expected = i == TokenTypes.IDENTIFIER ||
i == TokenTypes.VARIABLE;
Assert.assertEquals(expected, tm.getMarkOccurrencesOfTokenType(i));
}
}
示例2: test_api_getMarkOccurrencesOfTokenType
@Test
public void test_api_getMarkOccurrencesOfTokenType() {
TokenMaker tm = createTokenMaker();
// NOTE: This array must be sorted for this test to work!
int[] expected = { TokenTypes.VARIABLE, TokenTypes.IDENTIFIER, };
for (int i = 0; i < TokenTypes.DEFAULT_NUM_TOKEN_TYPES; i++) {
boolean shouldMark = Arrays.binarySearch(expected, i) >= 0;
Assert.assertEquals(shouldMark, tm.getMarkOccurrencesOfTokenType(i));
}
}
示例3: testGetMarkOccurrencesOfTokenType
@Test
public void testGetMarkOccurrencesOfTokenType() {
WindowsBatchTokenMaker tm = new WindowsBatchTokenMaker();
for (int i=0; i<TokenTypes.DEFAULT_NUM_TOKEN_TYPES; i++) {
boolean expected = i == TokenTypes.IDENTIFIER ||
i == TokenTypes.VARIABLE;
Assert.assertEquals(expected, tm.getMarkOccurrencesOfTokenType(i));
}
}
示例4: getMarkOccurrencesOfTokenType
/**
* {@inheritDoc}
*/
@Override
public boolean getMarkOccurrencesOfTokenType(int type) {
return type == TokenTypes.VARIABLE ||
super.getMarkOccurrencesOfTokenType(type);
}