aboutsummaryrefslogtreecommitdiff
path: root/buildScripts/deps/eclipse-debugging.ant.xml
blob: 5ed28116c9be468e9fd4cf019b651a5b8b128596 (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!--
  Copyright © 2009 Reinier Zwitserloot and Roel Spilker.
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
-->
<project name="lombok-deps-lombok-patcher" basedir="../.." default="install">
	<description>
This buildfile is part of projectlombok.org. It responsible for downloading, updating, and setting up the eclipse modules that are useful to have when working on lombok's eclipse integration. It's optional.
	</description>
	
	<property name="repository.eclipse.org-eclipse" value=":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse" />
	<property name="repository.eclipse.org-rt" value=":pserver:anonymous@dev.eclipse.org/cvsroot/rt" />
	<property name="eclipse.org.contrib.base" location=".." />
	
	<target name="install-silent" depends="-check-eclipse.org,
		-force-eclipse.debug.target, install-eclipse.debug.target, update-eclipse.debug.target,
		-force-org.eclipse.jdt.core, checkout-org.eclipse.jdt.core, update-org.eclipse.jdt.core,
		-force-org.eclipse.jdt.ui, checkout-org.eclipse.jdt.ui, update-org.eclipse.jdt.ui,
		-force-org.eclipse.core.runtime, checkout-org.eclipse.core.runtime, update-org.eclipse.core.runtime,
		-force-org.eclipse.ltk.core.refactoring, checkout-org.eclipse.ltk.core.refactoring,  update-org.eclipse.ltk.core.refactoring,
		-force-org.eclipse.equinox, checkout-org.eclipse.equinox, update-org.eclipse.equinox" />
	
	<target name="install" depends="-check-eclipse.org,
		-ask-eclipse.debug.target, install-eclipse.debug.target, update-eclipse.debug.target,
		-ask-org.eclipse.jdt.core, checkout-org.eclipse.jdt.core, update-org.eclipse.jdt.core,
		-ask-org.eclipse.jdt.ui, checkout-org.eclipse.jdt.ui, update-org.eclipse.jdt.ui,
		-ask-org.eclipse.core.runtime, checkout-org.eclipse.core.runtime, update-org.eclipse.core.runtime,
		-ask-org.eclipse.ltk.core.refactoring, checkout-org.eclipse.ltk.core.refactoring,  update-org.eclipse.ltk.core.refactoring,
		-ask-org.eclipse.equinox, checkout-org.eclipse.equinox, update-org.eclipse.equinox" />
	
	<target name="-force-eclipse.debug.target" unless="eclipse.debug.target.available">
		<property name="eclipse.debug.target.create" value="true" />
	</target>
	
	<target name="-ask-eclipse.debug.target" unless="eclipse.debug.target.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="eclipse.debug.target.response">
Do you want me to create an eclipse debug target so you can launch a second eclipse, lombok-ized, in the eclipse debugger?
		</input>
		<condition property="eclipse.debug.target.create">
			<matches string="${eclipse.debug.target.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>
	
	<target name="-force-org.eclipse.jdt.core" unless="org.eclipse.jdt.core.available">
		<property name="org.eclipse.jdt.core.checkout" value="true" />
	</target>
	
	<target name="-ask-org.eclipse.jdt.core" unless="org.eclipse.jdt.core.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="org.eclipse.jdt.core.response">
Do you want me to grab from CVS the 3.5 version of org.eclipse.jdt.core?
Lombok integrates with this eclipse module often, and you should grab it if you're going to work on lombok's eclipse integration.</input>
		<condition property="org.eclipse.jdt.core.checkout">
			<matches string="${org.eclipse.jdt.core.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>
	
	<target name="-force-org.eclipse.jdt.ui" unless="org.eclipse.jdt.ui.available">
		<property name="org.eclipse.jdt.ui.checkout" value="true" />
	</target>
	
	<target name="-ask-org.eclipse.jdt.ui" unless="org.eclipse.jdt.ui.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="org.eclipse.jdt.ui.response">
Do you want me to grab from CVS the 3.5 version of org.eclipse.jdt.ui?
Lombok integrates with this eclipse module often, and you should grab it if you're going to work on lombok's eclipse integration.</input>
		<condition property="org.eclipse.jdt.ui.checkout">
			<matches string="${org.eclipse.jdt.ui.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>
	
	<target name="-force-org.eclipse.core.runtime" unless="org.eclipse.core.runtime.available">
		<property name="org.eclipse.core.runtime.checkout" value="true" />
	</target>
	
	<target name="-ask-org.eclipse.core.runtime" unless="org.eclipse.core.runtime.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="org.eclipse.core.runtime.response">
Do you want me to grab from CVS the 3.5 version of org.eclipse.core.runtime?
Interacting with the filer and messager (for errors and warnings) requires core.runtime, as well as interacting with modules.
You may not need it unless you're going to work on those areas.
		</input>
		<condition property="org.eclipse.core.runtime.checkout">
			<matches string="${org.eclipse.core.runtime.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>
	
	<target name="-force-org.eclipse.ltk.core.refactoring" unless="org.eclipse.ltk.core.refactoring.available">
		<property name="org.eclipse.ltk.core.refactoring.checkout" value="true" />
	</target>
	
	<target name="-ask-org.eclipse.ltk.core.refactoring" unless="org.eclipse.ltk.core.refactoring.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="org.eclipse.ltk.core.refactoring.response">
Do you want me to grab from CVS the 3.5 version of org.eclipse.ltk.core.refactoring?
Unless you're going to work with lombok's patching of the refactor scripts, you won't need it.
		</input>
		<condition property="org.eclipse.ltk.core.refactoring.checkout">
			<matches string="${org.eclipse.ltk.core.refactoring.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>
	
	<target name="-force-org.eclipse.equinox" unless="org.eclipse.equinox.available">
		<property name="org.eclipse.equinox.checkout" value="true" />
	</target>
	
	<target name="-ask-org.eclipse.equinox" unless="org.eclipse.equinox.available">
		<input validargs="n,N,no,No,NO,y,Y,yes,Yes,YES" defaultvalue="no" addproperty="org.eclipse.equinox.response">
Do you want me to grab from CVS the 3.5 version of org.eclipse.equinox?
Unless you're going to work on lombok.patcher's OSGi integration, you won't need this.
		</input>
		<condition property="org.eclipse.equinox.checkout">
			<matches string="${org.eclipse.equinox.response}" casesensitive="false" pattern="^y(es)?$" />
		</condition>
	</target>

	<target name="update" depends="-check-eclipse.org,
		update-eclipse.debug.target,
		update-org.eclipse.jdt.core,
		update-org.eclipse.jdt.ui,
		update-org.eclipse.core.runtime,
		update-org.eclipse.ltk.core.refactoring,
		update-org.eclipse.equinox" />
	
	<target name="build" />
	
	<target name="checkout-org.eclipse.jdt.core" if="org.eclipse.jdt.core.checkout">
		<cvs
				cvsRoot="${repository.eclipse.org-eclipse}"
				dest="${eclipse.org.contrib.base}"
				package="org.eclipse.jdt.core"
				tag="R3_5_maintenance"
				failonerror="true" />
		<echo level="info">eclipse module checked out in a sibling directory to the lombok project directory. You may want to add the project to your eclipse workspace.</echo>
	</target>
	
	<target name="update-org.eclipse.jdt.core" if="org.eclipse.jdt.core.available">
		<cvs command="update" dest="${eclipse.org.contrib.base}/org.eclipse.jdt.core" />
	</target>
	
	<target name="checkout-org.eclipse.jdt.ui" if="org.eclipse.jdt.ui.checkout">
		<cvs
				cvsRoot="${repository.eclipse.org-eclipse}"
				dest="${eclipse.org.contrib.base}"
				package="org.eclipse.jdt.ui"
				tag="R3_5_maintenance"
				failonerror="true" />
		<echo level="info">eclipse module checked out in a sibling directory to the lombok project directory. You may want to add the project to your eclipse workspace.</echo>
	</target>
	
	<target name="update-org.eclipse.jdt.ui" if="org.eclipse.jdt.ui.available">
		<cvs command="update" dest="${eclipse.org.contrib.base}/org.eclipse.jdt.ui" />
	</target>
	
	<target name="checkout-org.eclipse.core.runtime" if="org.eclipse.core.runtime.checkout">
		<cvs
				cvsRoot="${repository.eclipse.org-eclipse}"
				dest="${eclipse.org.contrib.base}"
				package="org.eclipse.core.runtime"
				tag="R3_5_1"
				failonerror="true" />
		<echo level="info">eclipse module checked out in a sibling directory to the lombok project directory. You may want to add the project to your eclipse workspace.</echo>
	</target>
	
	<target name="update-org.eclipse.core.runtime" if="org.eclipse.core.runtime.available">
		<cvs command="update" dest="${eclipse.org.contrib.base}/org.eclipse.core.runtime" />
	</target>
	
	<target name="checkout-org.eclipse.ltk.core.refactoring" if="org.eclipse.ltk.core.refactoring.checkout">
		<cvs
				cvsRoot="${repository.eclipse.org-eclipse}"
				dest="${eclipse.org.contrib.base}"
				package="org.eclipse.ltk.core.refactoring"
				tag="R3_5_1"
				failonerror="true" />
		<echo level="info">eclipse module checked out in a sibling directory to the lombok project directory. You may want to add the project to your eclipse workspace.</echo>
	</target>
	
	<target name="update-org.eclipse.ltk.core.refactoring" if="org.eclipse.ltk.core.refactoring.available">
		<cvs command="update" dest="${eclipse.org.contrib.base}/org.eclipse.ltk.core.refactoring" />
	</target>
	
	<target name="checkout-org.eclipse.equinox" if="org.eclipse.equinox.checkout">
		<cvs
				cvsRoot="${repository.eclipse.org-rt}"
				dest="${eclipse.org.contrib.base}"
				package="org.eclipse.equinox"
				failonerror="true" />
		<echo level="info">eclipse module checked out in a sibling directory to the lombok project directory. You may want to add the project to your eclipse workspace.</echo>
	</target>
	
	<target name="update-org.eclipse.equinox" if="org.eclipse.equinox.available">
		<cvs command="update" dest="${eclipse.org.contrib.base}/org.eclipse.equinox" />
	</target>
	
	<target name="install-eclipse.debug.target" if="eclipse.debug.target.create">
		<antcall target="-create-eclipse.debug.target" />
		<echo level="info">
		---------------------------

		Launch target configured; it should show up in your eclipse under the debug menu as "LombokizedEclipse".
		It does NOT hot-code-replace on lombok itself - you'll need to run 'ant dist' every time you want to use it. This is an unavoidable shortcoming of java agents. You can, however, breakpoint and step through your eclipse this way.

		---------------------------
		</echo>
	</target>
	
	<target name="update-eclipse.debug.target" if="eclipse.debug.target.available">
		<antcall target="-create-eclipse.debug.target" />
	</target>
	
	<target name="detect-mac">
		<condition property="startOnFirstThread" value="-XstartOnFirstThread">
			<os family="mac" />
		</condition>
		<condition property="startOnFirstThread" value="">
			<not><os family="mac" /></not>
		</condition>
	</target>
	
	<target name="-create-eclipse.debug.target" depends="detect-mac">
		<copy
				file="buildScripts/deps/eclipse-debug-target.template"
				tofile="LombokizedEclipse.launch"
				preservelastmodified="true"
				overwrite="true">
			<filterset>
				<filter token="START_ON_FIRST_THREAD" value="${startOnFirstThread}" />
			</filterset>
		</copy>
	</target>
	
	<target name="-check-eclipse.org">
		<available file="${eclipse.org.contrib.base}/org.eclipse.jdt.core/.project" property="org.eclipse.jdt.core.available" />
		<available file="${eclipse.org.contrib.base}/org.eclipse.jdt.ui/.project" property="org.eclipse.jdt.ui.available" />
		<available file="${eclipse.org.contrib.base}/org.eclipse.core.runtime/.project" property="org.eclipse.core.runtime.available" />
		<available file="${eclipse.org.contrib.base}/org.eclipse.ltk.core.refactoring/.project" property="org.eclipse.ltk.core.refactoring.available" />
		<available file="${eclipse.org.contrib.base}/org.eclipse.equinox/.project" property="org.eclipse.equinox.available" />
		<available file="LombokizedEclipse.launch" property="eclipse.debug.target.available" />
	</target>
</project>