Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Re: [cdt-patch] CModelBuilder adds line numbers + JUnit test


I'll agree and take it a step furthur.  I don't think we've given this line number stuff enough thought and it feels like we are rushing to quick answers.

However, in order to get the release completed, is what we have broken, or can we release it and work on a better solution in May?

Doug Schaefer
Rational Software - IBM Software Group
Ottawa, Ontario, Canada



"Alain Magloire" <alain@xxxxxxx>
Sent by: cdt-patch-admin@xxxxxxxxxxx

04/21/2003 12:28 PM
Please respond to cdt-patch

       
        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


Back to the top