[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-patch] CModelBuilder adds line numbers + JUnit test
|
You are Right. Except that this patch did not put this functionality in
CElement. It was always there. It only exposed the two functions through the
ICElement interface.
I will send another patch to move line numbers into source manipulation.
Hoda
-----Original Message-----
From: Alain Magloire [mailto:alain@xxxxxxx]
Sent: Monday, April 21, 2003 12:28 PM
To: cdt-patch@xxxxxxxxxxx
Cc: dschaefer@xxxxxxxxxxxx; hamer@xxxxxxxxxxxx
Subject: 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();
> }
_______________________________________________
cdt-patch mailing list
cdt-patch@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-patch