## org.eclipse.datatools.connectivity.ui.actions
Class ConnectAction

    java.lang.Object
      org.eclipse.datatools.connectivity.ui.actions.ConnectAction

All Implemented Interfaces:
  org.eclipse.jface.viewers.ISelectionProvider, org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate

    public class ConnectAction

extends java.lang.Object
implements org.eclipse.ui.IObjectActionDelegate, org.eclipse.jface.viewers.ISelectionProvider

Author:
  shongxum, brianf

Constructor Summary
`ConnectAction()`
`ConnectAction(org.eclipse.swt.widgets.Shell shell)`

Method Summary
`void` `addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)`
`static org.eclipse.core.runtime.jobs.Job` `connect(IConnectionProfile profile, org.eclipse.jface.viewers.ITreeContentProvider contentProvider)` Deprecated. use IConnectionProfile.connect(). The caller is now responsible for updating their view themselves. Note, if you are using a servers viewer, you should not need to update the view as the view listens for connect events and updates itself.
`static void` `connectAndRefresh(IConnectionProfile profile, org.eclipse.jface.viewers.TreeViewer viewer)` Deprecated. use IConnectionProfile.connect(). The caller is now responsible for updating their view themselves. Note, if you are using a servers viewer, you should not need to update the view as the view listens for connect events and updates itself.
`org.eclipse.jface.viewers.ISelection` `getSelection()`
`void` `removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)`
`void` `run(org.eclipse.jface.action.IAction action)`
`void` `selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)`
`void` `setActivePart(org.eclipse.jface.action.IAction action, org.eclipse.ui.IWorkbenchPart targetPart)`
`void` `setSelection(org.eclipse.jface.viewers.ISelection selection)`

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

Constructor Detail

### ConnectAction

    public ConnectAction()

### ConnectAction

    public ConnectAction(org.eclipse.swt.widgets.Shell shell)

Method Detail

### connectAndRefresh

    public static void connectAndRefresh(IConnectionProfile profile,
                                         org.eclipse.jface.viewers.TreeViewer viewer)

  Deprecated. use IConnectionProfile.connect(). The caller is now responsible for updating their view themselves. Note, if you are using a servers viewer, you should not need to update the view as the view listens for connect events and updates itself.

  This method blocks until the connection has been created.

  Parameters:
    `profile` -
    `viewer` -

### connect

    public static org.eclipse.core.runtime.jobs.Job connect(IConnectionProfile profile,
                                                            org.eclipse.jface.viewers.ITreeContentProvider contentProvider)

  Deprecated. use IConnectionProfile.connect(). The caller is now responsible for updating their view themselves. Note, if you are using a servers viewer, you should not need to update the view as the view listens for connect events and updates itself.

  Parameters:
    `profile` -
    `contentProvider` -
  Returns:

### setActivePart

    public void setActivePart(org.eclipse.jface.action.IAction action,
                              org.eclipse.ui.IWorkbenchPart targetPart)

  Specified by:
    `setActivePart` in interface `org.eclipse.ui.IObjectActionDelegate`

### run

    public void run(org.eclipse.jface.action.IAction action)

  Specified by:
    `run` in interface `org.eclipse.ui.IActionDelegate`

### selectionChanged

    public void selectionChanged(org.eclipse.jface.action.IAction action,
                                 org.eclipse.jface.viewers.ISelection selection)

  Specified by:
    `selectionChanged` in interface `org.eclipse.ui.IActionDelegate`

### getSelection

    public org.eclipse.jface.viewers.ISelection getSelection()

  Specified by:
    `getSelection` in interface `org.eclipse.jface.viewers.ISelectionProvider`

### removeSelectionChangedListener

    public void removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)

  Specified by:
    `removeSelectionChangedListener` in interface `org.eclipse.jface.viewers.ISelectionProvider`

### addSelectionChangedListener

    public void addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)

  Specified by:
    `addSelectionChangedListener` in interface `org.eclipse.jface.viewers.ISelectionProvider`

### setSelection

    public void setSelection(org.eclipse.jface.viewers.ISelection selection)

  Specified by:
    `setSelection` in interface `org.eclipse.jface.viewers.ISelectionProvider`