Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » EditorContributor: only Constructor is called
EditorContributor: only Constructor is called [message #463086] Tue, 06 February 2007 12:20 Go to next message
Eclipse UserFriend
Originally posted by: febro.gmx.net

Hi,

I have a rcp-application with a MultipageEditor. For this editor, created a contributor (extends BasicTextEditorActionContributor). When I open the editor, the constructor is called. But no other method like "init(IActionBars bars, IWorkbenchPage page)", "init(IActionBars bars)" or "doSetActiveEditor(IEditorPart part)"

any hints?

if you need some more code, please tell - I don't know what parts you may need ;)

bye
Felix
Re: EditorContributor: only Constructor is called [message #463140 is a reply to message #463086] Tue, 06 February 2007 22:56 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
The "init(IActionBars bars)" or "doSetActiveEditor(IEditorPart part)"
methods won't be called except if you call them.

The action contribution works in the following way:

-when the editor is opened the first time, the object is created and
the init(IActionBars bars, IWorkbenchPage page)method is called.
- when the editor is activated, the setActiveEditor(IEditorPart editor)
method is called.

If init(IActionBars bars, IWorkbenchPage page) method hasn't been called
(your case), you probably have an error either in the editor extension
definition in the plugin.xml file or in the signature of the method.
Try to check if the method has been called in a superclass
(BasicTextEditorActionContributor).

Anyway, I recommend you to start with
MultiPageEditorActionBarContributor. You can use
XMLMultiPageEditorActionBarContributor and XMLMultiPageEditorPart from
the wtp project as an example.

Snjeza



FelixB wrote:
> Hi,
>
> I have a rcp-application with a MultipageEditor. For this editor, created a contributor (extends BasicTextEditorActionContributor). When I open the editor, the constructor is called. But no other method like "init(IActionBars bars, IWorkbenchPage page)", "init(IActionBars bars)" or "doSetActiveEditor(IEditorPart part)"
>
> any hints?
>
> if you need some more code, please tell - I don't know what parts you may need ;)
>
> bye
> Felix
Previous Topic:Headless Build Problem
Next Topic:Working with Eclipse's WorkBench Adapter Mechanism
Goto Forum:
  


Current Time: Tue Sep 17 06:37:49 GMT 2024

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

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

Back to the top