This commit is contained in:
Alexey Kudravtsev
2010-03-25 13:29:33 +03:00
parent 9f3fe502bb
commit c2f26975c4
@@ -134,7 +134,7 @@ public class PsiJavaParserFacadeImpl extends PsiParserFacadeImpl implements PsiJ
TreeElement decl = getJavaParsingContext(holderElement, level).getDeclarationParsing().parseDeclarationText(myManager, level, text,
DeclarationParsing.Context.CLASS_CONTEXT);
if (decl == null || decl.getElementType() != JavaElementType.METHOD) {
throw new IncorrectOperationException("Incorrect method \"" + text + "\".");
throw new IncorrectOperationException("Incorrect method '" + text + "'. Context:"+context+"; Level:"+level+"; parsed: "+(decl == null ? null : DebugUtil.treeToString(decl, false)));
}
holderElement.rawAddChildren(decl);
return (PsiMethod)SourceTreeToPsiMap.treeElementToPsi(decl);