Home > Class Reference > %SYS namespace > %ZHSLIB.PackageManager.Developer.Extension.PackageManager

%ZHSLIB.PackageManager.Developer.Extension.PackageManager

class %ZHSLIB.PackageManager.Developer.Extension.PackageManager extends %Studio.Extension.Base, %ZHSLIB.PackageManager.Developer.Extension.Constants

Overlay %Studio.SourceControl.ISC with this extension's capabilities by running: Write ##class(%Studio.SourceControl.Interface).SourceControlClassSet("%ZHSLIB.PackageManager.Developer.Extension.Composite") Write ##class(%ZHSLIB.PackageManager.Developer.Extension.Composite).SetExtensionClasses("%ZHSLIB.PackageManager.Developer.Extension.SourceControl.ISC",$ListBuild("%ZHSLIB.PackageManager.Developer.Extension.PackageManager"))

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter DOMAIN = HSPM;
TODO: Change to module-specific domain (and ensure proper global mappings configured)

Properties (Including Private)

property SnapshotMessageWarned [ MultiDimensional ];
Stores an array of document names for which a warning has already been issued in GetStatus. Used to avoid repetitive/duplicate notifications in the console log/output window. This will not work for Atelier over (stateless) REST APIs, but Atelier's different client behavior will have a similar effect (because it calls GetStatus very infrequently compared to Studio).
Property methods: SnapshotMessageWarnedDisplayToLogical(), SnapshotMessageWarnedGet(), SnapshotMessageWarnedIsValid(), SnapshotMessageWarnedLogicalToDisplay(), SnapshotMessageWarnedLogicalToOdbc(), SnapshotMessageWarnedNormalize(), SnapshotMessageWarnedSet()

Methods (Including Private)

method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean = 0) 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
For the dialog that contains a textbox field the text of this field is passed in 'Msg' argument. In the case of a template if the template was closed from the 'x' button then Answer=2 to indicate the user attempted to cancel the operation. Otherwise if the template closed normally by getting to the end Answer=1. For the cases where Studio did not perform any interaction this method is not called. The default implementation is to call the standard source control tags . If the Reload argument is set to true by this method then the current document will be reloaded in Studio.
private classmethod CheckEditable(pInternalName As %String) as %Boolean [ Language = objectscript ]
private method GetModuleForInternalName(InternalName As %String, Output pIsModule As %Boolean = 0, Output pInModule As %Boolean = 0, Output pExplicitlyListed As %Boolean = 0) as %ZHSLIB.PackageManager.Developer.Module [ Language = objectscript ]
method GetStatus(InternalName As %String, ByRef IsInSourceControl As %Boolean, ByRef Editable As %Boolean, ByRef IsCheckedOut As %Boolean, ByRef UserCheckedOut As %String) as %Status [ Language = objectscript ]
Return information about this entity.
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.
method UserAction(Type As %Integer, Name As %String, InternalName As %String, SelectedText As %String, ByRef Action As %String = ..#ActionDoNothing, ByRef Target As %String = "", ByRef Msg As %String = "", ByRef Reload As %Boolean = 0) 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
When a menu item is selected the Name argument is the name of this menu item in the format '<MainMenu>,<SubMenu>'. For other Studio actions the Name argument is one of:
  • 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
The InternalName argument is the name of the document about which this action occurs. If there is any selected text in the document which has focus this is sent in the SelectedText argument. The Action argument is set by this method to tell Studio what to do. Possible return values for this are:
  • 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.
If the Reload argument is set to true then the current document will be reloaded in Studio. This is useful if you change the document to change its attribute so Studio will pick up these changes.

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)