Runtime

## org.eclipse.gmf.runtime.diagram.ui.requests
Class ShowRelatedElementsRequest

    java.lang.Object
      org.eclipse.gef.Request
          org.eclipse.gmf.runtime.diagram.ui.requests.ShowRelatedElementsRequest

public class ShowRelatedElementsRequest
extends Request

Field Summary
`protected ExpansionType` `expansionType` The expansion type, which could be incoming, outgoing, both, or all connected
`protected java.util.List` `models` List of Models.
`protected java.util.List` `stoppingList` The Stopping List
`protected boolean` `useFilter` Use the IRelationshipFilter when true, don't use it when false

Constructor Summary
`ShowRelatedElementsRequest(java.util.List shapes, java.util.List relationshipTypesToShow, boolean isExpandIndefinite, int expandLevel, ExpansionType expansionType)` Constructor for ShowRelatedElementsRequest.
`ShowRelatedElementsRequest(java.util.List shapes, java.util.List relationshipTypesToShow, boolean isExpandIndefinite, int expandLevel, ExpansionType expansionType, boolean useFilter, java.util.List models, java.util.List stoppingList)` Constructor for ShowRelatedElementsRequest.

Method Summary
`int` `getExpandLevel()` Method getExpandLevel.
`ExpansionType` `getExpansionType()` Return the expansion type that was passed into the constructor.
`java.util.List` `getModels()` Return a List of IModel objects
`java.util.List` `getRelatedShapes()` Method getRelatedShapes.
`java.util.List` `getRelationshipsToShow()` Method getRelationshipsToShow.
`java.util.List` `getSelectedShapes()` Method getShapes.
`java.util.List` `getStoppingList()` Method getStoppingList
`boolean` `getUseFilter()` Returns if the filter should be used or not Use the IRelationshipFilter when true, don't use it when false
`boolean` `getUseIncoming()` Method getUseIncoming.
`boolean` `getUseOutgoing()` Method getUseOutgoing.
`boolean` `isExpandIndefinite()` Method isExpandIndefinite.
`void` `setRelatedShapes(java.util.List relatedShapes)` Method setRelatedShapes.

Methods inherited from class org.eclipse.gef.Request
`getExtendedData, getType, setExtendedData, setType`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### expansionType

    protected ExpansionType expansionType

  The expansion type, which could be incoming, outgoing, both, or all connected

### stoppingList

    protected java.util.List stoppingList

  The Stopping List

### models

    protected java.util.List models

  List of Models. Do not use IModels because it does not have a contains method.

### useFilter

    protected boolean useFilter

  Use the IRelationshipFilter when true, don't use it when false

Constructor Detail

### ShowRelatedElementsRequest

    public ShowRelatedElementsRequest(java.util.List shapes,
                                      java.util.List relationshipTypesToShow,
                                      boolean isExpandIndefinite,
                                      int expandLevel,
                                      ExpansionType expansionType,
                                      boolean useFilter,
                                      java.util.List models,
                                      java.util.List stoppingList)

  Constructor for ShowRelatedElementsRequest.

Parameters:
  `shapes` - List of IShapeView objects that were selected
  `relationshipTypesToShow` - List of relationship type hints to show.
  `isExpandIndefinite` - true to expand indefinitely, false not to.
  `expandLevel` - specify an int level here for the number of levels to expand if you set isExpandIndefinite to false.
  `expansionType` - the ExpansionType for deciding which direction to expand in.
  `useFilter` - use the IRelationshipFilter when true, don't use it when false
  `models` - List of IModel objects, if null, the default will be used.
  `stoppingList` - List of the stopping conditions for related elements if this is true

### ShowRelatedElementsRequest

    public ShowRelatedElementsRequest(java.util.List shapes,
                                      java.util.List relationshipTypesToShow,
                                      boolean isExpandIndefinite,
                                      int expandLevel,
                                      ExpansionType expansionType)

  Constructor for ShowRelatedElementsRequest. Filter is set to the default of true and the default list of models will be used.

Parameters:
  `shapes` - List of IShapeView objects that were selected
  `relationshipTypesToShow` - List of relationship type hints to show. Use CoreUMLTypeInfo.
  `isExpandIndefinite` - true to expand indefinitely, false not to.
  `expandLevel` - specify an int level here for the number of levels to expand if you set isExpandIndefinite to false.
  `expansionType` - should include incoming or outgoing relationships when searching for related elements if this is true

Method Detail

### getSelectedShapes

    public java.util.List getSelectedShapes()

  Method getShapes.

  Returns:
    List the list of `IAdaptable` shapes

### getRelatedShapes

    public java.util.List getRelatedShapes()

  Method getRelatedShapes.

  Returns:
    List the list of `IAdaptable` shapes

### setRelatedShapes

    public void setRelatedShapes(java.util.List relatedShapes)

  Method setRelatedShapes.

  Parameters:
    `relatedShapes` - List the list of `IAdaptable` shapes

### getRelationshipsToShow

    public java.util.List getRelationshipsToShow()

  Method getRelationshipsToShow.

  Returns:
    List

### isExpandIndefinite

    public boolean isExpandIndefinite()

  Method isExpandIndefinite.

  Returns:
    boolean

### getExpandLevel

    public int getExpandLevel()

  Method getExpandLevel.

  Returns:
    int

### getUseIncoming

    public boolean getUseIncoming()

  Method getUseIncoming. This will be deprecated when all SRE implementors implement the all connected option. Use getExpansionType() instead.

  Returns:
    boolean

### getUseOutgoing

    public boolean getUseOutgoing()

  Method getUseOutgoing. This will be deprecated when all SRE implementors implement the all connected option. Use getExpansionType() instead.

  Returns:
    boolean

### getExpansionType

    public ExpansionType getExpansionType()

  Return the expansion type that was passed into the constructor.

  Returns:
    ExpansionType

### getUseFilter

    public boolean getUseFilter()

  Returns if the filter should be used or not Use the IRelationshipFilter when true, don't use it when false

  Returns:
    true if the IRelationshipFilter should be used, false if it shouldn't

### getModels

    public java.util.List getModels()

  Return a List of IModel objects

  Returns:
    List of IModel objects

### getStoppingList

    public java.util.List getStoppingList()

  Method getStoppingList

  Returns:
    stoppingList

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.