Association/Aggregation/Composition relationships

I saw some posts asked about this already, but no one answer it. Let me summarize my doubts here.

  1. When reverse engineering, can VP build up relationship between class besides Inheritance? The basic one will be “Association”. Like ClassA has a field or property of ClassB:

class ClassA{
  public ClassB InstanceB;
}

When do reverse engineering, can VP put a association line between this two classes? It does not seems to have that ability.

  1. When generating code, can VP generate Generic Collection relationship for Aggregation or Composition. Like after specifing “List” as the Aggregation collection class, and “Child” as the item of the collection, VP can automatically generate code like :

class Parent{
  public List<Child> Children;
}

And the same question for reverse, if VP read the code like above, can it automatically set relationship “Aggregation” between the 2 classes? Currently, it seems only allow object[], but Java1.5 and .Net 2 allow generic collection (C++ has it for a long time). Is it because I didn’t find the place to make it work?

  1. Some other Case tools, like EA by Sparx Systems, prividing “Automation Interface” for developing Add-ins, which can be used to generate codes in the way customer required. Does or will VP provide these kind of function?

Thanks

Hi orientphoebus,

#1.
I tried both Instant Reverse of VP-UML and round-trip engineering in SDE. But both can reverse engineer your example successfully with association line created between ClassA and ClassB. Could you please check if you are using the most updated release of us?

#2.
I am sorry that Java 5.0 is not supported at the moment. Our engineers are working on it and it will be available on or before Feb 2006. I will keep you informed once there is any news on this issue.

#3.
You can create your own plugin for VP. Related documentations and sample plugin could be found here:
http://www.visual-paradigm.com/documentation/#extend

If there are any further questions, please let me know.

Best Regards,
Jick

Thank you Jick. I think it was my fault didn’t explain it clearer.

I am using .Net. (I am sure 100% Java supporter, but my bosses are not. sigh.). The SDE for .Net is doing fine with the relasionship. Just one small thing:

When specify 0…1 multiplicity, it give me object[] when generate code, which I think it would be properly if use object instead of array. Cause 0…1 meansbe nullable object.

The problem is for VP-UML, when I create the dll from Visual Studio.Net 2003, VP-UML import it with “Instance reverse”, then I drag the classes from “Model Repository” to a Class Diagram, The relasionship is not there.

Next, c#2.0 is going to contains stuff like List. Is your plan for .Net 2.0 and VS2005 also going to be Feb.2006?

Why not reverse from code directly in VP-UML but from DLL or EXE? Is it because MS’s multi-language hype cause too much work for you guys? But reverse from DLL is still a little not that convenient, just not big issue. SDE is doing fine.

Forgot to login , prev reply is mine also.

I took a look at the plug-in. it doesn’t seesm like what I want. Is it possible to use the plug in to generate new or my-defined language from diagrams. Or reverse it from it.

That is what EA seems provided.

Hi orientphoebus,

When specify 0…1 multiplicity, it give me object[] when generate code, which I think it would be properly if use object instead of array. Cause 0…1 meansbe nullable object.

I will forward your suggestion to our developers. At the moment, you may set the multiplicity be ‘1’. This will generate an object instead of object array.

The problem is for VP-UML, when I create the dll from Visual Studio.Net 2003, VP-UML import it with “Instance reverse”, then I drag the classes from “Model Repository” to a Class Diagram, The relasionship is not there.

May I kindly request for the source file(s) for repeating this problem? You may send me through private message.

Next, c#2.0 is going to contains stuff like List. Is your plan for .Net 2.0 and VS2005 also going to be Feb.2006?

Actually, we are working on a new code generation engine for .Net 2.0. However, we would like to focus on consolidating the support of VS.NET 2005 first. The support of .Net 2.0 will be our primary focus after the release of SDE for Visual Studio .NET 2005.

I took a look at the plug-in. it doesn’t seesm like what I want.

I am unclear about what EA provided :frowning: . But as I know our plugin API does allows user to access our whole model. I supposed this is sufficient to write a code generator that read the class details via the API… Perhaps I misunderstood your need? Would you mind telling me more about this?

Best Regards,
Jick

Hi orientphoebus,

The problem is for VP-UML, when I create the dll from Visual Studio.Net 2003, VP-UML import it with “Instance reverse”, then I drag the classes from “Model Repository” to a Class Diagram, The relasionship is not there.

This problem is fixed and deployed as a hotfix. Please download the hotfix here:
http://files2.visual-paradigm.com/200602/HotFix/20060128a/vpplatform.jar

The following article shows you how to apply the hotfix to your VP Suite:
http://resource.visual-paradigm.com/tips_and_tricks/general/replacing_hot_fix.html

If there are any further inquiry, please do not hesitate to contact me.

Best Regards,
Jick

Is the above currently working? I use generics extensively in my code and am not able to reverse engineer these sorts of constructs into an UML class diagram. I’m not sure whether it’s not possible or that I just didn’t find the right switch.

Hi user,

Java 1.5 is supported by Instant Reverse started from the Service Pack 2 of VP Suite 2.2. Here is an article about this enhancement:
http://resource.visual-paradigm.com/vpsuite2.2sp2/support_java_1.5_syntax_in_instant_reverse.html

If you are already using VP Suite 2.2, I suggest you do an upgrade to advance to the latest release of Service Pack 2. You can update through the updater under the bin folder of $vp-suite-install-dir

If you are not using the VP Suite 2.2, I suggest you download it from the download page at:
http://www.visual-paradigm.com/download/download.jsp?product=vpsuite

If there are any questions, please feel free to post again.

Best Regards,
Jick

I am the same user responding in the last message.

Thanks for the quick reply. But what I forgot to tell is that I am working with C# (and SDE). Is the same functionality also available for that language?

Regards,
Kars

Dear Kars,

I regret that the Instant Revese of .Net binaries is not available for .Net 2.0 at this moment. We expect to support it in VP Suite 2.3.

Best Regards,
Jick