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 - blackpuppy

Pages: [1]
1
General Board / Re: abstract property for interface
« on: March 28, 2005, 10:50:45 pm »
I found I can add the tagged value for readonly and writeonly without adding tagged value type readonly and writeonly first.  Are they built in?  Or no type is needed at all.  I see these two tagged values are checked in the class operation template for property.  I see EA is great in its extensibility, just it's so intuitive.

I have another question about property.  Since get and set operations of a property are represented as one operation in EA model, how could I differentiate the set and get in the communication/sequence diagram?  I found that it is always get operation such as "2.1: string:= Code()" where "Code" is the name of the property.  How to specify a set operation of the property?

Thanks!

2
General Board / Re: abstract property for interface
« on: March 28, 2005, 06:51:12 pm »
Thanks, Simon!

My colleague noticed this later on too.  We are still new to EA.  It would be better if the help is more task-oriented.

When I generate the property from an existing private int attribute, I set the property to read/write.  So it has both get and set method.  I can change this by going to the attribute and clicking the property option and then a "Modify Property Implementation" window will pops up for me to change the property to readonly/writeonly/readwrite.

If defining an operation of property sereotype without a linked attribute, how could I change the property implementation to have just get or set, or both get/set later?  How could I load that "Modify Property Implementation" window?

Thanks!
Zhu Ming

3
General Board / abstract property for interface
« on: March 28, 2005, 01:11:08 am »
How to define a property in an inteface?

I want to add some classes and interfaces of .NET Framework in my model.  My own classes will inherit these classes and implement these interfaces.  Since it is an interface, the property is abstract.  In EA, when I define a property, it asks me to select an attribute.  It seems that I must define an attribute first.  But for interface, I should be able to define the property without defining an attribute.  Maybe I'm doing it in the wrong way.  I'll be appreciated if anyone can tell me how to do it.

BTW, is there an existing package for .NET Base Class Library that I could import into my own EA model?  It will be greate if it does exist.

Thanks!
Zhu Ming

4
General Board / Re: convert communication diagram to sequence diag
« on: March 13, 2005, 07:06:18 pm »
Thanks a lot, Bruno!

I tried to search "sequence diagram" in the forum and it does not seem to find any useful messages.
The context menu is quite useful, I think.  There may be many such tips and tricks.

In addition, it's not easy to change the sequence of operations in a diagram.  In Rational Rose, I can do that in a sequence daigram by moving the operations up and down, then the sequence of the operations in the associated collaboration (communication) diagram will be changed accordingly.  In EA, I must go to the menu Diagram --> Sequence Communication Messages.  And we find there are some bugs there.  Is that the only way to do this?

5
General Board / convert communication diagram to sequence diagram
« on: March 13, 2005, 06:42:31 pm »
I'm new to EA and the forum.  Need some time to get started.  I have two simple questions.

Does anyone know how to convert a collaboration (communication) diagram to a sequence diagram?  In Rational Rose, just pressing one key will do the job.  Is there any way to do that in EA?  Because we use collaboration (communication) diagram in the analysis phase.  When we move on to the design phase, we'll use sequence diagram.  If there is a way to switch between these two kinds of diagrams for the same use case, the sequence diagram converted from collaboratin (communication) diagram will be a good start for the design phase.  Otherwise we have to redraw the sequence diagram from scratch.  In fact, the information carried in these two kinds of diagrams are basicly the same so it's possible to provide that conversion facility.

And how can I change an object of one class to another class?  In Rational Rose, I can just drag and drop the second class over the object of the first class, and the object will be changed to the instance of the second class.  Any way to do that in EA without deleting the existing object and adding a new one?  Because doing that will require redrawing the assocations and methods.

Thanks!
Zhu Ming

6
Is there any plan for the MDG for Visual Studio .NET 2005?  If any, when will it be available?

I've heard that VS.NET 2005 will be released at the end of the year.  And our company wants to use VS.NET 2005 beta for a new project now.  I think MDG is an excellent tool since it can help you keep the model and the code synchronized.  But after I tried, it can only work with VS.NET 2003.  It cannot recongnize the VS.NET 2005 project.  If I want to use MDG, then I have to use VS.NET 2003.

I can understand that it is not wise to make a tool that targets at a beta software that may be changed in the future like VS.NET 2005 beta. But is there any beta version of MDG for VS.NET 2005?

Does anybody know any information about this?

Thanks!
Zhu Ming

7
Thanks, Simon! :)

I just tried the options in build 750.  As you said, there is a bug with option 1.

For option 2, I found the option was unchecked before.  So I guess it does not fit my case.

I'll be waiting for build 751.

For the time being, I'll disable the Linked Attribute template for C# by putting %endTemplate% in the first line.  There may be another bug here.  When I delete the template and press Save button, the default template will come back.  ???

Thanks!

8
I have a Currency class.  It has a private _rates attributes of the type ExchangeRateCollection that is a list of ExchangeRate objects.  In addition, I have a class diagram that specify the 1-to-many relationship(link) between Currency and ExchangeRateCollection.

Then when I generate the C# code, it will generate the private _rates attribute and this is correct.  But in addition, it will generate a public attribute m_ExchangeRateCollection of type ExchangeRateCollection.  The relevant code snippet is quoted below.

Code: [Select]

public class Currency
{
   ! other code omitted

   private ExchangeRateCollection _rates;
   public ExchangeRateCollection m_ExchangeRateCollection;

   ! other code omitted
}//end Currency


I think the latter attribute comes from the 1-to-many relationship.  In fact, I do not want this latter public attribute.

How to avoid the latter attribute generated from the relationship(link)?  I can delete the class diagram or just delete the link from the Currency class' property window/Link tab.  And it works.  But is this the only solution?  Or I can change the classes in the class diagram to objects, and this also works but it is a little strange.

Has anybody met the similar problem?  Any other solution?

Thanks!

9
Automation Interface, Add-Ins and Tools / How to model constructor?
« on: March 30, 2005, 06:43:31 pm »
Is it possible to model the constructor as a class operation?  Or there is a specific way to do that?

I want to show the constructor in the communication diagram.  I first define an operation named "new".  But later found it will be generated as a method named "new" in the code and this is not waht I want.  So later I use the class name as the operation name and set the return value blank.  I was afraid that the code template will generate a default constructor and another constructor for my operation.  But it turns out that the code template will check and avoid generating two constructors of the same name.

How does other people model constructors?  What is the recommended way?

Thanks!

Pages: [1]