%ZHSLIB.PackageManager.Developer.Extension.SourceControl.ISC
class %ZHSLIB.PackageManager.Developer.Extension.SourceControl.ISC extends %Studio.SourceControl.ISC, %ZHSLIB.PackageManager.Developer.Extension.SourceControl.Interface
Method Inventory (Including Private)
- AfterUserAction()
- CheckOut()
- Configure()
- CreateChangelist()
- DelegateExportToProcessor()
- Disconnected()
- Export()
- ExportGlobals()
- ExtName()
- GetPerforceAvailable()
- ListFilesPendingResolve()
- Name()
- OnAfterBuild()
- OnAfterPhase()
- OnAfterReload()
- OnAfterSave()
- OnBeforeBuild()
- OnBeforePhase()
- OnBeforeReload()
- OnBeforeValidate()
- OnChangeModuleRoot()
- OnMakeModuleEditable()
- OnMenuItem()
- OnModifyResources()
- RemoveFromSourceControl()
- RemoveMappings()
- SyncFilesystemRepositories()
- UndoCheckout()
- UpdateMappings()
- UserAction()
Parameters
parameter NOPREFIXCHARCODE = 8;
parameter SETTINGSPAGE = %ZHSLIB.PackageManager.Developer.Extension.SourceControl.ISC.UI.cls;
Inherited description: Name of page to help configure source control on a per-module basis
Methods (Including Private)
method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean) as %Status [ Language = objectscript ]
Inherited description: This is called after the UserAction() and after any template is run or dialog is displayed.
For a list of input arguments see UserAction().
In the case of the dialog the button pushed by the user is passed in Answer:
- 0 - No
- 1 - Yes
- 2 - Cancel
method CheckOut(InternalName As %String, Description As %String, Load As %Boolean = 1) as %Status [ Language = objectscript ]
Check this routine/class/csp file out of source control.
Following successful checkout, the copy of the file on disk is loaded into the Namespace, unless Load is false.
Following successful checkout, the copy of the file on disk is loaded into the Namespace, unless Load is false.
classmethod Configure() as %Status [ Language = objectscript ]
Invoked after zpm "init" to configure settings for this source control class
classmethod CreateChangelist(pDescription As %String, Output pChangelistNumber As %Integer) as %Status [ Language = objectscript ]
classmethod DelegateExportToProcessor(pFileName As %String, pInternalName As %String, Output pSC As %Status = $$$OK) as %Boolean [ Language = objectscript ]
classmethod Disconnected() as %Integer [ Language = objectscript ]
Returns value that shows whether or not this instance is "Disconnected" from Perforce
Return values are:
- 0: Instance is Connected
- 1: Instance is Disconnected but could connect at a future time
- 2: Instance is Permanently Disconnected (no plans of ever connecting to Perforce)
classmethod Export(pPackageOrItems As %String, pAltPath As %String = "", qspec As %String = "-d /diffexport") as %Status [ Language = objectscript ]
Export items to source control dir, or to AltPath as UDL if not mapped in source control
classmethod ExportGlobals(pModule As %ZHSLIB.PackageManager.Developer.Module) as %Status [ Language = objectscript ]
After compilation, check out any .GBL resources and re-export.
TODO: revert if unchanged.
Return filename of this item
Override superclass method to honor new convention:
if name starts with special characters defined in ..#NOPREFIXCHARCODE, then don't use the prefix path in ^Sources
classmethod GetPerforceAvailable(pSkipDisconnectedCheck As %Boolean = 0) as %Boolean [ Language = objectscript ]
classmethod ListFilesPendingResolve(Output pFileList As %ZHSLIB.PackageManager.Developer.Extension.SourceControl.ISC.PerforceFileList, pFilterToBranch As %String = "//") as %Status [ Language = objectscript ]
Return the name of this item without the prefix to be added by ExtName
classmethod OnAfterBuild(pIsDev As %Boolean, pSuccessful As %Boolean) as %Status [ Language = objectscript ]
Invoked after build process runs
classmethod OnAfterPhase(pModule As %ZHSLIB.PackageManager.Developer.Module, pPhase As %String, ByRef pParams) as %Status [ Language = objectscript ]
Invoked after each lifecycle phase
classmethod OnAfterReload(pModule As %ZHSLIB.PackageManager.Developer.Module, ByRef pParams) as %Status [ Language = objectscript ]
method OnAfterSave(InternalName As %String, Object As %RegisteredObject) as %Status [ Language = objectscript ]
Inherited description: This is called after the item has been saved to the database.
It may be passed a reference to the object representing the item
just saved. It can be use to export this documement to an external form for example.
Invoked before build process runs.
Sets $$$BuildFlag; for dev builds, creates %SourceControl and backs up ^Sources.
classmethod OnBeforePhase(pModule As %ZHSLIB.PackageManager.Developer.Module, pPhase As %String, ByRef pParams) as %Status [ Language = objectscript ]
Invoked before each lifecycle phase
classmethod OnBeforeReload(pModule As %ZHSLIB.PackageManager.Developer.Module, ByRef pParams) as %Status [ Language = objectscript ]
classmethod OnBeforeValidate(pModule As %ZHSLIB.PackageManager.Developer.Module, ByRef pParams) as %Status [ Language = objectscript ]
Before validation, export all resources that have not been added to source control to their proper location, if any, and mark them for add.
classmethod OnChangeModuleRoot(pModule As %ZHSLIB.PackageManager.Developer.Module) as %Status [ Language = objectscript ]
Invoked when an existing module is reloaded from a different directory than its known module root
Removes mappings for all of the module's resources (to prevent an automatic p4 move)
classmethod OnMakeModuleEditable(pModule As %ZHSLIB.PackageManager.Developer.Module) as %Status [ Language = objectscript ]
Invoked when the user has attempted to edit a module document reported by the active Studio extension as read-only (i.e., because it is not checked out)
method OnMenuItem(MenuName As %String, InternalName As %String, SelectedText As %String, ByRef Enabled As %Boolean, ByRef DisplayName As %String) as %Status [ Language = objectscript ]
Inherited description: This is called for every menu item returned to Studio to allow the menu to be enabled/disabled without
having to write a custom query for MenuItems. The DisplayName of this menu is
also passed by reference and this may be modified to change the appearance of this menu item. The MenuName
is the main menu name then the submenu name separated by a ','. If Enabled is set to -1 then it will remove
this menu item from the list totally, 0 will gray the menu item out, and the default 1 will display the menu item as normal.
classmethod OnModifyResources(pModule As %ZHSLIB.PackageManager.Developer.Module) as %Status [ Language = objectscript ]
Invoked when the list of resources for a module changes.
method RemoveFromSourceControl(InternalName As %String, Description As %String = "") as %Status [ Language = objectscript ]
Called to delete this item from source control
Utility method to remove all mappings for a named module.
classmethod SyncFilesystemRepositories(pVerbose As %Boolean = 1) as %Status [ Language = objectscript ]
Gets the latest revision of all files within filesystem-based repositories that fall within the current namespace's Perforce workspace.
Inherited description: Undo the checkout of this item.
classmethod UpdateMappings(pModuleName As %String, pPath As %String) as %Status [ Language = objectscript ]
Utility method to update mappings for a named module, placing the module's root at a given path.
Note: pPath is expected to be an absolute path, possibly prefixed with $c(8).
method UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean) as %Status [ Language = objectscript ]
Inherited description: This is called when the user performs an action that may need to interact with
the server, such as selecting a menu or adding a new document. This encompases what the deprecated Flags
parameter did and allows additional flexibility.
The Type argument values are:
- 0 : Server defined menu item selected
- 1 : Other Studio action
- 0 : User has tried to change a document that is locked in source control
- 1 : User has created a new document
- 2 : User has deleted a document
- 3 : User has opened a document
- 4 : User has closed a document
- 5 : User has connected to a new namespace
- 6 : User has selected to import comma delimetered list of documents
- 7 : User has saved a new document for the first time
- 0 : Do nothing, note that this method can still perform some action such as check an item out of source control, but Studio will not ask for user input.
- 1 : Display the default Studio dialog with a yes/no/cancel button. The text for this dialog is provided in the 'Target' return argument.
- 2 - Run a CSP page/Template. The Target is the full url to the CSP page/Template, as usual the page will be passed the current document name, any selected text, the project name, the namespace.
- 3 - Run an EXE on the client. The Target is the name of an executable file on the client machine. It is the responsibility of the customer to ensure this EXE is installed in a suitable location.
- 4 - Insert the text in Target in the current document at the current selection point.
- 5 - Studio will open the documents listed in Target. If there are multiple documents to open they will be separated with commas. If the document name is 'test.mac:label+10' it will open the document 'test.mac' and goto 'label+10'.
- 6 - Display an alert dialog in Studio with the text from the Target variable.
- 7 - Display a dialog with a textbox and Yes/No/Cancel buttons. The text for this dialog is provided by the 'Target' return argument. The initial text for the textbox is provided by the 'Msg' return argument.
Inherited Members
Inherited Properties (Including Private)
Inherited Methods (Including Private)
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %ConstructCloneInit()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetClass()
- %GetPage()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToSaveSet()
- %OnAfterBuild()
- %OnAfterPhase()
- %OnBeforeBuild()
- %OnBeforePhase()
- %OnChangeModuleRoot()
- %OnClose()
- %OnConstructClone()
- %OnMakeModuleEditable()
- %OnModifyResources()
- %OnNew()
- %OnValidateObject()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %SourceControlMethod()
- %ValidateObject()
- AddClassesToSourceControl()
- AddItemsToSourceControl()
- AddPackagesToSourceControl()
- AddToSourceControl()
- BackupName()
- BaselineCSPDir()
- BaselineExport()
- BaselineExportEnsembleExclude()
- BaselineExportItem()
- CheckIn()
- CheckIndexes()
- ClearPerforceTicket()
- Compile()
- DSCheckpointExport()
- DefaultCredentialsDefined()
- Disconnect()
- DisconnectItem()
- ExportCSPFile()
- ExternalName()
- GeneratePerforceTicket()
- GetCredentials()
- GetLatest()
- GetPortalPageOptions()
- GetSharedWorkspace()
- GetStatus()
- ImportCSPFile()
- InstanceVersion()
- InternalNameFromExtName()
- IsGenerated()
- IsInSourceControl()
- IsMapped()
- IsReadOnly()
- IsSharedDevInstance()
- IsTrakCare()
- ItemIconState()
- JobUpdateSources()
- Load()
- Lock()
- Locked()
- Login()
- Logout()
- OnAfterAllClassCompile()
- OnAfterClassCompile()
- OnAfterCompile()
- OnAfterDelete()
- OnAfterLoad()
- OnAfterStorage()
- OnBeforeAllClassCompile()
- OnBeforeClassCompile()
- OnBeforeCompile()
- OnBeforeDelete()
- OnBeforeLoad()
- OnBeforeSave()
- OnBeforeTimestamp()
- OnPortalCreate()
- OutputInfo()
- P4Cmd()
- ReadOnly()
- Reconnect()
- ReconnectItem()
- RunCmd()
- SecureP4Cmd()
- SecureRunCmd()
- SetCredentials()
- SetFileReadOnly()
- SetFileWriteable()
- SetSharedWorkspace()
- StorePerforceTicket()
- Unlock()
- UpdateSources()
- ValidatePerforceTicket()