File: findbugs2

package info (click to toggle)
findbugs 3.1.0~preview2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 16,412 kB
  • sloc: java: 132,265; xml: 31,759; sh: 361; sql: 126; perl: 122; makefile: 35
file content (121 lines) | stat: -rw-r--r-- 1,844 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#! /bin/sh

#
# Simplified findbugs startup script.
# This is an experiment.
#

@GET_FBHOME@

@SET_DEFAULT_JAVA@

# Default UI is GUI2
fb_launchui="2"

#
# Stuff we're going to pass to the JVM as JVM arguments.
#
jvm_debug=""
jvm_maxheap="-Xmx768m"
jvm_ea=""
jvm_conservespace=""
jvm_user_props="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"

#
# Process command line args until we hit one we don't recognize.
#
finishedArgs=false
while [ $# -gt 0 ] && [ "$finishedArgs" = "false" ]; do

	arg=$1

	case $arg in
		-textui)
			shift
			fb_launchui="0"
			;;

		-gui)
			shift
			fb_launchui="2"
			;;

		-gui1)
			shift
			fb_launchui="1"
			;;

		-maxHeap)
			shift
			jvm_maxheap="-Xmx$1m"
			shift
			;;

		-ea)
			shift
			jvm_ea="-ea"
			;;

		-javahome)
			shift
			fb_javacmd="$1/bin/java"
			shift
			;;

		-debug)
			shift
			jvm_debug="-Dfindbugs.debug=true"
			;;

		-conserveSpace)
			shift
			jvm_conservespace="-Dfindbugs.conserveSpace=true"
			;;

		-property)
			shift
			jvm_user_props="-D$1 $jvm_user_props"
			shift
			;;
	
		-D*=*)
			jvm_user_props="$1 $user_props"
			shift
			;;

		-version)
			shift
			fb_launchui="version"
			;;

		-help)
			shift
			fb_launchui="help"
			;;

		# All arguments starting from the first unrecognized arguments
		# are passed on to the Java app.
		*)
			finishedArgs=true
			;;
	esac

done

# 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"
fi

#
# Launch JVM
#
exec "$fb_javacmd" \
	-classpath "$fb_appjar$fb_pathsep$CLASSPATH" \
	-Dfindbugs.home="$findbugs_home" \
	$jvm_debug $jvm_maxheap $jvm_ea $jvm_conservespace $jvm_user_props \
	-Dfindbugs.launchUI=$fb_launchui \
	-jar $findbugs_home/lib/findbugs.jar \
	${@:+"$@"}