Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Overriding an action created in createdActions() from the AbstractTextEditor class.
Overriding an action created in createdActions() from the AbstractTextEditor class. [message #327109] Wed, 09 April 2008 20:02 Go to next message
Eclipse UserFriend
Hi,

Below is the action created by the AbstractTextEditor class. This
action is executed when 'F2' is pressed during the displaying of the
text hover tooltip window. My editor, which extends TextEditor, which
extends AbstractTextEditor, would like to override this action and
provide my own implementation. Tips? Thanks.

resAction= new
InformationDispatchAction(EditorMessages.getBundleForConstru ctedKeys(),
"Editor.ShowInformation.", (TextOperationAction) resAction); //$NON-NLS-1$

action.setHelpContextId(IAbstractTextEditorHelpContextIds.SH OW_INFORMATION_ACTION);

resAction.setActionDefinitionId(ITextEditorActionDefinitionI ds.SHOW_INFORMATION);
setAction(ITextEditorActionConstants.SHOW_INFORMATION, resAction);
Re: Overriding an action created in createdActions() from the AbstractTextEditor class. [message #327110 is a reply to message #327109] Wed, 09 April 2008 20:17 Go to previous message
Eclipse UserFriend
AL wrote:
> Hi,
>
> Below is the action created by the AbstractTextEditor class. This
> action is executed when 'F2' is pressed during the displaying of the
> text hover tooltip window. My editor, which extends TextEditor, which
> extends AbstractTextEditor, would like to override this action and
> provide my own implementation. Tips? Thanks.
>
> resAction= new
> InformationDispatchAction(EditorMessages.getBundleForConstru ctedKeys(),
> "Editor.ShowInformation.", (TextOperationAction) resAction); //$NON-NLS-1$
>
> action.setHelpContextId(IAbstractTextEditorHelpContextIds.SH OW_INFORMATION_ACTION);
>
>
> resAction.setActionDefinitionId(ITextEditorActionDefinitionI ds.SHOW_INFORMATION);
>
> setAction(ITextEditorActionConstants.SHOW_INFORMATION, resAction);

LOL...I guess my editor could override the createActions(...) method and
use the above exact code, except implementing my own
InformationDispatchAction(..) class.
Previous Topic:Any thoughts to having Condtion Objects.
Next Topic:Re: java.lang.UnsatisfiedLinkError: no localfile_1_0_0 in java.library.path
Goto Forum:
  


Current Time: Fri Mar 14 10:05:35 EDT 2025

Powered by FUDForum. Page generated in 0.02748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top