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.texteditor
Class BasicTextEditorActionContributor


java.lang.Object
  extended by 

org.eclipse.ui.part.EditorActionBarContributor
      extended by 
org.eclipse.ui.texteditor.BasicTextEditorActionContributor
All Implemented Interfaces:
IEditorActionBarContributor
Direct Known Subclasses:
TextEditorActionContributor

public class BasicTextEditorActionContributor
extends EditorActionBarContributor

Manages the installation and removal of global actions for the same type of editors.

If instantiated and used as-is, this contributor connects to all of the workbench defined global editor actions the corresponding actions of the current editor. It also adds addition actions for searching and navigation (go to line) as well as a set of status fields.

Subclasses may override the following methods:

  • contributeToMenu - extend to contribute to menu
  • contributeToToolBar - reimplement to contribute to tool bar
  • contributeToStatusLine - reimplement to contribute to status line
  • setActiveEditor - extend to react to editor changes

See Also:
ITextEditorActionConstants

Constructor Summary
BasicTextEditorActionContributor ()
          Creates an empty editor action bar contributor.
 
Method Summary
 void contributeToMenu ( IMenuManager menu)
          Contributes to the given menu.
 void contributeToStatusLine ( IStatusLineManager statusLineManager)
          Contributes to the given status line.
 void dispose ()
          The EditorActionBarContributor implementation of this IEditorActionBarContributor method does nothing, subclasses may override.
protected   IAction getAction ( ITextEditor editor, String actionId)
          Returns the action registered with the given text editor.
protected   IEditorPart getActiveEditorPart ()
          Returns the active editor part.
 void setActiveEditor ( IEditorPart part)
          The BasicTextEditorActionContributor implementation of this IEditorActionBarContributor method installs the global action handler for the given text editor by calling a private helper method.
 
Methods inherited from class org.eclipse.ui.part. EditorActionBarContributor
contributeToCoolBar, contributeToToolBar, getActionBars, getPage, init, init
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTextEditorActionContributor

public BasicTextEditorActionContributor()
Creates an empty editor action bar contributor. The action bars are furnished later via the init method.

See Also:
IEditorActionBarContributor.init(org.eclipse.ui.IActionBars, org.eclipse.ui.IWorkbenchPage)
Method Detail

getActiveEditorPart

protected final 
IEditorPart getActiveEditorPart()
Returns the active editor part.

Returns:
the active editor part

getAction

protected final 
IAction getAction(
ITextEditor editor,
                                  
String actionId)
Returns the action registered with the given text editor.

Parameters:
editor - the editor, or null
actionId - the action id
Returns:
the action, or null if none

setActiveEditor

public void setActiveEditor(
IEditorPart part)
The BasicTextEditorActionContributor implementation of this IEditorActionBarContributor method installs the global action handler for the given text editor by calling a private helper method.

Subclasses may extend.

Specified by:
setActiveEditor in interface IEditorActionBarContributor
Overrides:
setActiveEditor in class EditorActionBarContributor
Parameters:
part - the new target editor

contributeToMenu

public void contributeToMenu(
IMenuManager menu)
Description copied from class: EditorActionBarContributor
Contributes to the given menu.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement to add to the menu portion of this contribution.

Overrides:
contributeToMenu in class EditorActionBarContributor
Parameters:
menu - the manager that controls the menu

contributeToStatusLine

public void contributeToStatusLine(
IStatusLineManager statusLineManager)
Description copied from class: EditorActionBarContributor
Contributes to the given status line.

The EditorActionBarContributor implementation of this method does nothing. Subclasses may reimplement to add to the status line portion of this contribution.

Overrides:
contributeToStatusLine in class EditorActionBarContributor
Parameters:
statusLineManager - the manager of the status line

dispose

public void dispose()
Description copied from class: EditorActionBarContributor
The EditorActionBarContributor implementation of this IEditorActionBarContributor method does nothing, subclasses may override.

Specified by:
dispose in interface IEditorActionBarContributor
Overrides:
dispose in class EditorActionBarContributor

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