VS2008 (vb.net). Breaking methods bodies

I’ve tried to use SDE 4.4. for VS with a Visual Basic project.

I created a simple class, i.e.

public class A
public sub b()
dim i as integer=3
end sub
end class

After I send class to UML, I can see it in class repository. Everything’s good (all methods, their visibility so on are seen) except for the method body (field “Code” in operation specification is empty). As far as I update to code, nothing happens (method body in VB doesn’t change).
Yet, if I change the name of the method via UML and update code, then method body changes ‘to Throw New System.Exception(“Not implemented”)’.
If I change the Class name via uml and update code, then new Sub b() is generated in class, which lead compiller to error (“class aready has the same method”)

Is it a bug of VS2008 beta-support or programme should destroy method body? Is there any way to preserve early-written code if I’d like to change some classes structure via UML?

Thank you very much for you reply!

Hi user,

Thanks for your post and the details. I tried to modify the operation name and the class name but I cannot reproduce your problem (in both cases it will update existing operation/class name in code to new name).

Would you mind sending me your Visual Basic project file and the vp.log file (inside VPSuite/visualstudio_2008 folder) for investigation? Thanks in advance!
*If you do not want your project file to be accessed by public, please send to lilian@visual-paradigm.com

Best regards,
Lilian Wong

Thank You for your answering, LilianWong!
Today I’ve decided to investigate my problem and tried to reproduce it at my collegue’s computer. I found that it appears only in case of partial classes, i.e.

file "a.vb"
Partial Public Class pCls
Public Class cls1
Sub sub1()
'Some sub info
End Sub
End Class
End Class

file "b.vb"
Partial Public Class pCls
Public Class cls2
Sub sub2()
'Some othert sub code
End Sub
End Class
End Class

Now if I do something to cls1 or to cls2 at UML-diagrams - it leads to an error. I.e., trying to change classname leads to new class cls2 at “a.vb” to appear and its sub2 was “throw new exception…”. Of course compiler shows error “same class already exists”.

For sure, it is possible to avoid partial classes, but they are very usefull in solution we are working on.

If You still win’t be able to reproduce a problem, I’ll for sure upload content you’ve mentioned.

Thank you very much!

Thanks for the details. I’ve forwarded it to our engineers to follow-up, and will get back to you ASAP once there are any news. If you need any help, please do not hesitate to contact me again.

Best regards,

I would like to let you know the round-trip engineering problem has been fixed and deployed and you can download the latest patch build at the following link. If you need any help, please do not hesitate to contact me again.


Bests regards,