Chapter 10: the source control integration api – Adobe Dreamweaver API Reference CS5 User Manual
Page 91
86
Last updated 8/27/2013
Chapter 10: The source control integration
API
The source control integration API lets you write shared libraries. These APIs enable you to extend the Adobe®
Dreamweaver® Check In/Check Out feature using source control systems (such as Sourcesafe or CVS).
Your libraries must support a minimum set of API functions for Dreamweaver to integrate with a source control
system. And, your libraries must reside in the Program Files/Adobe/Adobe Dreamweaver
CS5/Configuration/SourceControl folder.
When Dreamweaver starts, it loads each library. Dreamweaver determines which features the library supports by
calling
GetProcAddress()
for each API function. If an address does not exist, Dreamweaver assumes that the library
does not support the API. If the address exists, Dreamweaver uses the library version of the function to support the
functionality. When a Dreamweaver user defines or edits a site and then selects the Web Server SCS tab, the choices
that correspond to the DLLs appear on the tab. These choices appear in addition to the standard items on the tab. The
DLLs are loaded from the Program Files/Adobe/Adobe Dreamweaver CS5/Configuration/SourceControl folder.
To create a Site > Source Control menu to which you can add custom items, add the following code. Add the code in
the Site menu in the menus.xml file:
How source control integration with Dreamweaver
works
When a Dreamweaver user selects server connection, file transfer, or Design Notes features, Dreamweaver calls the
DLL’s version of the corresponding API function (
Connect()
,
Disconnect()
,
Get()
,
Put()
,
Checkin()
,
Checkout()
,
Undocheckout()
, and
Synchronize()
). The DLL handles the request, including displaying dialog
boxes that gather information or letting the user interact with the DLL. The DLL also displays information or error
messages.
The source control system can optionally support Design Notes and Check In/Check Out. The Dreamweaver user
enables Design Notes in source control systems by selecting the Design Notes tab in the Edit Sites dialog box and
checking the box that enables the feature; this process is same to enable Design Notes with FTP and LAN. If the source
control system does not support Design Notes and the user wants to use this feature, Dreamweaver transports Design
Note (MNO) files to maintain the Design Notes (as it does with FTP and LAN).
Check In/Check Out is treated differently than the Design Notes feature; if the source control system supports it, the
user cannot override its use from the Design Notes dialog box. If the user tries to override the source control system,
an error message appears.