透過 Visual Studio 專案建立 Rational Rhapsody 模型

如果 Visual Studio 中存在現有專案,您可以將程式檔匯入 IBM® Rational® Rhapsody® 以建立專案模型。您也可以選擇鏈結 Visual Studio 專案及 Rational Rhapsody 模型,使得對其中一個所做的任何變更會在另一個中反映。

程序

  1. 在 Visual Studio 中開啟解決方案。
  2. 按一下 Visual Studio 中 Rational Rhapsody 工具列上的 Rational Rhapsody 圖示。(如果 Visual Studio 中沒有開啟的解決方案,此圖示將會停用。) 這將啟動並建立與 Rational Rhapsody 的通訊。如果 Rational Rhapsody 已經在執行中,將會與已經執行的 Rational Rhapsody 的實例建立通訊。
  3. 在焦點集中於 Rational Rhapsody 時,使用此功能表以建立 Rational Rhapsody 專案。
  4. 在 Visual Studio 中,使用 Rational Rhapsody 工具列中的「作用中專案」清單選取您要匯入 Rational Rhapsody 的專案。
  5. 在 Visual Studio 中,使用 Rational Rhapsody 工具列中的「Rhapsody 配置」清單,以選取應該將 Visual Studio 鏈結到的 Rational Rhapsody 配置。您可以選取現有配置或選取建立配置的選項。
  6. 若要匯出整個專案或僅匯出選定類別,請在 Visual Studio 中選擇 Rational Rhapsody 工具列上包含的兩個匯出選項中的一個。如果您選取手動匯出選項,畫面上會顯示「Rational Rhapsody 反向工程」視窗,可讓您選取相關檔案。
  7. 將檔案匯入模型之前,系統將詢問您是否僅匯入檔案,或者還要將 Visual Studio 專案鏈結至 Rational Rhapsody 模型。如果選擇將專案鏈結至模型,對模型所做的全部變更將在專案程式碼中反映,對專案程式碼所做的全部變更將來回轉換至模型(請參閱使用鏈結至 Rational Rhapsody 模型的 Visual Studio 專案)。

回饋