JUL
3
2001

KDE Source Code Now Under LXR

The KDE source code is now available under the LXR system, courtesy of our friends at nadmm.com.
Users and developers may now browse the KDE source code complete with cross-references, which should prove extremely useful. For those of you wondering about the difference between lxr.kde.org and webcvs.kde.org, read on for an explanation from Kurt.

Kurt Granroth writes:

There is actually a huge difference between a webcvs and an lxr site.

Using WebCVS, you can view the contents of a file at any revision and compare
differences between revisions.

Using LXR, you view only the current revision, but, every object in the file
is cross-referenced to every other object in the LXR database.

Let's take the KConfig class for example. I can go to the kconfig.h file in
WebCVS and view the current revision... or I can view past revisions... or I
can compare various revisions. To see how it has changed historically, this
is very handy. But say I want to know where KConfig is used elsewhere in KDE.
This is impossible to do automatically in WebCVS.

If I go to the KConfig class in LXR, though, I see that all objects and
methods in the file are hyperlinks. If I click on KConfig, I get a list of
where it is defined, where it is declared as a forward declaration, and where
it is referenced (in 939 files!). I can click on any of those links to go
directly to where it is used.

Or say I want to see where KSocket is defined and used in KDE. I go to the
identifier search and enter KSocket. I get a page listing everything I need to know.

Really, the importance of cross-referenced links to any large project can't
be emphasized enough. The only reason we haven't had something like this
before is because they are such a PITA to set up. :-/

Comments

I'm waiting...


By Estevanm Neto at Tue, 2001/07/03 - 5:00am

*caugh* FTP-Server *caugh*


By SteffenH at Tue, 2001/07/03 - 5:00am

I checked on 2 mirrors that seemd to have all packages of 2.2beta1 except for kdesupport. Where is it? Or should I use kdesupport of 2.2alpha2?


By Erik at Wed, 2001/07/04 - 5:00am

Theoretically you don't need kdesupport anymore (well, it was barely needed in the past too, but now changes have made that the absolutely needed stuff went to the appropriate kde* package - like kdenetwork). It mostly contained packages external to KDE that were anyways shipped with most distributions (this also potentially created version conflicts for some packages).

Of course, it much depends on the distro packagers if they prepared their packages so that they don't need anything in kdesupport. Let's hope.


By Inorog at Wed, 2001/07/04 - 5:00am

Hey,

why don't we set up some kind of 'reusability' contest for:
1)the most (re)used classes
2)the application that (re)uses the most of them?

It would be fun to see the hit list of them.

This would also give a better sensation to the programmers of how good a class has been tested.

Andrea

PS: is there a way of having infos at the method level, like: 'method foo1() of class AClass has never been used, method foo2() of class AClass has been used 25 times...' ?


By andrea at Tue, 2001/07/03 - 5:00am

> is there a way of having infos at the method
> level, like: 'method foo1() of class AClass
> has never been used, method foo2() of class
> AClass has been used 25 times...' ?

Maybe, depends what you mean exactly. For example, go to the LXR page for KConfig class as given in the above example, and click on any method name (say, virtual void reparseConfiguration();).


By KDE User at Tue, 2001/07/03 - 5:00am

There is another great set of source code analysis tools that a friend of the KDE project has put in place: Amir Michail developped a code reusability measurment tool: CodeWeb, as well as a advanced CVS search tool: CVSSearch. It's a pity people don't put just a tiny bit of heart into getting these tools used in their daily work. They are great. Well, shame on me, as I'm one of those who doesn't.

These, together with lxr, could really really improve KDE developers' productivity a lot.

Here is an URL or three:
http://codeweb.sourceforge.net;
http://cvssearch.sourceforge.net;
http://www.cse.unsw.edu.au/~amichail/


By Inorog at Wed, 2001/07/04 - 5:00am

Great new logo! It revamps the site completely.


By KDE User at Tue, 2001/07/03 - 5:00am

Yes really cool,
yet is it just me or the favicon has switched to yahoo's?
By the way, the favicon has not worked by me since the dot moved. Hope this gets fixed since I love my bookmarks bar in konqueror...


By Aris at Tue, 2001/07/03 - 5:00am

Hmmm, it works for me and it's definitely not the Yahoo favicon. I guess konqueror is caching some wrong icon on your side, somehow.

Try deleting the appropriate icon from .kde/share/icons/favicons/


By Navindra Umanee at Tue, 2001/07/03 - 5:00am

Well that was exactely it.
Thanks a lot.
Now my bookmarks bar looks great again :)


By Aris at Wed, 2001/07/04 - 5:00am

I completely agree.

Stylish .. very stylish


By kde-user at Tue, 2001/07/03 - 5:00am

Yes. Is that the master qwertz doing it again? I'd really like to see an icon set by qwertz. Has he made any icons for KDE? I think it would make the KDE desktop look _very_ classy. No offense, Thorsten. :)


By Joe at Tue, 2001/07/03 - 5:00am

Problem is: icons have to be hand-crafted to look really good. Rendered and scaled-down icons always look worse. For large pictures, rendering rocks though.


By Lenny at Tue, 2001/07/03 - 5:00am

That's great et all, but where is 2.2 beta 1? Should've been out today..


By MiniMe at Tue, 2001/07/03 - 5:00am

Whoops never mind ;)


By MiniMe at Tue, 2001/07/03 - 5:00am

"Really, the importance of cross-referenced links to any large project can't be emphasized enough"

Right.

"The only reason we haven't had something like this before is because they are such a PITA to set up"

Thanks for the great work !
Go KDE Go !!!!


By ac() at Tue, 2001/07/03 - 5:00am

Why I can't download the KDE-2.2beta1 files from the ftp site ? :(

Thanks


By Jean-Christophe... at Tue, 2001/07/03 - 5:00am

KDE needs 1 more application now. A graphical FTP client similiar to CuteFTP.


By Boris Stevenson at Wed, 2001/07/04 - 5:00am

KBear??


By PE at Wed, 2001/07/04 - 5:00am

Hmmm.. isn't Konqueror a graphical ftp client?


By Kavau at Thu, 2001/07/05 - 5:00am

Sorry, I don't know much about LXR or CVS, and I thought I'd take this opportunity to ask some questions. I'll understand if you don't have time to reply. ;-)

How does the code get into LXR? Does LXR use the code in CVS directly, or must it have a copy? (I'm assuming CVS is still the code repository.)

If it needs a copy, can LXR get it automatically, or must a script (or something) transfer occasional code snapshots?

Are there manual steps that must be taken to update the cross-references after LXR gets a new copy of the code?

Are you aware of a way to put comments in a separate file (tied, for example, to an identifier) and have LXR create a cross-reference to those comments?

Do you know of anything like LXR that works for Perl code?

Thanks,
Randy Kramer


By Randy Kramer at Wed, 2001/07/04 - 5:00am

LXR needs a local copy of the code to cross reference. No...it can't get it automatically. Someone needs to put the code there. Right now, the code is refreshed daily and cross referenced by a script. The LXR developers are working on a plug-in system that would make it possible to cross reference other languages.


By Nadeem Hasan at Wed, 2001/07/04 - 5:00am

Nadeem,

Thanks very much for your response!

Randy Kramer


By Randy Kramer at Thu, 2001/07/05 - 5:00am

Just a simple question by an ignorant KDE fan - why can't I find any comments in the KDE source code? Is documenting the source code considered "uncool" here? Wouldn't it help new would-be KDE developers tremendously if there would be a minimal amount of documentation within the source code? It's a long time ago that I was an active programmer, but I remember a rule of thumb that said you should have at least as much comments as you have commands in your source code...


By Kavau at Thu, 2001/07/05 - 5:00am

Hi,

That's one of the reasons we built CVSSearch. We noticed that KDE developers typically write CVS comments but not code comments. So if you can associate the right CVS comment with the right code fragments in the most recent version of the code, then you have commented source.

Amir


By Amir Michail at Thu, 2001/07/05 - 5:00am

The .h files (API) are some of the best documented though.

-N.


By Navindra Umanee at Fri, 2001/07/06 - 5:00am