本文介绍了在VS 2010中将工程代码反向转换为UML类图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将工程反向源代码转换为VS 2010 UML类模型?

Reverse engineering source code into a VS 2010 UML class model?

我很难过,VS 2010不支持此功能(我从2010年2月开始使用RC).我曾尝试将类从架构浏览器"拖到"UML模型资源管理器",但这是行不通的(不会让我落入UML模型).

I have a bad feeling that this is not supported in VS 2010 (I'm using the RC from Feb 2010). I've tried dragging classes from the "Architecture Explorer" to the "UML Model Explorer" but that doesn't work (won't let me drop on the UML Model).

我尝试生成旧样式的类图(* .cd),并将生成的图对象拖到空白的UML类图上.没有运气.

I've tried generating an old style class diagram (*.cd) and dragging the resulting diagram object to a blank UML Class diagram. No luck.

除了某些有关自顶向下建模"的MS市场营销模糊问题以及来自UML模型的正向工程代码外,Binging确实显示了其他内容.这让我怀疑VS团队没有将逆向工程代码处理到模型中.

Binging does show up anything other than some MS marketing blurbs about "top-down modelling" and, as expected, forward engineering code from the UML model. This makes me suspect that the VS team didn't tackle reverse engineering code into models.

我能够从代码生成UML活动图.好的.但是其他图(以及由此生成的VS UML模型存储库对象)难以捉摸.

I was able to generate UML Activity diagrams from code. Nice. But other diagrams (and resulting generation of VS UML Model Repository Objects) is elusive.

如果我的猜想是正确的,那就太令人失望了.我的许多工作-我敢猜想大多数开发人员都是这种情况-是在现有软件中添加功能,而不是在未完成的工作中进行.如果没有能力将现有代码反向工程到VS UML模型存储库中或从其他工具导入模型,我看不出VS UML建模的采用将如何发展.我只需要坚持使用我目前最喜欢的工具- Sparks Systems的Enterprise Architect .

If my suspicions are correct, this is a big disappointment. A lot of my work - and I would venture to guess that this is the case for most developers - is adding features to existing software and not doing green-field work. Without the ability to reverse engineer existing code into the VS UML Model repository or import models from other tools, I don't see how adoption of VS UML modelling will get very far. I'll just have to stick with my current favorite tool - Enterprise Architect by Sparks Systems.

我认为此缺失功能是一个主要缺点.别人怎么看?

其他人打算做什么?继续使用他们当前喜欢的UML建模解决方案,而忽略VS 2010的产品吗?

推荐答案

此问题已在 VS 2010体系结构和建模论坛.

基本上,此功能将出现在VS 2010 RTM周围的电动工具版本中.如果您还有其他问题,建议您在论坛中发帖.

Basically, this functionality will appear in a power tool release around VS 2010 RTM. I encourage you to post in the forum if you have more questions.

更新

这篇关于在VS 2010中将工程代码反向转换为UML类图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 23:11