本文整理汇总了Java中org.fife.ui.rsyntaxtextarea.SyntaxConstants.SYNTAX_STYLE_NONE属性的典型用法代码示例。如果您正苦于以下问题:Java SyntaxConstants.SYNTAX_STYLE_NONE属性的具体用法?Java SyntaxConstants.SYNTAX_STYLE_NONE怎么用?Java SyntaxConstants.SYNTAX_STYLE_NONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.fife.ui.rsyntaxtextarea.SyntaxConstants
的用法示例。
在下文中一共展示了SyntaxConstants.SYNTAX_STYLE_NONE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testParse_noLanguage
@Test
public void testParse_noLanguage() throws Exception {
TaskTagParser parser = new TaskTagParser();
parser.setTaskPattern(null);
RSyntaxDocument doc = new RSyntaxDocument(
SyntaxConstants.SYNTAX_STYLE_NONE);
doc.insertString(0, "/* TODO: Fix this */ for", null);
ParseResult res = parser.parse(doc, doc.getSyntaxStyle());
Assert.assertEquals(parser, res.getParser());
Assert.assertEquals(0, res.getFirstLineParsed());
Assert.assertEquals(0, res.getLastLineParsed());
List<ParserNotice> notices = res.getNotices();
Assert.assertEquals(0, notices.size());
doc.setSyntaxStyle((String)null); // Not really valid, but whatever
res = parser.parse(doc, doc.getSyntaxStyle());
Assert.assertEquals(parser, res.getParser());
Assert.assertEquals(0, res.getFirstLineParsed());
Assert.assertEquals(0, res.getLastLineParsed());
notices = res.getNotices();
Assert.assertEquals(0, notices.size());
}
示例2: JavaSnippetDocument
/**
* Create a new instance.
*/
public JavaSnippetDocument() {
super(SyntaxConstants.SYNTAX_STYLE_NONE);
try {
addGuardedSection(
GUARDED_IMPORTS, getLength());
insertString(getLength(), " \n", null);
addGuardedSection(
GUARDED_FIELDS, getLength());
insertString(getLength(), " \n", null);
GuardedSection bodyStart = addGuardedSection(
GUARDED_BODY_START, getLength());
bodyStart.setText("// expression start\n"
+ " public void snippet() "
+ "throws TypeException, ColumnException, Abort {\n");
insertString(getLength(), " \n", null);
GuardedSection bodyEnd = addGuardedFooterSection(
GUARDED_BODY_END, getLength());
bodyEnd.setText("// expression end\n"
+ " }\n"
+ "}");
} catch (BadLocationException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例3: setLanguage
/**
* Sets the language of the text area.
* @param language
*/
public void setLanguage(String language) {
final String style = languageProperties.getProperty(language);
if (style == null) {
super.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
} else {
super.setSyntaxEditingStyle(style);
}
}
示例4: createDocument
@Override
protected Document createDocument() {
return new RSyntaxDocument(SyntaxConstants.SYNTAX_STYLE_NONE);
}
示例5: getSyntaxName
public String getSyntaxName() {
return SyntaxConstants.SYNTAX_STYLE_NONE;
}