Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Thu, 10 April 2008 00:02 Go to next message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
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] Thu, 10 April 2008 00:17 Go to previous message
Alex Le is currently offline Alex LeFriend
Messages: 649
Registered: July 2009
Senior Member
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: Mon Jul 22 02:22:35 GMT 2024

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

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

Back to the top