Proteome Informatics Group > Java Proteomic Library
 

JPLRefUpdater

Overview

This application eases the drastic JPL migration (pre-1.0 to 1.0) and refactors your source files. It essentially renames all your old style instance class and sometimes changes packages.

Warning
This application will fix at least 80% of your code. The remnant will be a mix of renamed methods and non anymore existing imports. You'll have to fix them by renaming manually or removing some unexisted imports your self. The list of rules (the only argument given to JPLRefUpdater) will help you fix it. Please download the rules below.

Usage

usage: JPLRefUpdater <rule-file> [--backup] [--clear] [-d <arg>]
       [-h] [-i <arg>] [--ignore-case] [--interactive] [-q] [-r] [--revert] [-t
       <arg>] [--track <arg>] [-v]
    --backup               backup original target and edited files (see
                           --track) (enabled by default).
    --clear                remove all temporary files (see --track).
 -d,--dir <arg>            define the (list of) directory(ies) ['dir1,
                           ..., dirn'] to search files into
                           (. by default).
 -h,--help                 print this message.
 -i,--setting-file <arg>   give a property file with all input settings.
    --ignore-case          insensitive case search
    --interactive          app prompts the user for whether to proceed
                           with the entire operation.  If the response is not affirmative, the entire
                           command is aborted
 -q,--quiet                quiet mode (verbose off)
                           by default: false.
 -r,--recursive            recursive target search.
                           
    --revert               revert to original state (see --clear).
 -t,--target <arg>         define file name target pattern ('.*\.java' by
                           default).
    --track <arg>          file tracking tempory file list (by default:
                           ./tracked-files.list)
 -v,--version              print the version info.

Use/Case

// First, search source files with params defined in properties 
java -jar JPLRefUpdater-1.0.jar -i jplupdater.properties jpl-renaming.rules 2>log

// If there is an error, revert to its original state
java -jar apps/JPLUpdater-1.0.jar --revert --track files-tracked.list

// Second, remove temporary files tracked in the given file generated in previous step
java -jar apps/JPLRefUpdater-1.0.jar --clear --track files-tracked.list
		 

Releases

The latest version v1.0 - Download app and the rules.