Overriding an action created in createdActions() from the AbstractTextEditor class. [message #327109] |
Wed, 09 April 2008 20:02  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02748 seconds