' --------------------------------------------------------------- ' File: Associations.ebs ' ' Description: ' Prints out current associations between Model, Packages, Use Cases and RequisitePro artifacts ' ' Created 03/13/2000 by KatrinaW ' ' Entry Points: Main ' ' Created by Rational Software Corporation ' (C) Copyright Rational Software Corporation 1996 All Rights Reserved '------------------------------------------------------------------------------------------------------- Const Banner$ = "---------------------------------------------------------" Sub PrintPackageStructure (aCat As Category, Indent As Integer) Dim theProperties As New PropertyCollection Dim aProperty As Property Dim theCategory As Category Dim theUseCases As New UseCaseCollection Dim aUseCase As New UseCase Print Banner Print Banner Print " Package: " + aCat.Name 'Print String$(Indent, ".");aCat.Name Set theProperties = aCat.GetAllProperties () For k% = 1 To theProperties.Count Set aProperty = theProperties.GetAt (k%) If aProperty.Name Like "ReqProProjectPath" Then If Len(aProperty.Value) > 0 Then Print String$(Indent + 4, "-"); "RequisitePro Project: " + aProperty.Value End If End If Next k% Set theUseCases = aCat.UseCases For k% = 1 To theUseCases.Count Set aUseCase = theUseCases.GetAt (k%) Print String$(Indent + 8, "."); aUseCase.Name Set theProperties = aUseCase.GetAllProperties() For l% = 1 To theProperties.Count Set aProperty = theProperties.GetAt(l%) Select Case aProperty.Name Case "ReqProProjectPath" If Len(aProperty.Value) > 0 Then Print String$(Indent +16, " "); "RequisitePro Project: " + aProperty.Value End If Case "ReqProDocumentName" If Len(aProperty.Value) > 0 Then Print String$(Indent +16, " "); "RequisitePro Use Case Document: " + aProperty.Value End If End Select Next l% Next k% For i% = 1 To aCat.Categories.Count PrintPackageStructure aCat.Categories.GetAt (i%), Indent + 4 Print Banner Print Banner Next i% End Sub Sub PrintAssociations (aCategory As Category, Indent As Integer) PrintPackageStructure aCategory, 0 End Sub Sub AssociationsReport(myModel As Model) Dim theUseCases As UseCaseCollection Dim theProperties As PropertyCollection Dim aProperty As Property Dim Indent As Integer ViewportClear ViewportOpen Print Banner Print " RequisitePro Associations" Print Banner Set theProperties = myModel.GetAllProperties() For i% = 1 To theProperties.Count Set aProperty = theProperties.GetAt (i%) If aProperty.Name Like "ReqProProjectPath" Then If Len(aProperty.Value) > 0 Then Print "The Model (" + myModel.Name + ") " Print String$(Indent + 4, "-"); "RequisitePro Project: " + aProperty.Value End If End If Next i% PrintAssociations myModel.RootUseCaseCategory, 0 End Sub Sub Main AssociationsReport (RoseApp.CurrentModel) End Sub