13.07.2015 Views

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> <strong>Studio</strong> Source Control Hooks• Ensure that you can perform source control activities from within <strong>Studio</strong>.• Ensure that <strong>Studio</strong> always has the same information that the source control system has as to whethera document has been checked out, and, if checked out, by whom.A.2 <strong>Caché</strong> DocumentsA <strong>Caché</strong> document is a class definition, a routine, or a CSP file. <strong>Caché</strong> records information about each<strong>Caché</strong> document, such as whether it has changed since the last compilation. Your source control systemwill treat each <strong>Caché</strong> document as a separate unit.In <strong>Caché</strong>, you work within one namespace at a time. The same will be true for your source controlsystem.A.2.1 Tools for Managing Documents and Files<strong>Caché</strong> provides the following tools for managing <strong>Caché</strong> documents and external files:• The %<strong>Studio</strong>.Extension.Base and %<strong>Studio</strong>.SourceControl.Base classes provide methods for basicdocument management. You can extend one of these classes to add menu items that act on <strong>Caché</strong>documents. These classes are discussed in a later section.• The $system.OBJ.Export function exports a <strong>Caché</strong> document to an XML file in the externaldocument system. This XML file contains all the information needed to reconstruct the <strong>Caché</strong>document. For example, for a class document, the corresponding XML file is a text representationof the entire class definition, which includes all code, properties, comments, and so on.• The $system.OBJ.Load function loads an external XML file and overwrites the corresponding<strong>Caché</strong> document, if one exists.• The %RoutineMgr.TS class method returns the timestamp for a <strong>Caché</strong> document. This methodalso returns, by reference, the compile time for the <strong>Caché</strong> document, as the second argument.A.2.2 Deciding How to Map Internal and External NamesEach document has two names:• An internal name, the name you use in the Open dialog box in <strong>Studio</strong>.• An external name, which should be the complete external file name, including path. Because ofdifferences between supported <strong>Caché</strong> platforms, it is not possible to provide a meaningful default.136 <strong>Using</strong> <strong>Caché</strong> <strong>Studio</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!