Runtime

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

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

All Implemented Interfaces:
  DropRequest, org.eclipse.gmf.runtime.diagram.ui.internal.requests.SuppressibleUIRequest, TargetRequest

public class CreateConnectionViewAndElementRequest
extends CreateConnectionViewRequest
implements org.eclipse.gmf.runtime.diagram.ui.internal.requests.SuppressibleUIRequest

Nested Class Summary
`static class` `CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor` An extended view descriptor that takes an `ElementDescriptor` instead of `IAdaptable` as the element adapter

Nested classes inherited from class org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest
`CreateConnectionViewRequest.ConnectionViewDescriptor`

Constructor Summary
`CreateConnectionViewAndElementRequest(CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor connectionViewAndElementDescriptor)` Constructor.
`CreateConnectionViewAndElementRequest(IElementType type, PreferencesHint preferencesHint)` Constructor.
`CreateConnectionViewAndElementRequest(IElementType type, java.lang.String semanticHint, PreferencesHint preferencesHint)` Constructor.

Method Summary
`CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor` `getConnectionViewAndElementDescriptor()` Gets the descriptor for the connection view and element that is to be created.
`static Command` `getCreateCommand(CreateConnectionViewAndElementRequest request, EditPart sourceEditPart, EditPart targetEditPart)` Method getCreateCommand.
`static Command` `getCreateCommand(IElementType elementType, EditPart sourceEditPart, EditPart targetEditPart, PreferencesHint preferencesHint)` Method getCreateCommand.
`boolean` `isUISupressed()`
`void` `setExtendedData(java.util.Map map)` Propagates setting the parameters to the `CreateElementRequest` in my `#getViewAndElementDescriptor()`.
`void` `setSuppressibleUI(boolean suppressUI)`

Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest
`getConnectionViewDescriptor, getCreateCommand, getCreateCommand, getCreateCommand, getCreateCommand, getFactory, getNewObject, getNewObjectType, setFactory`

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

Methods inherited from class org.eclipse.gef.requests.CreateRequest
`getLocation, getSize, setLocation, setSize`

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

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

Constructor Detail

### CreateConnectionViewAndElementRequest

    public CreateConnectionViewAndElementRequest(CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor connectionViewAndElementDescriptor)

  Constructor.

Parameters:
  `connectionViewAndElementDescriptor` -

### CreateConnectionViewAndElementRequest

    public CreateConnectionViewAndElementRequest(IElementType type,
                                                 java.lang.String semanticHint,
                                                 PreferencesHint preferencesHint)

  Constructor.

Parameters:
  `type` -
  `semanticHint` -
  `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>.

### CreateConnectionViewAndElementRequest

    public CreateConnectionViewAndElementRequest(IElementType type,
                                                 PreferencesHint preferencesHint)

  Constructor.

Parameters:
  `type` -
  `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

### isUISupressed

    public boolean isUISupressed()

  Specified by:
    `isUISupressed` in interface `org.eclipse.gmf.runtime.diagram.ui.internal.requests.SuppressibleUIRequest`
  Returns:
    true if the command will suppress all ui prompting and just use default data

### setSuppressibleUI

    public void setSuppressibleUI(boolean suppressUI)

  Specified by:
    `setSuppressibleUI` in interface `org.eclipse.gmf.runtime.diagram.ui.internal.requests.SuppressibleUIRequest`
  Parameters:
    `suppressUI` - true if you do not wish the command to prompt with UI but instead take the default value that it would have prompt for.

### getConnectionViewAndElementDescriptor

    public CreateConnectionViewAndElementRequest.ConnectionViewAndElementDescriptor getConnectionViewAndElementDescriptor()

  Gets the descriptor for the connection view and element that is to be created.

  Returns:
    the descriptor

### getCreateCommand

    public static Command getCreateCommand(CreateConnectionViewAndElementRequest request,
                                           EditPart sourceEditPart,
                                           EditPart targetEditPart)

  Method getCreateCommand. TODO: remove after msl migration

  Parameters:
    `request` -
    `sourceEditPart` -
    `targetEditPart` -
  Returns:
    Command

### getCreateCommand

    public static Command getCreateCommand(IElementType elementType,
                                           EditPart sourceEditPart,
                                           EditPart targetEditPart,
                                           PreferencesHint preferencesHint)

  Method getCreateCommand.

  Parameters:
    `elementType` -
    `sourceEditPart` -
    `targetEditPart` -
  Returns:
    Command

### setExtendedData

    public void setExtendedData(java.util.Map map)

  Propagates setting the parameters to the `CreateElementRequest` in my `#getViewAndElementDescriptor()`.

Runtime

Guidelines for using Eclipse APIs.

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