[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-patch] CModelBuilder adds line numbers + JUnit test
|
>
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_000_01C30818.3D3E5B80
> Content-Type: multipart/alternative;
> boundary="----_=_NextPart_001_01C30818.3D3E5B80"
>
>
> ------_=_NextPart_001_01C30818.3D3E5B80
> Content-Type: text/plain
>
> In this patch, the CModelBuilder assigns line numbers for model elements.
IMHO this patch is incorrect; ICElement
There is no need for getStartLine() nor getEndLine on ICElement, since
not all C elements contain source line information, for example,
IBinary, ICProject.
The ones that has source code information implement ISourceReference
that provides a ISourceRange to retrieve the line informations.
Please look at ISourceRange and ISourceReference.
> RCS file: =
> /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ICElem=
> ent.java,v
> retrieving revision 1.7
> diff -u -r1.7 ICElement.java
> --- model/org/eclipse/cdt/core/model/ICElement.java 11 Apr 2003 =
> 14:36:51 -0000 1.7
> +++ model/org/eclipse/cdt/core/model/ICElement.java 21 Apr 2003 =
> 14:10:56 -0000
> @@ -294,4 +294,14 @@
> * exception occurs while accessing its corresponding resource
> */
> boolean isStructureKnown() throws CModelException;
> + /**
> + * Returns the start line of the CElement
> + * @return
> + */
> + int getStartLine();
> + /**
> + * Returns the end line of the CElement
> + * @return
> + */
> + int getEndLine();
> }