?? findbugs
字號:
#! /bin/sh# Launch FindBugs from the command line.escape_arg() { echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g"}program="$0"# Follow symlinks until we get to the actual file.while [ -h "$program" ]; do link=`ls -ld "$program"` link=`expr "$link" : '.*-> \(.*\)'` if [ "`expr "$link" : '/.*'`" = 0 ]; then # Relative dir=`dirname "$program"` program="$dir/$link" else # Absolute program="$link" fidone# Assume findbugs home directory is the parent# of the directory containing the script (which should# normally be "$findbugs_home/bin").dir=`dirname "$program"`findbugs_home="$dir/.."# Handle FHS-compliant installations (e.g., Fink)if [ -d "$findbugs_home/share/findbugs" ]; then findbugs_home="$findbugs_home/share/findbugs"fi# Make absolutefindbugs_home=`cd "$findbugs_home" && pwd`fb_pathsep=':'# Handle cygwin, courtesy of Peter D. Stoutfb_osname=`uname`if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then findbugs_home=`cygpath --mixed "$findbugs_home"` fb_pathsep=';'fi# Handle MKS, courtesy of Kelly O'Hairif [ "${fb_osname}" = "Windows_NT" ]; then fb_pathsep=';'fiif [ ! -d "$findbugs_home" ]; then echo "The path $findbugs_home," echo "which is where I think FindBugs is located," echo "does not seem to be a directory." exit 1fi# Choose default java binaryfb_javacmd=javaif [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java else fb_javacmd="$JAVA_HOME/bin/java" fifimaxheap=768fb_appjar="$findbugs_home/lib/findbugs.jar"ShowHelpAndExit() { fb_mainclass="edu.umd.cs.findbugs.ShowHelp" fb_javacmd=${fb_javacmd:-"java"}fb_maxheap=${fb_maxheap:-"-Xmx584m"}fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}set -f#echo command: \exec "$fb_javacmd" \ -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0}# Set defaultsfb_mainclass="edu.umd.cs.findbugs.LaunchAppropriateUI"user_jvmargs=''ea_arg=''debug_arg=''conservespace_arg=''workhard_arg=''user_props=''# Handle command line arguments.while [ $# -gt 0 ]; do case $1 in -gui) # this is the default ;; -gui1) user_props="-Dfindbugs.launchUI=1 $user_props" ;; -textui) fb_mainclass="edu.umd.cs.findbugs.FindBugs2" ;; -jvmArgs) shift user_jvmargs="$1" ;; -ea) ea_arg='-ea' ;; -maxHeap) shift maxheap="$1" ;; -javahome) shift fb_javacmd="$1/bin/java" ;; -debug) debug_arg="-Dfindbugs.debug=true" ;; -conserveSpace) conservespace_arg="-Dfindbugs.conserveSpace=true" ;; -property) shift user_props="-D$1 $user_props" ;; -D*=*) user_props="$1 $user_props" ;; -version) fb_mainclass=edu.umd.cs.findbugs.Version fb_appargs="-release" while [ $# -gt 0 ]; do shift done fb_javacmd=${fb_javacmd:-"java"}fb_maxheap=${fb_maxheap:-"-Xmx584m"}fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}set -f#echo command: \exec "$fb_javacmd" \ -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs exit 0 ;; -help) ShowHelpAndExit ;; # All unrecognized arguments will be accumulated and # passed to the application. *) fb_appargs="$fb_appargs `escape_arg "$1"`" ;; esac shiftdonefb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props $ea_arg"fb_maxheap="-Xmx${maxheap}m"# Extra JVM args for MacOSX.if [ $fb_osname = "Darwin" ]; then fb_jvmargs="$fb_jvmargs \ -Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \ -Dapple.laf.useScreenMenuBar=true"fifb_javacmd=${fb_javacmd:-"java"}fb_maxheap=${fb_maxheap:-"-Xmx584m"}fb_appjar=${fb_appjar:-"$findbugs_home/lib/findbugs.jar"}set -f#echo command: \exec "$fb_javacmd" \ -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \ -Dfindbugs.home="$findbugs_home"\ $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs# vim:ts=3
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -