Runtime

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

    java.lang.Object
      org.eclipse.gef.Request
          org.eclipse.gef.requests.CreateRequest
              org.eclipse.gef.requests.CreateConnectionRequest
                  org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest

All Implemented Interfaces:
  DropRequest, TargetRequest

public class CreateUnspecifiedTypeConnectionRequest
extends CreateConnectionRequest

This request encapsulates a list of `CreateConnectionViewAndElementRequest` for each relationship type that this tool supports. Each method in `CreateConnectionRequest` that is called to configure the request in `ConnectionCreationTool` is propagated to each individual request.

Constructor Summary
`CreateUnspecifiedTypeConnectionRequest(java.util.List relationshipTypes, boolean useModelingAssistantService, PreferencesHint preferencesHint)` Creates a new `CreateUnspecifiedTypeConnectionRequest`.

Method Summary
`void` `addRequest(IElementType relationshipType, Request request)`
`java.util.List` `getAllRequests()` Returns a list of all the requests.
`java.util.List` `getElementTypes()` Returns the list of element types.
`protected PreferencesHint` `getPreferencesHint()` Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values.
`CreateRequest` `getRequestForType(IElementType relationshipType)` Returns the `CreateRequest` for the relationship type passed in.
`boolean` `isDirectionReversed()` Returns true if this request is to create a connection from target to source.
`void` `setDirectionReversed(boolean directionReversed)` Sets the directionReversed flag.
`void` `setLocation(Point location)`
`void` `setSourceEditPart(EditPart part)`
`void` `setTargetEditPart(EditPart part)`
`void` `setType(java.lang.Object type)`
`boolean` `useModelingAssistantService()` Should the Modeling Assistant Service be used?

Methods inherited from class org.eclipse.gef.requests.CreateConnectionRequest
`getSourceEditPart, getStartCommand, getTargetEditPart, setStartCommand`

Methods inherited from class org.eclipse.gef.requests.CreateRequest
`getFactory, getLocation, getNewObject, getNewObjectType, getSize, setFactory, setSize`

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

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

Constructor Detail

### CreateUnspecifiedTypeConnectionRequest

    public CreateUnspecifiedTypeConnectionRequest(java.util.List relationshipTypes,
                                                  boolean useModelingAssistantService,
                                                  PreferencesHint preferencesHint)

  Creates a new `CreateUnspecifiedTypeConnectionRequest`.

Parameters:
  `relationshipTypes` - List of relationship types of which one will be created (of type `IElementType`).
  `useModelingAssistantService` - True if the Modeling Assistant Service should be used to find the types when the other end of the connection is known.
  `preferencesHint` - The preference hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. The preference hint is mapped to a preference store in the preference registry <@link DiagramPreferencesRegistry>.

Method Detail

### getRequestForType

    public CreateRequest getRequestForType(IElementType relationshipType)

  Returns the `CreateRequest` for the relationship type passed in.

  Parameters:
    `relationshipType` -
  Returns:
    the `CreateRequest`

### addRequest

    public void addRequest(IElementType relationshipType,
                           Request request)

### getAllRequests

    public java.util.List getAllRequests()

  Returns a list of all the requests.

  Returns:
    the requests

### getElementTypes

    public java.util.List getElementTypes()

  Returns the list of element types.

  Returns:
    Returns the list of element types.

### setSourceEditPart

    public void setSourceEditPart(EditPart part)

  See Also:
    `CreateConnectionRequest.setSourceEditPart(org.eclipse.gef.EditPart)`

### setTargetEditPart

    public void setTargetEditPart(EditPart part)

  See Also:
    `TargetRequest.setTargetEditPart(org.eclipse.gef.EditPart)`

### setLocation

    public void setLocation(Point location)

  See Also:
    `CreateRequest.setLocation(org.eclipse.draw2d.geometry.Point)`

### setType

    public void setType(java.lang.Object type)

  See Also:
    `Request.setType(java.lang.Object)`

### isDirectionReversed

    public boolean isDirectionReversed()

  Returns true if this request is to create a connection from target to source.

  Returns:
    Returns the directionReversed.

### setDirectionReversed

    public void setDirectionReversed(boolean directionReversed)

  Sets the directionReversed flag.

  Parameters:
    `directionReversed` - The directionReversed to set.

### useModelingAssistantService

    public boolean useModelingAssistantService()

  Should the Modeling Assistant Service be used?

  Returns:
    Returns true if the Modeling Assistant Service should be used to find the types when the other end of the connection is known.

### getPreferencesHint

    protected PreferencesHint getPreferencesHint()

  Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. The preference hint is mapped to a preference store in the preference registry <@link DiagramPreferencesRegistry>.

  Returns:
    the preferences hint

Runtime

Guidelines for using Eclipse APIs.

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