6 Replies - 1704 Views - Last Post: 06 December 2012 - 06:17 AM

#1 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7731
  • View blog
  • Posts: 13,058
  • Joined: 19-March 11

Source code mapping tools

Posted 04 December 2012 - 09:40 AM

Finally, a question that touches on my actual line of work.

I'm documenting a project touching a fairly large PHP/javascript codebase with some Java on the back end. Documentation is being created in Flare.
I'd like to be able to read the source tree and import this into Flare - has anyone come across tools, preferably open-source, that can look at a codebase and generate an XML representation? I think that Doxygen could be convinced to produce something like what I'm looking for, at least for the Java part, but its default XML mode generates a lot more than I need. I'm looking for something more minimal. Can be linux or windows, I have both machines on my desk.

This is a little vague - I'm kinda fishing for a way to make this automatic, but I'm not sure if what I needs actually exists. Pretty sure it ought to, though.

Is This A Good Question/Topic? 0
  • +

Replies To: Source code mapping tools

#2 Musashi822  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 21
  • Joined: 28-November 12

Re: Source code mapping tools

Posted 04 December 2012 - 11:17 AM

I'm not sure if this will work exactly the way you are wanting, but take a look at ROBODoc.
Was This Post Helpful? 1
  • +
  • -

#3 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 1985
  • View blog
  • Posts: 4,119
  • Joined: 11-December 07

Re: Source code mapping tools

Posted 05 December 2012 - 06:35 PM

The Unused Code Detector plugin for Eclipse is close. It can be configured to produce an XML report with a usage count for every method in a project. If it can do that, the modification to get the actual references will be small but it does mean editing source code.

I'd be surprised if there wasn't something perfect out of the box though.

This post has been edited by cfoley: 05 December 2012 - 06:35 PM

Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7731
  • View blog
  • Posts: 13,058
  • Joined: 19-March 11

Re: Source code mapping tools

Posted 05 December 2012 - 07:05 PM

Yeah, so far RoboDoc is a near miss, Doxygen would need a fair bit of modification, generally not a lot of joy there, and I'm not seeing much else. I was hoping something perfect would eist,but I haven't come across it, and I'm going to have to stop looking and start writing.
I'll have a look at the Eclipse tool, that might be interesting to play with.
The nice thing about XML is that once you have it, it's not hard to modify it.

However, I wrote a little bit of code that will allow me to import a sort of "snippetized" version of the source tree - a funhouse mirror version of the source code in which all of the files are in the right place with slightly different names and the contents replaces with some important file information in Flare's "snippet" XML markup.

So that gives me something to work with, anyway. At least I have representations for all of the bazillion files, I don't have to generate that by hand.

This post has been edited by jon.kiparsky: 05 December 2012 - 07:07 PM

Was This Post Helpful? 0
  • +
  • -

#5 Musashi822  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 21
  • Joined: 28-November 12

Re: Source code mapping tools

Posted 05 December 2012 - 07:36 PM

I had only used ROBODoc a few times trying it out with a larger project, so I wasn't sure if it was going to work anyways. But after reading over your issue again, since Doxygen is working to an extent, why not just write something that automatically edits out the sections of the XML that you don't need?
Was This Post Helpful? 0
  • +
  • -

#6 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 1985
  • View blog
  • Posts: 4,119
  • Joined: 11-December 07

Re: Source code mapping tools

Posted 06 December 2012 - 03:47 AM

If you look on the Eclipse marketplace, there are any number of tools for analysing source code. A lot of them display graphs of call hierarchies. At least one of them must be able to export the graph.

http://marketplace.e...y/term/14/title
Was This Post Helpful? 0
  • +
  • -

#7 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7731
  • View blog
  • Posts: 13,058
  • Joined: 19-March 11

Re: Source code mapping tools

Posted 06 December 2012 - 06:17 AM

View PostMusashi822, on 05 December 2012 - 09:36 PM, said:

I had only used ROBODoc a few times trying it out with a larger project, so I wasn't sure if it was going to work anyways. But after reading over your issue again, since Doxygen is working to an extent, why not just write something that automatically edits out the sections of the XML that you don't need?

Mostly, time. I need to have this more or less in the can by the end of the month, and there's only so much time I can spend saving time. So spending half an hour writing something that generated a piece of what I needed ended up being a better investment than some unknown amount of time analzying and pruning the doxygen tree. When I'm out of the deadline, I might well try to grapple with Doxygen's output.

@cfoley - good tip. I think I can do what I need to working with what I've got, but I'll take a quick look through that stuff. Maybe there's something that does exactly what I'm looking for.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1