Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.commands
Class HandlerSubmission

    java.lang.Object
      org.eclipse.ui.commands.HandlerSubmission

All Implemented Interfaces:
  Comparable

public final class HandlerSubmission
extends Object
implements Comparable

An instance of this class represents a request to handle a command. A handler submission specifies a list of conditions under which it would be appropriate for a particular command to have a particular handler. These conditions include things like the active part or the active shell. So, it is possible to say things like: "when my part is active, please consider calling these classes when you want to perform a cut, copy or paste".

The workbench considers all of the submissions it has received and choses the ones it views as the best possible match.

This class is not intended to be extended by clients.

Since:
  3.0
See Also:
  `IWorkbenchCommandSupport`

Constructor Summary
`HandlerSubmission(String activePartId, Shell activeShell, IWorkbenchPartSite activeWorkbenchPartSite, String commandId, IHandler handler, Priority priority)` Creates a new instance of this class.

Method Summary
`int` | `compareTo(Object object)`
`String` | `getActivePartId()` Returns the identifier of the part that must be active for this request to be considered.
`Shell` | `getActiveShell()` Returns the shell that must be active for this request to be considered.
`IWorkbenchPartSite` | `getActiveWorkbenchPartSite()` Returns the workbench part site of the part that must be active for this request to be considered.
`String` | `getCommandId()` Returns the identifier of the command to be handled.
`IHandler` | `getHandler()` Returns the handler.
`Priority` | `getPriority()` Returns the priority.
`int` | `hashCode()`
`String` | `toString()`

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

Constructor Detail

### HandlerSubmission

    public HandlerSubmission(String activePartId,
                             Shell activeShell,
                             IWorkbenchPartSite activeWorkbenchPartSite,
                             String commandId,
                             IHandler handler,
                             Priority priority)

  Creates a new instance of this class.

Parameters:
  `activePartId` - the identifier of the part that must be active for this request to be considered. May be `null`.
  `activeShell` - the shell that must be active for this request to be considered. May be `null`.
  `activeWorkbenchPartSite` - the workbench part site of the part that must be active for this request to be considered. May be `null`.
  `commandId` - the identifier of the command to be handled. Must not be `null`.
  `handler` - the handler. Must not be `null`.
  `priority` - the priority. Must not be `null`.

Method Detail

### compareTo

    public int compareTo(Object object)

  Specified by:
    `compareTo` in interface `Comparable`
  See Also:
    `Comparable.compareTo(java.lang.Object)`

### getActivePartId

    public String getActivePartId()

  Returns the identifier of the part that must be active for this request to be considered.

  Returns:
    the identifier of the part that must be active for this request to be considered. May be `null`.

### getActiveShell

    public Shell getActiveShell()

  Returns the shell that must be active for this request to be considered.

  Returns:
    the shell that must be active for this request to be considered. May be `null`.

### getActiveWorkbenchPartSite

    public IWorkbenchPartSite getActiveWorkbenchPartSite()

  Returns the workbench part site of the part that must be active for this request to be considered.

  Returns:
    the workbench part site of the part that must be active for this request to be considered. May be `null`.

### getCommandId

    public String getCommandId()

  Returns the identifier of the command to be handled.

  Returns:
    the identifier of the command to be handled. Guaranteed not to be `null`.

### getHandler

    public IHandler getHandler()

  Returns the handler.

  Returns:
    the handler. Guaranteed not to be `null`.

### getPriority

    public Priority getPriority()

  Returns the priority.

  Returns:
    the priority. Guaranteed not to be `null`.

### hashCode

    public int hashCode()

  See Also:
    `Object.hashCode()`

### toString

    public String toString()

  See Also:
    `Object.toString()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.