LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2010, 12:25 AM   #1
map250r
Member
 
Registered: Aug 2007
Distribution: Debian Squeeze
Posts: 46

Rep: Reputation: 15
Question Is there an app to annotate source code?


I've tried to use google to find this, and all I find is M$ SAL and some annotation standard for java, neither of which is anything like what I'm looking for.

I am pouring over someone else's source code, and want to be able to take notes on it, saving those notes in a separate text file that I can grep, open in a text editor, etc. I want each annotation line to include a line number (or range of lines) so it's easy to know what part of the code it refers to.

I could do this by hand, but it would be nice if a program existed to read and write such a file format. It could be similar to Kompare, only with editable notes on one side and source on the other, linked together with colored bands.

Does such a thing exist?

Cosme Zamudio and I are discussing a possible file format and an Android app - http://cosmez.blogspot.com/2010/04/android-codepad.html
 
Old 05-12-2010, 12:34 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by map250r View Post
I've tried to use google to find this, and all I find is M$ SAL and some annotation standard for java, neither of which is anything like what I'm looking for.

I am pouring over someone else's source code, and want to be able to take notes on it, saving those notes in a separate text file that I can grep, open in a text editor, etc. I want each annotation line to include a line number (or range of lines) so it's easy to know what part of the code it refers to.

I could do this by hand, but it would be nice if a program existed to read and write such a file format. It could be similar to Kompare, only with editable notes on one side and source on the other, linked together with colored bands.

Does such a thing exist?

Cosme Zamudio and I are discussing a possible file format and an Android app - http://cosmez.blogspot.com/2010/04/android-codepad.html
HTML, as well as its tables, have been known for ages.

Automatically create HTML file from your source. The HTML file essence would be a table of N lines and 2 columns. The N lines are the lines of your source code. The left column will contain the source line, the right column will contain your notes.

The HTML table can easily be made stretchable, i.e. for example an original single code line would be able to accommodate 10 lines of your notes, and the tab;e row will grow accordingly in height.

The tool to edit HTML in WYSIWYG manner is, for example, OpenOffice.

...

Perl has a bunch o modules to create HTML; creating HTML even from scratch is pretty trivial.
 
Old 05-12-2010, 12:49 AM   #3
map250r
Member
 
Registered: Aug 2007
Distribution: Debian Squeeze
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Sergei Steshenko View Post
Automatically create HTML file from your source.
An even simpler single-file method would be to use block comments in the source - but that is not what I am after.

It would be far more useful to me to have two separate files: my notes, and the original - and undisturbed - source code. If I use grep (or any other tool that I am aware of) to search through that HTML file, I will get hits in my notes as well as in the source - not to mention the possibility of hits in the HTML making up the table (a remote possibility, but still possible)

Last edited by map250r; 05-12-2010 at 12:57 AM.
 
Old 05-12-2010, 01:20 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,809

Rep: Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069Reputation: 3069
Well a quick search got me this:

kelp.sourceforge.net/

Not sure other than that really
 
Old 05-12-2010, 01:24 AM   #5
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Actually, no application is need. Just copies of the files to be annotated.
 
0 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using the source code to learn about an app stabu Programming 4 01-24-2009 11:08 AM
source code library app for Subversion climbingmerlin Programming 2 03-20-2007 04:52 AM
How to call an app from my c++ code? Puckaroo Programming 1 10-30-2006 11:28 AM
LXer: To Annotate or Not to Annotate LXer Syndicated Linux News 0 02-24-2006 11:16 PM
gprof - annotate source, profile directed compiling iansworld Linux - Software 0 03-25-2005 01:33 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration