class %Studio.Extension.Base extends %Library.RegisteredObjectStudio extensibility superclass, this does nothing but provide interface for the real extensibility classes to use. Subclass from this and implement the methods you need.
property IconStatus as %Integer [ InitialExpression = 0 ];
Can be set to determine if we wish to report the source control status of the document in the project window or in the open dialog. This property should be set when the source control class is initialized. As this can be a large number of callbacks the default is not to call the ItemIconState() method at all. Do not enable this unless the information needed is available directly in Cache or the performance will be too slow. Values are:
- 0 - Disabled
- 1 - Use ItemIconState() callback in project window
- 2 - Use ItemIconState() callback in open dialog window (and namespace window)
- 3 - Use ItemIconState() callback everywhere
Property methods: IconStatusDisplayToLogical(), IconStatusGet(), IconStatusIsValid(), IconStatusLogicalToDisplay(), IconStatusNormalize(), IconStatusSet()
property MainJob as %String;
$Job number of the main Studio process or blank if this is the main Studio connection. This can be used to help co-ordinate between the jobs if Studio is using another server process for things like find in files or a big compile.
Property methods: MainJobDisplayToLogical(), MainJobGet(), MainJobIsValid(), MainJobLogicalToDisplay(), MainJobLogicalToOdbc(), MainJobNormalize(), MainJobSet()
property Modified as %String [ MultiDimensional ];
If the root node is set to 1 then calls to the source control hooks will keep track if the source control hook modifies the document and if it does then it will defined %SourceControl.Modified(docname)=1.
Property methods: ModifiedDisplayToLogical(), ModifiedGet(), ModifiedIsValid(), ModifiedLogicalToDisplay(), ModifiedLogicalToOdbc(), ModifiedNormalize(), ModifiedSet()
property StudioVersion as %String;
Version of Studio that is connecting to this server
Property methods: StudioVersionDisplayToLogical(), StudioVersionGet(), StudioVersionIsValid(), StudioVersionLogicalToDisplay(), StudioVersionLogicalToOdbc(), StudioVersionNormalize(), StudioVersionSet()
property Username as %String;
The username of this source control user.
Property methods: UsernameDisplayToLogical(), UsernameGet(), UsernameIsValid(), UsernameLogicalToDisplay(), UsernameLogicalToOdbc(), UsernameNormalize(), UsernameSet()
method %OnClose() as %Status
Inherited description: This callback method is invoked by the %Close() method to provide notification that the current object is being closed.
The return value of this method is ignored.
This just calls the Login() to perform an initialisation. Note that this is called by Studio automatically via the %Studio.SourceControl.Interface class, do not call %New directly.
method AfterUserAction(Type As %Integer, Name As %String, InternalName As %String, Answer As %Integer, Msg As %String = "", ByRef Reload As %Boolean) as %Status
This is called after the UserAction() and after any template is run or dialog is displayed. For 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
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
Return information about this entity.
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
Returns true if this item is in source control and false otherwise.
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.
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
Perform any login step here.
method Logout() as %Status
Perform any logout step here.
classmethod OnAfterAllClassCompile(List As %String, Level As %Integer, ByRef qstruct As %String, Status As %Status) as %Status
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 instanciated in order for it to be called. By default it will call the OnAfterClassCompile() if there is a source control class instanciated, 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.