Enterprise Architect Add-in Framework Documentation
MDG_Merge enables the Add-In to jointly handle changes to both the model branch and the code project that the model branch is connected to. This event should be called whenever the user has asked to merge their model branch with its connected code project, or whenever the user has established a new connection to a code project. The purpose of this event is to enable the Add-In to interact with the user to perform a merge between the model branch and the connected project. Also look at MDG_Connect, MDG_PreMerge and MDG_PostMerge. Merge A merge consists of three major operations: - Export: Where newly created model objects are exported into code and made available to the code project. - Import: Where newly created code objects, Classes and such things are imported into the model. - Synchronize: Where objects available both to the model and in code are jointly updated to reflect changes made in either the model, code project or both. - Synchronize Type The Synchronize operation can take place in one of four different ways. Each of these ways corresponds to a value returned by SynchType: - None: (SynchType = 0) No synchronization is to be performed - Forward: (SynchType = 1) Forward synchronization, between the model branch and the code project is to occur - Reverse: (SynchType = 2) Reverse synchronization, between the code project and the model branch is to occur - Both: (SynchType = 3) Reverse, then Forward synchronization's are to occur. Object ID Format Each of the Object IDs listed in the string arrays described above should be composed in the following format: (@namespace)*(#class)*($attribute|%operation|:property)*

Namespace: EAAddinFramework
Assembly: EAAddinFramework (in EAAddinFramework.dll) Version: 1.0.4064.9398

Syntax

C#
public virtual long MDG_Merge(
	Repository Repository,
	string PackageGuid,
	ref Object SynchObjects,
	ref string SynchType,
	ref Object ExportObjects,
	ref Object ExportFiles,
	ref Object ImportFiles,
	ref string IgnoreLocked,
	ref string Language
)
Visual Basic
Public Overridable Function MDG_Merge ( _
	Repository As Repository, _
	PackageGuid As String, _
	ByRef SynchObjects As Object, _
	ByRef SynchType As String, _
	ByRef ExportObjects As Object, _
	ByRef ExportFiles As Object, _
	ByRef ImportFiles As Object, _
	ByRef IgnoreLocked As String, _
	ByRef Language As String _
) As Long
Visual C++
public:
virtual long long MDG_Merge(
	Repository^ Repository, 
	String^ PackageGuid, 
	Object^% SynchObjects, 
	String^% SynchType, 
	Object^% ExportObjects, 
	Object^% ExportFiles, 
	Object^% ImportFiles, 
	String^% IgnoreLocked, 
	String^% Language
)

Parameters

Repository
Type: Repository
An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
PackageGuid
Type: System..::..String
The GUID identifying the Enterprise Architect package sub-tree that is controlled by the Add-In.
SynchObjects
Type: System..::..Object%
A string array containing a list of objects (Object ID format) to be jointly synchronized between the model branch and the project. See summary for the format of the Object IDs.
SynchType
Type: System..::..String%
The value determining the user-selected type of synchronization to take place. See summary for a list of valid values.
ExportObjects
Type: System..::..Object%
The string array containing the list of new model objects (in Object ID format) to be exported by Enterprise Architect to the code project.
ExportFiles
Type: System..::..Object%
A string array containing the list of files for each model object chosen for export by the Add-In. Each entry in this array must have a corresponding entry in the ExportObjects parameter at the same array index, so ExportFiles(2) must contain the filename of the object by ExportObjects(2).
ImportFiles
Type: System..::..Object%
A string array containing the list of code files made available to the code project to be newly imported to the model. Enterprise Architect imports each file listed in this array for import into the connected model branch.
IgnoreLocked
Type: System..::..String%
A value indicating whether to ignore any files locked by the code project (that is, "TRUE" or "FALSE".
Language
Type: System..::..String%
The string value containing the name of the code language supported by the code project connected to the model branch.

Return Value

Return a non-zero if the merge operation completed successfully and a zero value when the operation has been unsuccessful.

See Also