Eclipse Platform
Release 3.1

org.eclipse.ui
Interface ISources


public interface ISources

A source is type of event change that can occur within the workbench. For example, the active workbench window can change, so it is considered a source. Workbench services can track changes to these sources, and thereby try to resolve conflicts between a variety of possible options. This is most commonly used for things like handlers and contexts.

This interface defines the source that are known to the workbench at compile-time. These sources can be combined in a bit-wise fashion. So, for example, a ACTIVE_PART | ACTIVE_CONTEXT source includes change to both the active context and the active part.

The values assigned to each source indicates its relative priority. The higher the value, the more priority the source is given in resolving conflicts. Another way to look at this is that the higher the value, the more "local" the source is to what the user is currently doing. This is similar to, but distinct from the concept of components. The nesting support provided by components represent only one source (ACTIVE_SITE) that the workbench understands.

Note that for backward compatibility, we must reserve the lowest three bits for Priority instances using the old HandlerSubmission mechanism. This mechanism was used in Eclipse 3.0.

There are unused bits. This is intentional, and is intended to allow clients space to define their own priorities. The workbench will not add further priorities in the future without declaring it as a breaking change. If you want to define your own sources, then you must create a ISourceProvider and register it with a workbench service.

This interface is not intended to be implemented or extended by clients.

Since:
3.1
See Also:
ISourceProvider

Field Summary
static int ACTIVE_CONTEXT
          The priority given when the source includes a particular context.
static int ACTIVE_CURRENT_SELECTION
          The priority given when the source includes the current selection.
static int ACTIVE_EDITOR
          The priority given when the source includes the active editor.
static int ACTIVE_PART
          The priority given when the source includes the active part.
static String ACTIVE_PART_NAME
          The variable name for the active part.
static int ACTIVE_SHELL
          The priority given when the source includes the currently active shell.
static String ACTIVE_SHELL_NAME
          The variable name for the active shell.
static int ACTIVE_SITE
          The priority given when the source includes the active workbench site.
static String ACTIVE_SITE_NAME
          The variable name for the active workbench site.
static int ACTIVE_WORKBENCH_WINDOW
          The priority given when the source includes the currently active workbench window.
static String ACTIVE_WORKBENCH_WINDOW_NAME
          The variable name for the active workbench window.
static int LEGACY_LEGACY
          The priority given when the activation is defined by a handler submission with a legacy priority.
static int LEGACY_LOW
          The priority given when the activation is defined by a handler submission with a low priority.
static int LEGACY_MEDIUM
          The priority given when the activation is defined by a handler submission with a medium priority.
static int WORKBENCH
          The priority given to default handlers and handlers that active across the entire workbench.
 

Field Detail

WORKBENCH

public static final int WORKBENCH
The priority given to default handlers and handlers that active across the entire workbench.

See Also:
Constant Field Values

LEGACY_LEGACY

public static final int LEGACY_LEGACY
The priority given when the activation is defined by a handler submission with a legacy priority.

See Also:
Constant Field Values

LEGACY_LOW

public static final int LEGACY_LOW
The priority given when the activation is defined by a handler submission with a low priority.

See Also:
Constant Field Values

LEGACY_MEDIUM

public static final int LEGACY_MEDIUM
The priority given when the activation is defined by a handler submission with a medium priority.

See Also:
Constant Field Values

ACTIVE_CONTEXT

public static final int ACTIVE_CONTEXT
The priority given when the source includes a particular context.

See Also:
Constant Field Values

ACTIVE_SHELL

public static final int ACTIVE_SHELL
The priority given when the source includes the currently active shell.

See Also:
Constant Field Values

ACTIVE_SHELL_NAME

public static final String ACTIVE_SHELL_NAME
The variable name for the active shell. This is for use with the ISourceProvider and IEvaluationContext.

See Also:
Constant Field Values

ACTIVE_WORKBENCH_WINDOW

public static final int ACTIVE_WORKBENCH_WINDOW
The priority given when the source includes the currently active workbench window.

See Also:
Constant Field Values

ACTIVE_WORKBENCH_WINDOW_NAME

public static final String ACTIVE_WORKBENCH_WINDOW_NAME
The variable name for the active workbench window. This is for use with the ISourceProvider and IEvaluationContext.

See Also:
Constant Field Values

ACTIVE_EDITOR

public static final int ACTIVE_EDITOR
The priority given when the source includes the active editor.

See Also:
Constant Field Values

ACTIVE_PART

public static final int ACTIVE_PART
The priority given when the source includes the active part.

See Also:
Constant Field Values

ACTIVE_PART_NAME

public static final String ACTIVE_PART_NAME
The variable name for the active part. This is for use with the ISourceProvider and IEvaluationContext.

See Also:
Constant Field Values

ACTIVE_SITE

public static final int ACTIVE_SITE
The priority given when the source includes the active workbench site. In the case of nesting components, one should be careful to only activate the most nested component.

See Also:
Constant Field Values

ACTIVE_SITE_NAME

public static final String ACTIVE_SITE_NAME
The variable name for the active workbench site. This is for use with the ISourceProvider and IEvaluationContext.

See Also:
Constant Field Values

ACTIVE_CURRENT_SELECTION

public static final int ACTIVE_CURRENT_SELECTION
The priority given when the source includes the current selection.

See Also:
Constant Field Values

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

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