Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: TheTwo on May 20, 2008, 12:44:29 am
-
Hi,
is it possible to deactivate some functionality in EA?
My task is to customize EA GUI for MOF Metamodelling. So it would be nice if I could deactivate some buttons and some Options in the Property menus.
TheTwo
-
You can customize the main menu using Tools | Customize. The context menus aren't customizable though.
-
Is it possible to change the property window of a class or an other element? (In the context Menu "Properties...".)
Thanks
TheTwo
-
If you are looking into preventing users from changing properties of elements etc, then it may be worth investigating User Security:
http://www.sparxsystems.com.au/EAUserGuide/index.html?usersecurity2.htm
For example: To prevent users from updating elements you can revoke their "UpdateElement" permission.
-
Thanks.
My intention is for example to prevent that the user can select in the properties of a Class-Element the "Visibility" Protected.
The User should only select Private or Public.
Is it possible to do this?
-
can't delete my post
-
Thanks.
My intention is for example to prevent that the user can select in the properties of a Class-Element the "Visibility" Protected.
The User should only select Private or Public.
Is it possible to do this?
Have a look at the possibility of writing a model validation add-in. You can define a rule to check the value of the visibility field. There is example model validation code in the help file.
-
Hi,
is it possible to supress the "EA Properties Dialog" and add an own one?
-
Yes it is.
Look at the MDG add-in model. You need to trap some events and cancel the default EA behavior. It is all mentioned in the help file. I think the section you want is the one before the 'usual' API object model.
David
-
Thanks,
I've allready tried to deactivate the Properties Dialog on double click. Therefore I've set the variable Repository.SupressEADialogs to true, but this only works for the Methods EA_OnNewElement(),... when an Element is created.
How can I cancel the default EA behavior e.g. double click on an Class in the project view?
-
You should be able to do that as well, the process is (supposed to be) the same.
Some time ago I reported a problem where deactivate did not work when an element was first created from a profile. That turned out to be a bug, which Sparx corrected.
I suggest you create a small project where your problem occurs, then file a bug report with Sparx. Compress your project (and the automation source code) and attach it to the bug report. [Use the Registered Users bug report; I'm not sure if you can attach files to the 'public' version.]
David
-
How can I cancel the default EA behavior e.g. double click on an Class in the project view?
Search the help file for EA_OnContextItemDoubleClicked...
-
Thanks,
I've allready looked at EA_OnContextItemDoubleClicked() but doesn't see the return value. In the Syntax of the method the return value is missing. Something as "As Boolean". Only in the "Return value" section it is described to return true or false.
TheTwo
-
[I am doing this from (addled) memory, so look it up to be sure, but...]
Set the cancel property of the passed value - or something like that. Since you're responding to an event the return value is unlikely to be used.