Community
Participate
Working Groups
I20060223-1656 The javadoc of IJavaElement#isStructureKnown() seems to be somewhat outdated. According to bug 106603 comment 3, isStructureKnown() only seems to be implemented for ICompilationUnits and returns true for all other cases. AFAICS, it returns false iff a syntax error was detected while parsing. It also says: "If the structure of an element is unknown, navigations will return reasonable defaults. For example, <code>getChildren</code> will return an empty collection." But if you e.g. take the CU ... class Test { void m() { int err } } ... then ICompilationUnit#isStructureKnown() is false, but #getChildren() is not empty. The javadoc should tell that it just checks for syntax errors in a CU and it should not repudiate the existence of the CU's children.
Created attachment 72956 [details] Proposed fix
Fix released for 3.4M1 in HEAD.
Verified for 3.4M1 using build I20070802-0800.