%ZHSLIB.PackageManager.Developer.Extension.Composite
class %ZHSLIB.PackageManager.Developer.Extension.Composite extends %Studio.Extension.Base, %ZHSLIB.PackageManager.Developer.Extension.CompositeMethodOverrides
Studio extension to dispatch to multiple other Studio extensions Configuration API provided in %ZHSLIB.PackageManager.Extension.CompositeMethodOverridesMethod Inventory
- %DispatchClassMethod()
- %DispatchMethod()
- AfterUserAction()
- ExternalName()
- GetStatus()
- IsGenerated()
- IsInSourceControl()
- IsReadOnly()
- ItemIconState()
- Login()
- Logout()
- OnAfterAllClassCompile()
- OnAfterClassCompile()
- OnAfterCompile()
- OnAfterDelete()
- OnAfterLoad()
- OnAfterSave()
- OnAfterStorage()
- OnBeforeAllClassCompile()
- OnBeforeClassCompile()
- OnBeforeCompile()
- OnBeforeDelete()
- OnBeforeLoad()
- OnBeforeSave()
- OnBeforeTimestamp()
- OnMenuItem()
- UserAction()
Methods
Dispatch unknown class methods to primary extension class.
method %DispatchMethod(Method As %String, Args...)
Dispatch unknown methods to primary extension class.
method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean) as %Status
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
Inherited description: Convert the internal name, e.g. TEST.MAC, to an external name that is used to export
the routine/class/csp item. This is often a filename to write the file out to.
method GetStatus(InternalName As %String, ByRef IsInSourceControl As %Boolean, ByRef Editable As %Boolean, ByRef IsCheckedOut As %Boolean, ByRef UserCheckedOut As %String) as %Status
Inherited description: Return information about this entity.
Inherited description: Return 1 if you wish this item to appear as if it is 'generated' when opened in Studio,
return 0 to force this item not to appear as 'generated' and return "" to use normal processing.
Inherited description: Returns true if this item is in source control and false otherwise.
Inherited description: Return true if this item should be marked as read only.
This is called when Studio opens a document. It is set to indicate
that the user checked the 'read only' checkbox in the open
dialog in Studio.
Inherited description: Used to allow Studio to display different icons in open dialog or project window etc.
Return values are:
- 0 - Not in source control
- 1 - In source control, not checked out
- 2 - In source control and checked out so item is editable
Inherited description: Perform any login step here.
method Logout() as %Status
Inherited description: Perform any logout step here.
classmethod OnAfterAllClassCompile(List As %String, Level As %Integer, ByRef qstruct As %String, Status As %Status) as %Status
Inherited description: Called in the activated source control class after we have compiled all the classes but before we exit.
Note that this is a class method and it does not require the source
control class to be instantiated in order for it to be called. By default it will call the OnAfterClassCompile()
if there is a source control class instantiated, but you can override this to do whatever you require.
List is a subscripted array of items that were compiled. Status is the current compile return
error %Status, so the callback can check if there was any error in compiling the list of classes.
method OnAfterClassCompile(List As %String, Level As %Integer, ByRef qstruct As %String, Status As %Status) as %Status
Inherited description: Called in the class compiler after we have compiled all the classes before we exit.
List is a subscripted array of items that were compiled. Status is the current compile return
error %Status, so the callback can check if there was any error in compiling the list of classes.
Inherited description: Called after the compile of the item is done.
Inherited description: Called after an item is deleted.
method OnAfterLoad(InternalName As %String, Object As %RegisteredObject = $$$NULLOREF) as %Status
Inherited description: This is called after the item is loaded but before it is sent to Studio
so you have a chance to modify this copy before it appears in the editor.
It is passed a reference to the object that represents this item so it
can be modified before Studio reads this information.
method OnAfterSave(InternalName As %String, Object As %RegisteredObject = $$$NULLOREF) as %Status
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.
Inherited description: This is called if you compile a class and the compilation updates the class storage.
It is called after the storage has been updated so you can determine how to deal with this
change in the class. The Location is the global reference to the class definition that was changed.
classmethod OnBeforeAllClassCompile(List As %String, Level As %Integer, ByRef qstruct As %String) as %Status
Inherited description: Called in the activated source control class before starting a compile after we have resolved the list of classes
but before we have started the compile itself. Note that this is a class method and it does not require the source
control class to be instantiated in order for it to be called. By default it will call the OnBeforeClassCompile()
if there is a source control class instantiated, but you can override this to do whatever you require.
Returning an error here will abort the compile.
List is a subscripted array of items that will be compiled.
method OnBeforeClassCompile(List As %String, Level As %Integer, ByRef qstruct As %String) as %Status
Inherited description: Called in the class compiler after we have resolved the list of classes to be compiled but
before we have started the compile itself.
List is a subscripted array of items that will be compiled.
Inherited description: Called before the compile of the item is done.
It is passed a qstruct which can be inspected and modified.
Inherited description: Called before an item is deleted. Returning an error code prevents the delete from occurring.
Inherited description: This is called before the actual load of data to give the chance
to load the item from an external format.
method OnBeforeSave(InternalName As %String, Location As %String = "", Object As %RegisteredObject = $$$NULLOREF) as %Status
Inherited description: Called before the item is saved to the database it is passed
a reference to the current temporary storage of this item so that it
can be modified before the save completes. If you quit with an error
value then it will abort the save.
method OnBeforeTimestamp(InternalName As %String)
Inherited description: Called before Studio checks for the timestamp of an item.
method OnMenuItem(MenuName As %String, InternalName As %String, SelectedText As %String, ByRef Enabled As %Boolean, ByRef DisplayName As %String) as %Status
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, ByRef Target As %String, ByRef Msg As %String, ByRef Reload As %Boolean) as %Status
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.
Queries
query MainMenus(Classname As %String)
SQL Query:
SELECT Name, Type FROM %Studio_Extension.Menu WHERE MenuBase %INLIST %ZHSLIB_PackageManager_Developer_Extension.Composite_GetSubExtensionClasses()
SELECT Name, Type FROM %Studio_Extension.Menu WHERE MenuBase %INLIST %ZHSLIB_PackageManager_Developer_Extension.Composite_GetSubExtensionClasses()
query MenuItems(Classname As %String, MenuName As %String, InternalName As %String, SelectedText As %String)
SQL Query:
SELECT MenuItem_Name, MenuItem_Enabled, MenuItem_Save, MenuItem_Separator FROM %Studio_Extension.Menu_MenuItem WHERE Menu->MenuBase %INLIST %ZHSLIB_PackageManager_Developer_Extension.Composite_GetSubExtensionClasses() AND Menu->Name = :MenuName
SELECT MenuItem_Name, MenuItem_Enabled, MenuItem_Save, MenuItem_Separator FROM %Studio_Extension.Menu_MenuItem WHERE Menu->MenuBase %INLIST %ZHSLIB_PackageManager_Developer_Extension.Composite_GetSubExtensionClasses() AND Menu->Name = :MenuName
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnClose()
- %OnNew()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- FindNamespaceForDatabase()
- FindNamespaceForInternalName()
- ForEachExtension()
- GetCurrentNamespaceExtension()
- GetMenuExtension()
- GetPrimaryExtension()
- GetPrimaryExtensionClass()
- GetSubExtension()
- GetSubExtensionClasses()
- SetExtensionClasses()
- SetPrimaryExtensionClass()
- SetSubExtensionClasses()