Merge remote-tracking branch 'origin/master'

This commit is contained in:
anna
2012-07-12 21:29:57 +02:00
26 changed files with 432 additions and 63 deletions
@@ -1,7 +1,7 @@
class FooFooFooFooFoo {
{
int a = 0;
ABCD<caret>
foo(new String[]{"a"}, 1);
}
{
int a = 0;
ABCD<caret>
foo(new String[]{"a"}, 1);
}
}
@@ -1,9 +1,9 @@
import foo.bar.ABCDEF;
class FooFooFooFooFoo {
{
int a = 0;
ABCDEF<caret>
foo(new String[]{"a"}, 1);
}
{
int a = 0;
ABCDEF<caret>
foo(new String[]{"a"}, 1);
}
}
@@ -1,4 +1,4 @@
PsiJavaFile:Errors4.java.txt
PsiJavaFile:Errors4.java
PsiImportList
<empty list>
PsiClass:OutOfMemoryExceptionDemo
@@ -0,0 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
private static class My extends JComponent {
private My(Map<String, List<Object>> param) {
setBorder(null);
param
list();
}
}
@@ -0,0 +1,109 @@
PsiJavaFile:Errors5.java
PsiImportList
<empty list>
PsiClass:My
PsiComment(C_STYLE_COMMENT)('/*\n * Copyright 2000-2012 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */')
PsiWhiteSpace('\n')
PsiModifierList:private static
PsiKeyword:private('private')
PsiWhiteSpace(' ')
PsiKeyword:static('static')
PsiWhiteSpace(' ')
PsiKeyword:class('class')
PsiWhiteSpace(' ')
PsiIdentifier:My('My')
PsiTypeParameterList
<empty list>
PsiWhiteSpace(' ')
PsiReferenceList
PsiKeyword:extends('extends')
PsiWhiteSpace(' ')
PsiJavaCodeReferenceElement:JComponent
PsiIdentifier:JComponent('JComponent')
PsiReferenceParameterList
<empty list>
PsiReferenceList
<empty list>
PsiWhiteSpace(' ')
PsiJavaToken:LBRACE('{')
PsiWhiteSpace('\n ')
PsiMethod:My
PsiModifierList:private
PsiKeyword:private('private')
PsiTypeParameterList
<empty list>
PsiWhiteSpace(' ')
PsiIdentifier:My('My')
PsiParameterList:(Map<String, List<Object>> param)
PsiJavaToken:LPARENTH('(')
PsiParameter:param
PsiModifierList:
<empty list>
PsiTypeElement:Map<String, List<Object>>
PsiJavaCodeReferenceElement:Map<String, List<Object>>
PsiIdentifier:Map('Map')
PsiReferenceParameterList
PsiJavaToken:LT('<')
PsiTypeElement:String
PsiJavaCodeReferenceElement:String
PsiIdentifier:String('String')
PsiReferenceParameterList
<empty list>
PsiJavaToken:COMMA(',')
PsiWhiteSpace(' ')
PsiTypeElement:List<Object>
PsiJavaCodeReferenceElement:List<Object>
PsiIdentifier:List('List')
PsiReferenceParameterList
PsiJavaToken:LT('<')
PsiTypeElement:Object
PsiJavaCodeReferenceElement:Object
PsiIdentifier:Object('Object')
PsiReferenceParameterList
<empty list>
PsiJavaToken:GT('>')
PsiJavaToken:GT('>')
PsiWhiteSpace(' ')
PsiIdentifier:param('param')
PsiJavaToken:RPARENTH(')')
PsiReferenceList
<empty list>
PsiWhiteSpace(' ')
PsiCodeBlock
PsiJavaToken:LBRACE('{')
PsiWhiteSpace('\n ')
PsiExpressionStatement
PsiMethodCallExpression:setBorder(null)
PsiReferenceExpression:setBorder
PsiReferenceParameterList
<empty list>
PsiIdentifier:setBorder('setBorder')
PsiExpressionList
PsiJavaToken:LPARENTH('(')
PsiLiteralExpression:null
PsiJavaToken:NULL_KEYWORD('null')
PsiJavaToken:RPARENTH(')')
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n ')
PsiExpressionStatement
PsiReferenceExpression:param
PsiReferenceParameterList
<empty list>
PsiIdentifier:param('param')
PsiErrorElement:';' expected
<empty list>
PsiWhiteSpace('\n ')
PsiExpressionStatement
PsiMethodCallExpression:list()
PsiReferenceExpression:list
PsiReferenceParameterList
<empty list>
PsiIdentifier:list('list')
PsiExpressionList
PsiJavaToken:LPARENTH('(')
PsiJavaToken:RPARENTH(')')
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n ')
PsiJavaToken:RBRACE('}')
PsiWhiteSpace('\n')
PsiJavaToken:RBRACE('}')
@@ -1,8 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.annotationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
/**
* @author ven
*/
@@ -12,12 +26,8 @@ public class AnnotationDeclarationParsingTest extends JavaParsingTestCase {
}
public void testSimple() { doTest(true); }
public void testDefault() { doTest(true); }
public void testNested() { doTest(true); }
public void testInner() { doTest(true); }
public void testOtherMembers() { doTest(true); }
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.annotationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.declarationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class ClassParsingTest extends JavaParsingTestCase {
public ClassParsingTest() {
super("parser-full/declarationParsing/class");
@@ -41,15 +54,6 @@ public class ClassParsingTest extends JavaParsingTestCase {
public void testErrors1() { doTest(true); }
public void testErrors2() { doTest(true); }
public void testErrors3() { doTest(true); }
public void testErrors4() {
String ext = myFileExt;
try {
myFileExt = ext + ".txt"; // TODO this test produces OOME so we use nondefault extension, the test could be simplified once the fix is in place
doTest(true);
}
finally {
myFileExt = ext;
}
}
public void testErrors4() { doTest(true); }
public void testErrors5() { doTest(true); }
}
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.declarationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class CommentBindingTest extends JavaParsingTestCase {
public CommentBindingTest() {
super("parser-full/declarationParsing/commentBinding");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.declarationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class FieldParsingTest extends JavaParsingTestCase {
public FieldParsingTest() {
super("parser-full/declarationParsing/field");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.declarationParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class MethodParsingTest extends JavaParsingTestCase {
public MethodParsingTest() {
super("parser-full/declarationParsing/method");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class AssertParsingTest extends JavaParsingTestCase {
public AssertParsingTest() {
super("parser-full/statementParsing/assert");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class AssignmentParsingTest extends JavaParsingTestCase {
public AssignmentParsingTest() {
super("parser-full/statementParsing/assignment");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class CodeBlockParsingTest extends JavaParsingTestCase {
public CodeBlockParsingTest() {
super("parser-full/statementParsing/codeBlock");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class DeclarationsWithGenericsParsingTest extends JavaParsingTestCase {
public DeclarationsWithGenericsParsingTest() {
super("parser-full/statementParsing/genericsParsing");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class DoWhileParsingTest extends JavaParsingTestCase {
public DoWhileParsingTest() {
super("parser-full/statementParsing/do-while");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class ForParsingTest extends JavaParsingTestCase {
public ForParsingTest() {
super("parser-full/statementParsing/for");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class IfParsingTest extends JavaParsingTestCase {
public IfParsingTest() {
super("parser-full/statementParsing/if");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class LabelParsingTest extends JavaParsingTestCase {
public LabelParsingTest() {
super("parser-full/statementParsing/label");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class ReturnParsingTest extends JavaParsingTestCase {
public ReturnParsingTest() {
super("parser-full/statementParsing/return");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class SwitchParsingTest extends JavaParsingTestCase {
public SwitchParsingTest() {
super("parser-full/statementParsing/switch");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class SynchronizedParsingTest extends JavaParsingTestCase {
public SynchronizedParsingTest() {
super("parser-full/statementParsing/synchronized");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class ThrowParsingTest extends JavaParsingTestCase {
public ThrowParsingTest() {
super("parser-full/statementParsing/throw");
@@ -1,9 +1,22 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.lang.java.parser.statementParsing;
import com.intellij.lang.java.parser.JavaParsingTestCase;
public class WhileParsingTest extends JavaParsingTestCase {
public WhileParsingTest() {
super("parser-full/statementParsing/while");