mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Bugfix
This commit is contained in:
parent
65f791c02b
commit
6e9e2eb2ca
@ -1,48 +1,48 @@
|
|||||||
Simple File
|
Simple File(0,433)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('# You are reading the ".properties" entry.')
|
PsiComment(SimpleTokenType.COMMENT)('# You are reading the ".properties" entry.')(0,42)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(42,43)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('! The exclamation mark can also mark text as comments.')
|
PsiComment(SimpleTokenType.COMMENT)('! The exclamation mark can also mark text as comments.')(43,97)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(97,98)
|
||||||
SimplePropertyImpl(PROPERTY)
|
SimplePropertyImpl(PROPERTY)(98,132)
|
||||||
PsiElement(SimpleTokenType.KEY)('website')
|
PsiElement(SimpleTokenType.KEY)('website')(98,105)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(105,106)
|
||||||
PsiElement(SimpleTokenType.SEPARATOR)('=')
|
PsiElement(SimpleTokenType.SEPARATOR)('=')(106,107)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(107,108)
|
||||||
PsiElement(SimpleTokenType.VALUE)('http://en.wikipedia.org/')
|
PsiElement(SimpleTokenType.VALUE)('http://en.wikipedia.org/')(108,132)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(132,133)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(133,134)
|
||||||
SimplePropertyImpl(PROPERTY)
|
SimplePropertyImpl(PROPERTY)(134,152)
|
||||||
PsiElement(SimpleTokenType.KEY)('language')
|
PsiElement(SimpleTokenType.KEY)('language')(134,142)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(142,143)
|
||||||
PsiElement(SimpleTokenType.SEPARATOR)('=')
|
PsiElement(SimpleTokenType.SEPARATOR)('=')(143,144)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(144,145)
|
||||||
PsiElement(SimpleTokenType.VALUE)('English')
|
PsiElement(SimpleTokenType.VALUE)('English')(145,152)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(152,153)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('# The backslash below tells the application to continue reading')
|
PsiComment(SimpleTokenType.COMMENT)('# The backslash below tells the application to continue reading')(153,216)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(216,217)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('# the value onto the next line.')
|
PsiComment(SimpleTokenType.COMMENT)('# the value onto the next line.')(217,248)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(248,249)
|
||||||
SimplePropertyImpl(PROPERTY)
|
SimplePropertyImpl(PROPERTY)(249,292)
|
||||||
PsiElement(SimpleTokenType.KEY)('message')
|
PsiElement(SimpleTokenType.KEY)('message')(249,256)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(256,257)
|
||||||
PsiElement(SimpleTokenType.SEPARATOR)('=')
|
PsiElement(SimpleTokenType.SEPARATOR)('=')(257,258)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(258,259)
|
||||||
PsiElement(SimpleTokenType.VALUE)('Welcome to \\n Wikipedia!')
|
PsiElement(SimpleTokenType.VALUE)('Welcome to \\n Wikipedia!')(259,292)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(292,293)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('# Add spaces to the key')
|
PsiComment(SimpleTokenType.COMMENT)('# Add spaces to the key')(293,316)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(316,317)
|
||||||
SimplePropertyImpl(PROPERTY)
|
SimplePropertyImpl(PROPERTY)(317,410)
|
||||||
PsiElement(SimpleTokenType.KEY)('key\ with\ spaces')
|
PsiElement(SimpleTokenType.KEY)('key\ with\ spaces')(317,334)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(334,335)
|
||||||
PsiElement(SimpleTokenType.SEPARATOR)('=')
|
PsiElement(SimpleTokenType.SEPARATOR)('=')(335,336)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(336,337)
|
||||||
PsiElement(SimpleTokenType.VALUE)('This is the value that could be looked up with the key "key with spaces".')
|
PsiElement(SimpleTokenType.VALUE)('This is the value that could be looked up with the key "key with spaces".')(337,410)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(410,411)
|
||||||
PsiComment(SimpleTokenType.COMMENT)('# Unicode')
|
PsiComment(SimpleTokenType.COMMENT)('# Unicode')(411,420)
|
||||||
PsiElement(SimpleTokenType.CRLF)('\n')
|
PsiElement(SimpleTokenType.CRLF)('\n')(420,421)
|
||||||
SimplePropertyImpl(PROPERTY)
|
SimplePropertyImpl(PROPERTY)(421,433)
|
||||||
PsiElement(SimpleTokenType.KEY)('tab')
|
PsiElement(SimpleTokenType.KEY)('tab')(421,424)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(424,425)
|
||||||
PsiElement(SimpleTokenType.SEPARATOR)(':')
|
PsiElement(SimpleTokenType.SEPARATOR)(':')(425,426)
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')(426,427)
|
||||||
PsiElement(SimpleTokenType.VALUE)('\u0009')
|
PsiElement(SimpleTokenType.VALUE)('\u0009')(427,433)
|
@ -8,7 +8,7 @@ public class SimpleParsingTest extends ParsingTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testParsingTestData() {
|
public void testParsingTestData() {
|
||||||
doTest(true, false);
|
doTest(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -25,14 +25,4 @@ public class SimpleParsingTest extends ParsingTestCase {
|
|||||||
protected boolean includeRanges() {
|
protected boolean includeRanges() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doTest(boolean checkResult, boolean suppressErrors) {
|
|
||||||
super.doTest(checkResult);
|
|
||||||
if (!suppressErrors) {
|
|
||||||
assertFalse(
|
|
||||||
"PsiFile contains error elements",
|
|
||||||
toParseTreeText(myFile, skipSpaces(), includeRanges()).contains("PsiErrorElement")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user