codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Replacing Class definition comments in java files  metan at 11:50 on Wednesday, May 17, 2006
 

Hi to all,
Im trying to implement a java file replacer that opens about a thousand java files and replaces the first comment lines. That is to say assume that these thousand java files have this comment at the beginning of them:

/*
*
*Date Author Changes
*-------- ------------ -----------------
*${date} ${author} initial release
*
*/


My application should find these comments and replace them with

/*
* Project Name:
* File: ${file_name}
* Purpose:
* History:
*
*Date Author Changes
*-------- ------------ -----------------
*${date} ${author} initial release
*
*/


I dont need any GUI. just I will print the changed files to console.

My question is is there any example applications you guys can suggest and should I use XML and XSL to implement this application?


Any suggestions are highly appriciated.
Best Regards.
Metan

  Re: Replacing Class definition comments in java files  mmarab at 13:56 on Thursday, January 25, 2007
 

You could implement this solution very well in Java, using regular expressions! You would be able to do this very easy!








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: JTable..
•  forum skin code
•  Using Fork in Perl
•  Re: import contacts of msn/yahoo
•  Re: Files
•  Re: Manipulating large Images.
•  Re: Replacing Class definition comments in java files
•  Re: Multiplication Problem
•  Re: Overlaying frames


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007