Line Counter
- Users Manual
Table of contents
-----------------
1. Introduction
2. Install
3. Uninstall
4. Examples
5. Command line reference
6. Supported IDE project files
7. Integrate with your IDE
8. Final words
1. Introduction
---------------
Line Counter is a command line tool that counts the number of source code lines.
Line Counter counts individual files or integrates with your favorite IDE.
Today, Line Counter supports the Microsoft Visual Studio, JBuilder, Kawa and JiveLint
project file format.
Line Counter can also ignore comments in the source code and parse
unsupported IDE project files with a little help
from you.
Line Counter is Windows 9x/ME/NT/2000/XP compatible.
Line Counter has an evaluation period of 30 days.
2. Install
----------
Installing Line Counter is a simple procedure:
1. Create a directory suitable for installation For example, "c:\Program
Files\Line Counter\"
2. Extract the zip file into the directory. If you don't have a zip extractor, please download
Winzip at http://www.winzip.com/.
The installation is now finished.
If you like, add the directory
where you installed Line Counter to the PATH environment variable. The system
will search that directory when looking for executable files.
Example 1 linecounter -help Example 2
linecounter -ic -files Test.h Test.cpp Example 3
linecounter -projects p1.dsp p2.dsp Example 4
linecounter -projects ..\..\project.jpx -files source\java\Test.java Example 5
linecounter -projects ..\..\project.kpx -extensions java bat Example 6
linecounter -projects p1.jnt Example 7
linecounter -projects ..\..\project.ukn -tags <path>;</path>;<relativepath>;</relativepath>
5. Command line reference -help -files file1 file2 .. -tags starttag1;stoptag1;starttag2;stoptag2;.. 8. Final words
3. Uninstall
------------
Simple. Just delete the files added during installation. (Line Counter does
not make any changes to the registry.)
4. Examples
-----------
Get help and version information:
Count the lines of code in individual files and ignore comments:
Count the lines of code in two Visual Studio projects:
Count the lines of code in a JBuilder project and a java file.
Count the lines of code in a Kawa project but only the .java and .bat files.
All other files included in the project are not counted.
Count the lines of code in a JiveLint project.
Count the lines of code in a project file that is not supported by Line Counter.
Assume that the filenames in the project file are located inbetween <path> and </path> or
inbetween <relativepath> and </relativepath>.
Example project file:
<path>d:\file1.java</path>
<relativepath>..\..\file2.java</relativepath>
-------------------------
Here is a description of the Line Counter arguments.
Displays help and version information.
Specify individual files to count.
-ic
Ignore comments and empty lines. Oneline
comments (//) and multiline comments
(/**/) are ignored.
-projects project1 project2 ..
Specifies the project files. The files specified inside the project file will be counted.
-extensions extension1 extension2 ..
Sets the extensions of the files to count. This setting is only valid when counting files from projects.
Any file in the project that does not have one of the extensions specified will not be counted.
By default, Line Counter counts .bat .c .C .CC .cpp .cxx .h .hpp .html .java
When a project is parsed that does not have one of the supported extensions, such as dsp or jpx, the start and stop tags
tells Line Counter how to locate the filenames in the project file.
------------------------------
Currently Line Counter support three project file formats.
1. .dsp - Mircosoft Visual Studio project file format.
2. .jpx - Borland JBuilder project file format.
3. .kpx - Allaire Kawa project file format.
4. .jnt - JiveLint project file format.
A JiveLint project file (.jnt) should contain files separated by new line.
For example:
c:\java\MyClass1.java
c:\java\MyClass2.java
Please contact us if you would like support for your IDE project file. Please
send the name of the software, version, and a few project file examples.
7. Integrate with your IDE
--------------------------
You can integrate Line Counter as a tool in your IDE. We will give one example how to
configure Mircosoft Visual Studio to count the number of source code lines in
the current project. Let us assume that you have installed Line Counter in
"C:\Program Files\Line Counter\". Follow the instructions below.
Tools -> Customize -> Tools -> New
Give the tool a name, "Line Counter", for example.
In the "Command" field, enter C:\Program Files\Line Counter\linecounter.exe.
In the "Argument field", enter -projects $(WkspName).dsp
In the "Initial Directory" field, enter $(WkspDir)
Check "Use Output Window".
Open a project and run Line Counter from the tools menu.
--------------
Thank you for using Line Counter. If you have questions or comments, please
contact
sureshot@bysoft.se
http://www.bysoft.se/sureshot/