1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <Export generator =" Cache" version =" 25" zv =" Cache for Windows (x86-64) 2016.1 (Build 656U)" ts =" 2016-08-03 15:01:48 " >
2
+ <Export generator =" Cache" version =" 25" zv =" Cache for Windows (x86-64) 2016.1 (Build 656U)" ts =" 2016-08-22 12:29:27 " >
3
3
<Class name =" CacheUpdater.Task" >
4
4
<Super >%SYS.Task.Definition</Super >
5
- <TimeChanged >64133,53990.540278 </TimeChanged >
5
+ <TimeChanged >64152,44773.510857 </TimeChanged >
6
6
<TimeCreated >63603,52252.541311</TimeCreated >
7
7
8
8
<Parameter name =" TaskName" >
@@ -206,6 +206,12 @@ Imports the file in UDL file in the project
206
206
<ReturnType >%Status</ReturnType >
207
207
<Implementation ><![CDATA[
208
208
Set st = $$$OK
209
+
210
+ set params = $find(url, "?")
211
+ if params {
212
+ set url = $extract(url, 1, params - 2)
213
+ }
214
+
209
215
Set ext = ..GetExt(url)
210
216
If ext = "cls" {
211
217
Set st = ..CreateClass(contentStream, url)
@@ -245,6 +251,10 @@ Creates and imports the class into the project from stream
245
251
Set namespace = $namespace
246
252
247
253
Set st = ##class(%Compiler.UDL.TextServices).SetTextFromStream(namespace, className, contentStream)
254
+
255
+ if st {
256
+ w !, "Imported " _ className, !
257
+ }
248
258
Return st
249
259
]]> </Implementation >
250
260
</Method >
@@ -268,6 +278,9 @@ Creates and imports the dfi file into the project from stream
268
278
Return:$$$ISERR(st) st
269
279
270
280
Set st = tDoc.Save()
281
+ if st {
282
+ w !, "Imported " _ name, !
283
+ }
271
284
Return:$$$ISERR(st) st
272
285
} Catch e {
273
286
Set st = e.AsStatus()
@@ -344,6 +357,9 @@ Creates and imports other files into the project from stream
344
357
Return:$$$ISERR(status) status
345
358
346
359
Set status = rtn.Compile()
360
+ if st {
361
+ w !, "Imported " _ internalName, !
362
+ }
347
363
Return status
348
364
]]> </Implementation >
349
365
</Method >
@@ -355,7 +371,9 @@ Get extension of the file by url
355
371
<ClassMethod >1</ClassMethod >
356
372
<FormalSpec >url:%String</FormalSpec >
357
373
<ReturnType >%String</ReturnType >
358
- <Implementation ><![CDATA[ Return $ZConvert($Piece(url, ".", *), "l")
374
+ <Implementation ><![CDATA[
375
+
376
+ Return $ZConvert($Piece(url, ".", *), "l")
359
377
]]> </Implementation >
360
378
</Method >
361
379
@@ -368,16 +386,14 @@ Checks whether the url contains a file in udl format
368
386
<FormalSpec >contentStream:%GlobalCharacterStream,url:%String</FormalSpec >
369
387
<ReturnType >%Boolean</ReturnType >
370
388
<Implementation ><![CDATA[
389
+ set params = $find(url, "?")
390
+ if params {
391
+ set url = $extract(url, 1, params - 2)
392
+ }
393
+
371
394
Set extensions = "cls,mac,int,inc,dfi"
372
395
If $Find(extensions, $Piece(url, ".", *)) {
373
- Set st = ##class(%XML.TextReader).ParseStream(contentStream)
374
- Do contentStream.Rewind()
375
- If $$$ISERR(st) {
376
- Return $$$YES
377
- }
378
- Else {
379
- Return $$$NO
380
- }
396
+ return $$$YES
381
397
}
382
398
Else {
383
399
Return $$$NO
0 commit comments