Summary: | ast: Message should have length | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Adam Kiezun <akiezun> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jeem |
Version: | 2.0 | ||
Target Milestone: | 2.0 M6 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Adam Kiezun
2002-05-06 12:40:29 EDT
forgot to point directly to Olivier I recommend adding Messages.length, and not exposing the underlying IProblems. We don't want to expose the fact that a compiler is running underneath. So we will simply add a getLength() method on the Message class. We might want to rename the getSourcePosition() to getStartPosition() to be more consistent with the ASTNode APIs. getLength() will have a meaning only if getSourcePosition() is different from -1. Is this fine for you? yes, although removing the method altogether and introducing IProblem[] CompilationUnit::getProblems() would be much better (IProblems are light-weight, don't hold on to any internal stuff, have more useful info and you have them anyway - and create Messages from them) (and then you could simply remove that Message class that is merely a subset of IProblem) but, like i said, getLength() on Message will do fine renaming is ok too - please deprecate first Fixed and released in HEAD. |