EA_OnPreNewMethod

Return to Introduction  Previous page  Next page

EA_OnPreNewMethod notifies Add-Ins that a new method is about to be created on an element. It enables Add-Ins to permit or deny the creation of the new method.

 

Syntax

 

Function EA_OnPreNewMethod(Repository As EA.Repository, Info As EA.EventProperties) As Boolean

 

The EA_OnPreNewMethod function syntax contains the following elements

 

 

Parameter

Type

Direction

Description

Repository

EA.Repository

 

IN

An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

Info

EA.EventProperties

IN

Contains the following EventProperty Objects for the method to be created :

 

·ReturnType : A string value corresponding to Method.ReturnType
·Stereotype : A string value corresponding to Method.Stereotype
·ParentID : A long value corresponding to Method.ParentID
·ClassifierID : A long value corresponding to Method.ClassifierID

 

 

Return Value

 

Return True to enable the addition of the new method to the model. Return False to disenable the addition of the new method.

 

Details

 

This event occurs when a user creates a new method on an element by either drag-dropping from the Project Browser window, using the Method properties dialog, or the in-place editor on the diagram. The notification is provided immediately before the method is created, so that the add-in can disenable the addition of the method.

See Also