Review Request: Add Switch to buddy plugin which always swichting between cpp and header file [2/2]
Andreas Pakulat
apaku at gmx.de
Wed Nov 14 09:32:52 UTC 2012
> On Nov. 13, 2012, 4:21 p.m., Andreas Pakulat wrote:
> > languages/cpp/cpplanguagesupport.cpp, line 537
> > <http://git.reviewboard.kde.org/r/107311/diff/1/?file=94717#file94717line537>
> >
> > I think the knowledge about the extensions should be shared between this function and the areBuddies. In particular areBuddies currently does not seem to support c++ files or upper-case-C etc.
>
> André Stein wrote:
> Actually areBuddies and this function both use the common function basePathAndType which determines the type of the source file (resulting in a 'h' or 'c' type). basePathAndType doesn't need to know all extensions because it just looks at the (lower-case) first character of the extension. So it also supports upper-case extensions. But it don't think it's really helpful to share more knowledge between those functions because they already use common basePathAndType.
Ah, I see. Quite sneaky to name that "type" when its actually just a random character.
One more thing I just realize, maybe we could get the list of extensions which are to be considered buddies from the mimetype API? That is, fetch the mimetypes for text/x-csrc, text/x-c++src and corresponding *hdr types and then check which filename patterns are being setup. That way users have an easy way of configuring which files are considered buddies, which is sometimes nice if you have *.def files for enum-definitions or similar things.
- Andreas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107311/#review21935
-----------------------------------------------------------
On Nov. 13, 2012, 3:16 p.m., André Stein wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107311/
> -----------------------------------------------------------
>
> (Updated Nov. 13, 2012, 3:16 p.m.)
>
>
> Review request for KDevelop.
>
>
> Description
> -------
>
> Second part of request 107310. This implements the C++ specific adaptions in Kdevelop. Must be merged together!
>
>
> Diffs
> -----
>
> languages/cpp/cpplanguagesupport.h 4053b18
> languages/cpp/cpplanguagesupport.cpp 60f8a63
>
> Diff: http://git.reviewboard.kde.org/r/107311/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> André Stein
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121114/ba81574a/attachment.html>
More information about the KDevelop-devel
mailing list