Book a Demo

Author Topic: operation show usage  (Read 2859 times)

didier

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
operation show usage
« on: April 14, 2005, 03:52:43 am »
Is it possible to find where an operation is used (for instance in which sequence diagrams) ???

thomaskilian

  • Guest
Re: operation show usage
« Reply #1 on: April 14, 2005, 04:34:35 am »
No. You only can show the usage of the containing class. Select the class in the browse, CTRL-U (or context: Usage), double-click the listed usages and the appropriate diagram will open with the class highlighted.

didier

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: operation show usage
« Reply #2 on: April 14, 2005, 11:19:30 pm »
Thank you Thomas.
Has anybody a workaround for this ?

How are you for instance dealing with the following : deleting (or changing) an operation in one sequence diagram (SD) makes another SD invalid (e.g. that other SD was using the operation you deleted) ?

thomaskilian

  • Guest
Re: operation show usage
« Reply #3 on: April 15, 2005, 12:40:52 am »
I rember vaguely some discussion about that topic but can't find it right now.

About your example. Operations on sequence diagrams are very loosely coupled to operations in the according classes. Once you create a message, the currently available operations are displayed and you can copy the name.  Deleting the operation in the class will not delete the message. So my answer to you would be to do a sanity check using the automation interface. Or simply being careful when working with sequence diagrams. IMO they should be used only as a design help, not as a "must be" part of the design.

Maarten

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: operation show usage
« Reply #4 on: August 12, 2005, 01:03:34 am »
I had the same problem concerning operation usage. When I was searching the forum for any information on this topic I found this post. Although my reply is probably too late for Didier I nevertheless post it for others with a similar question. ;)

My quick and dirty method for simulating operation usage follows the following steps:
1. Open the eap file in Access
2. You probably need to convert it to a more recent format (still based on Access97)
3. Create a new query with the following SQL
Code: [Select]
SELECT t_connector.Connector_ID, t_connector.Name, t_diagram.Package_ID, t_package.Name, t_connector.DiagramID, t_diagram.Name, t_connector.Start_Object_ID, t_object.Name
FROM t_object INNER JOIN (t_package INNER JOIN (t_connector INNER JOIN t_diagram ON t_connector.DiagramID = t_diagram.Diagram_ID) ON t_package.Package_ID = t_diagram.Package_ID) ON t_object.Object_ID = t_connector.Start_Object_ID
WHERE (((UCase([t_connector].[Name])) Like UCase([OperationName] & "*")) AND ((t_connector.Connector_Type)="Sequence"));


4. Run the query with your operationname as parameter
5. The resulting list shows the sequence diagrams and objects that are calling your operation

In the hope that a similar feature will be provided in a future version of EA I did not bother to create something more decent by means of the automation interface.