Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.contexts
Interface IWorkbenchContextSupport


Deprecated. Please use IBindingService and IContextService instead.

public interface IWorkbenchContextSupport

An instance of this interface provides support for managing contexts at the IWorkbench level. This provides the functionality necessary to enabled contexts, disable or enabled the key binding service, as well as register shells as particular types of windows.

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

Since:
3.0
See Also:
IContextService, IBindingService
Restriction:
This interface is not intended to be implemented by clients.

Field Summary
static  String CONTEXT_ID_DIALOG
          Deprecated. The identifier for the context that is active when a shell registered as a dialog.
static  String CONTEXT_ID_DIALOG_AND_WINDOW
          Deprecated. The identifier for the context that is active when a shell is registered as either a window or a dialog.
static  String CONTEXT_ID_WINDOW
          Deprecated. The identifier for the context that is active when a shell is registered as a window.
static int TYPE_DIALOG
          Deprecated. The type used for registration indicating that the shell should be treated as a dialog.
static int TYPE_NONE
          Deprecated. The type used for registration indicating that the shell should not receive any key bindings be default.
static int TYPE_WINDOW
          Deprecated. The type used for registration indicating that the shell should be treated as a window.
 
Method Summary
 void addEnabledSubmission ( EnabledSubmission enabledSubmission)
          Deprecated.  Add a single enabled submission for consideration.
 void addEnabledSubmissions ( Collection enabledSubmissions)
          Deprecated.  Adds zero or more enabled submissions for consideration.
  IContextManager getContextManager ()
          Deprecated. Returns the context manager for the workbench.
 int getShellType ( Shell shell)
          Deprecated. Returns the shell type for the given shell.
 boolean isKeyFilterEnabled ()
          Deprecated. Tests whether the global key binding architecture is currently active.
 void openKeyAssistDialog ()
          Deprecated. Opens the key assistant dialog positioned near the key binding entry in the status bar.
 boolean registerShell ( Shell shell, int type)
          Deprecated.  Registers a shell to automatically promote or demote some basic types of contexts.
 void removeEnabledSubmission ( EnabledSubmission enabledSubmission)
          Deprecated.  Removes a single enabled submission from consideration.
 void removeEnabledSubmissions ( Collection enabledSubmissions)
          Deprecated.  Removes a collection of enabled submissions from consideration.
 void setKeyFilterEnabled (boolean enabled)
          Deprecated. Enables or disables the global key binding architecture.
 boolean unregisterShell ( Shell shell)
          Deprecated.  Unregisters a shell that was previously registered.
 

Field Detail

CONTEXT_ID_DIALOG

static final 
String CONTEXT_ID_DIALOG
Deprecated. 
The identifier for the context that is active when a shell registered as a dialog.

See Also:
Constant Field Values

CONTEXT_ID_DIALOG_AND_WINDOW

static final 
String CONTEXT_ID_DIALOG_AND_WINDOW
Deprecated. 
The identifier for the context that is active when a shell is registered as either a window or a dialog.

See Also:
Constant Field Values

CONTEXT_ID_WINDOW

static final 
String CONTEXT_ID_WINDOW
Deprecated. 
The identifier for the context that is active when a shell is registered as a window.

See Also:
Constant Field Values

TYPE_DIALOG

static final int TYPE_DIALOG
Deprecated. 
The type used for registration indicating that the shell should be treated as a dialog. When the given shell is active, the "In Dialogs" context should also be active.

See Also:
Constant Field Values

TYPE_NONE

static final int TYPE_NONE
Deprecated. 
The type used for registration indicating that the shell should not receive any key bindings be default. When the given shell is active, we should not provide any EnabledSubmission instances for the "In Dialogs" or "In Windows" contexts.

See Also:
Constant Field Values

TYPE_WINDOW

static final int TYPE_WINDOW
Deprecated. 
The type used for registration indicating that the shell should be treated as a window. When the given shell is active, the "In Windows" context should also be active.

See Also:
Constant Field Values
Method Detail

addEnabledSubmission

void addEnabledSubmission(
EnabledSubmission enabledSubmission)
Deprecated. 

Add a single enabled submission for consideration. An enabled submission is a description of certain criteria under which a particular context should become active. All added submissions will be check when the conditions in the workbench change, and zero or more contexts will be selected as active.

Just because an enabled submission is added, it does not mean that the corresponding context will become active. The workbench will consider the request, but other factors (such as conflicts) may prevent the context from becoming active.

Parameters:
enabledSubmission - The enabled submission to be considered; must not be null.

addEnabledSubmissions

void addEnabledSubmissions(
Collection enabledSubmissions)
Deprecated. 

Adds zero or more enabled submissions for consideration. An enabled submission is a description of certain criteria under which a particular context should become active. All added submissions will be check when the conditions in the workbench change, and zero or more contexts will be selected as active.

Just because an enabled submission is added, it does not mean that the corresponding context will become active. The workbench will consider the request, but other factors (such as conflicts) may prevent the context from becoming active.

Parameters:
enabledSubmissions - The enabled submissions to be considered; must not be null, but may be empty. Every element in the collection must be an instance of EnabledSubmission.

getContextManager


IContextManager getContextManager()
Deprecated. 
Returns the context manager for the workbench.

Returns:
the context manager for the workbench. Guaranteed not to be null.

getShellType

int getShellType(
Shell shell)
Deprecated. 
Returns the shell type for the given shell.

Parameters:
shell - The shell for which the type should be determined. If this value is null, then IWorkbenchContextSupport.TYPE_NONE is returned.
Returns:
IWorkbenchContextSupport.TYPE_WINDOW, IWorkbenchContextSupport.TYPE_DIALOG, or IWorkbenchContextSupport.TYPE_NONE.
Since:
3.1

isKeyFilterEnabled

boolean isKeyFilterEnabled()
Deprecated. 
Tests whether the global key binding architecture is currently active.

Returns:
true if the key bindings are active; false otherwise.

openKeyAssistDialog

void openKeyAssistDialog()
Deprecated. 
Opens the key assistant dialog positioned near the key binding entry in the status bar.

Since:
3.1

registerShell

boolean registerShell(
Shell shell,
                      int type)
Deprecated. 

Registers a shell to automatically promote or demote some basic types of contexts. The "In Dialogs" and "In Windows" contexts are provided by the system. This a convenience method to ensure that these contexts are promoted when the given is shell is active.

If a shell is registered as a window, then the "In Windows" context is enabled when that shell is active. If a shell is registered as a dialog -- or is not registered, but has a parent shell -- then the "In Dialogs" context is enabled when that shell is active. If the shell is registered as none -- or is not registered, but has no parent shell -- then the neither of the contexts will be enabled (by us -- someone else can always enabled them).

If the provided shell has already been registered, then this method will change the registration.

Parameters:
shell - The shell to register for key bindings; must not be null.
type - The type of shell being registered. This value must be one of the constants given in this interface.
Returns:
true if the shell had already been registered (i.e., the registration has changed); false otherwise.

removeEnabledSubmission

void removeEnabledSubmission(
EnabledSubmission enabledSubmission)
Deprecated. 

Removes a single enabled submission from consideration. Only the same enabled submission will be removed; equivalent submissions will not be removed. Removing an enabled submission does not necessarily mean that the corresponding context will become inactive. It is possible that other parts of the application have requested that the context be enabled.

There is no way to disable a context. It is only possible to not enable it.

Parameters:
enabledSubmission - The enabled submission to be removed; must not be null.

removeEnabledSubmissions

void removeEnabledSubmissions(
Collection enabledSubmissions)
Deprecated. 

Removes a collection of enabled submissions from consideration. Only the same enabled submissions will be removed; equivalent submissions will not be removed. Removing an enabled submission does not necessarily mean that the corresponding context will become inactive. It is possible that other parts of the application have requested that the context be enabled.

There is no way to disable a context. It is only possible to not enable it.

Parameters:
enabledSubmissions - The enabled submissions to be removed; must not be null, but may be empty. The collection must only contain instances of EnabledSubmission.

setKeyFilterEnabled

void setKeyFilterEnabled(boolean enabled)
Deprecated. 
Enables or disables the global key binding architecture. The architecture should be enabled by default. When enabled, keyboard shortcuts are active, and that key events can trigger commands. This also means that widgets may not see all key events (as they might be trapped as a keyboard shortcut). When disabled, no key events will trapped as keyboard shortcuts, and that no commands can be triggered by keyboard events. (Exception: it is possible that someone listening for key events on a widget could trigger a command.)

Parameters:
enabled - Whether the key filter should be enabled.

unregisterShell

boolean unregisterShell(
Shell shell)
Deprecated. 

Unregisters a shell that was previously registered. After this method completes, the shell will be treated as if it had never been registered at all. If you have registered a shell, you should ensure that this method is called when the shell is disposed. Otherwise, a potential memory leak will exist.

If the shell was never registered, or if the shell is null, then this method returns false and does nothing.

Parameters:
shell - The shell to be unregistered; does nothing if this value is null.
Returns:
true if the shell had been registered; false otherwise.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire