Skip to content

Commit 0aa439f

Browse files
authored
Merge pull request #365 from intersystems/web-application-to-project
Support inclusion of web applications in Studio projects
2 parents 3c29e32 + cda53d9 commit 0aa439f

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

src/%ZPM/PackageManager/Developer/Module.cls

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,9 +1309,14 @@ Method GetStudioProject(Output pProject As %Studio.Project, pDeployedCode As %Bo
13091309
}
13101310
}
13111311

1312+
If $IsObject(tResource.Processor) {
1313+
Do tResource.Processor.OnGetStudioProject(pProject,.handled)
1314+
Continue:handled
1315+
}
1316+
13121317
Kill tResourceArray
13131318
$$$ThrowOnError(tResource.ResolveChildren(.tResourceArray))
1314-
1319+
13151320
Set tChildResourceKey = ""
13161321
For {
13171322
Set tChildResourceKey = $Order(tResourceArray(tChildResourceKey))
@@ -1542,3 +1547,4 @@ Storage Default
15421547
}
15431548

15441549
}
1550+

src/%ZPM/PackageManager/Developer/Processor/Abstract.cls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,9 @@ ClassMethod GetDescription(pClassName As %String) As %String [ SqlProc ]
261261
Quit $Parameter(pClassName,"DESCRIPTION")
262262
}
263263

264+
/// Subclasses may override to customize the studio project. (e.g., things that use web applications will do this.)
265+
Method OnGetStudioProject(pProject As %Studio.Project, Output pHandled As %Boolean = 0)
266+
{
267+
}
268+
264269
}

src/%ZPM/PackageManager/Developer/Processor/CSPApplication.cls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,11 @@ Method OnItemRelativePath(pItemName As %String) As %String
428428
Quit ..ResourceReference.Name_$Piece(pItemName,..Url,2)
429429
}
430430

431+
Method OnGetStudioProject(pProject As %Studio.Project, Output pHandled As %Boolean = 0)
432+
{
433+
// IMPORTANT: Remove leading *and* trailing slash.
434+
do pProject.AddItem($Extract(..Url,2,*-1),"DIR")
435+
set pHandled = 1
436+
}
437+
431438
}

0 commit comments

Comments
 (0)