Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mogra69

Pages: [1] 2
1
Automation Interface, Add-Ins and Tools / Re: Automated Testing
« on: January 09, 2007, 07:10:24 pm »
This is good stuff. Thanks a lot for your help.

Just curious... could you briefly describe the AddIn's capabilities that you tested using mock.

Thanks.

2
Automation Interface, Add-Ins and Tools / Re: Automated Testing
« on: January 09, 2007, 06:06:28 pm »

For any serious AddIn testing the Repository has to be created for NMock.

Say for example we AddIn access Repository.Models collection. How do we create the collection for NMock testing? The problem I see is that EA.CollectionClass does not have a public constructor.

The following code does not compile:

EA.Collection models = new EA.CollectionClass;

You mention testing collections earlier. Please let me know how you did it.

Thanks.

3
Automation Interface, Add-Ins and Tools / Re: Automated Testing
« on: January 09, 2007, 11:50:03 am »
Thanks for your response. I will investigate NMock and RhinoMock.

4
Automation Interface, Add-Ins and Tools / Automated Testing
« on: January 08, 2007, 09:12:50 am »
I have a EA AddIn. I want to build automated tests for the AddIn.

Any thoughts on how this can be accomplished?

Can NUnit be used? How about SilkTest?

Please share your thoughts and experiences. I am sure this is a topic of wide interest.

5
Has any one seen an EA exception with the message - Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I get this intermittently soon after a user opens a file in EA and in the AddIn in EA_FileOpen handler I am trying to verify if the opened project is of the AddIn's interest.

Often it crashes inside EA.CollectionClass.GetAt().

I suspect after the FileOpen EA is initializing while the AddIn is accessing uninitialized data resulting in the crash. It seems like a timing issue as it is seen intermittently.

Any thoughts?

6
When we create a new project EA prompts us with 'Select Models' dialog after the file open dialog.

Using automation how do I open one of the models in the 'Select Models' dialog?

7

In my add-in I need to know if the repository has changed since it was last  opened. If so then update another file (not the eap file). How do I do this?

I could implement all the events that get invoked on model changes and maintain a modelChanged flag.

Is there a simpler way?

Repository.LastUpdate and Repository.FlagUpdate may hold some answers to my problem. Do you know how these work?

8
Try Repository.RefreshModelView(0) that cause most of the UI to re-rendered.

9

I need to lock the some model elements. I do this by setting element.Locked to true.

Without unlocking if start to modify the locked element properties I get an exception. This does make sense but it was not obvious when I first ran into it.

10
Hello EA Add-In Developers,

I am in the midst of developing an EA Add-In. From time to time I see EA exceptions and crashes when the Add-In is active. The exception often lacks detail that points to the cause.

I would like to compile a list of things that you have done in the Add-In that caused unexpected crashes or exceptions in EA.

Please respond to this thread with your experiences.

Also, please share any thoughts and ideas for making raising the quality and robustness of the Add-In.

Thanks.

11
What if the possible choices for tagged value changes with the currently selected object in the diagram.

The SortByProperties is of type string. It is a comma-separated list of property names of the selected object. I cannot do this as an enumerated type.

12
The sterotype attributes are displayed in the Tagged Values window for the selected model element in the diagram. This is standard EA functionality.

I have a custom UML Profile. I would like to manage the editing of the tagged values in the 'Tagged Values' window. For example, I have an attribute on the stereotype called 'SortByProperties' whose value is limited to a list of strings that are property names of the selected model element.

Any thoughts how this can be accomplished in the add-in?

13
Automation Interface, Add-Ins and Tools / Package.Locked really?
« on: October 19, 2006, 07:09:27 pm »

After I set Package.Locked to 'true' I see that package properties cannot be edited in the properties dialog. This is the expected behavior.

However, I can add a sub-package to a package that is locked from the UI? This is not expected.

How do I implement a truly 'locked' behavior for a package?

14
Thanks. I found the cause of my problem.

I was doing:
Package.Elements.AddNew( "MyClass", "Element")

instead of
Package.Elements.AddNew( "MyClass", "Class")

Thanks for your help.

15
Automation Interface, Add-Ins and Tools / Package.Elements is Readonly?
« on: October 19, 2006, 05:10:10 pm »

How do we add elements to a Package if Package.Elements is read-only?

I tried Package.Elements.AddNew() method. When I call Update() on the returned Element there's an exception.

Pages: [1] 2