Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » StatusLine of TextEditor in a MultiPageEditor
StatusLine of TextEditor in a MultiPageEditor [message #251545] Thu, 10 June 2004 13:47 Go to next message
Eclipse UserFriend
Originally posted by: benson.cheng.viacore.net

I have a MultiPageEditor which has two pages, one is a subclass of the
TextEditor and the other one is a TreeViewer. What I want is when its
in the TextEditor page, I want the status line to show
|Writable|Insert|Line:Col| like the other text editor, how can I
accomplish this?

Thanks,
Benson.
Re: StatusLine of TextEditor in a MultiPageEditor [message #256810 is a reply to message #251545] Tue, 29 June 2004 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benson.cheng.viacore.net

Benson Cheng wrote:
> I have a MultiPageEditor which has two pages, one is a subclass of the
> TextEditor and the other one is a TreeViewer. What I want is when its
> in the TextEditor page, I want the status line to show
> |Writable|Insert|Line:Col| like the other text editor, how can I
> accomplish this?
>
> Thanks,
> Benson.
>
This is how I got it working.

public class MyEditorContributor extends
MultiPageEditorActionBarContributor {
// Step 1 - add a member
private TextEditorActionContributor textEditorContributor = null;

............

// Step 2 - override this method
public void contributeToStatusLine(IStatusLineManager
statusLineManager) {
super.contributeToStatusLine(statusLineManager);
textEditorContributor = new TextEditorActionContributor();
textEditorContributor.contributeToStatusLine(statusLineManag er);
}

...........

// Step 3 - set the EditorPart to the TextEditorActionContributor
public void setActivePage(IEditorPart part) {
............
if (part instanceof ITextEditor) {
............
textEditorContributor.setActiveEditor(part);
}
....................
}
...................
}

Thanks,
Benson.
Re: StatusLine of TextEditor in a MultiPageEditor [message #277380 is a reply to message #251545] Thu, 09 December 2004 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: debianuser.debianuser.de

Benson Cheng schrieb:
> I have a MultiPageEditor which has two pages, one is a subclass of the
> TextEditor and the other one is a TreeViewer. What I want is when its
> in the TextEditor page, I want the status line to show
> |Writable|Insert|Line:Col| like the other text editor, how can I
> accomplish this?
>
> Thanks,
> Benson.
>
Hi,
I am having exactly the same problem. any ideas???


thanks
Re: StatusLine of TextEditor in a MultiPageEditor [message #277387 is a reply to message #277380] Thu, 09 December 2004 19:24 Go to previous messageGo to next message
Eclipse UserFriend
On Thu, 09 Dec 2004 22:32:03 +0100, debianuser <debianuser@debianuser.de>
wrote:

> Benson Cheng schrieb:
>> I have a MultiPageEditor which has two pages, one is a subclass of the
>> TextEditor and the other one is a TreeViewer. What I want is when its
>> in the TextEditor page, I want the status line to show
>> |Writable|Insert|Line:Col| like the other text editor, how can I
>> accomplish this?
>> Thanks,
>> Benson.
>>
> Hi,
> I am having exactly the same problem. any ideas???
>
>
> thanks

Take a look here
http://cvs.sourceforge.net/viewcvs.py/orbeon/studio/src/plug ins/orbeon.oxfstudio.eclipse/src/orbeon/oxfstudio/eclipse/xm l/editor/

.. In particular look at MultiPageXML*.java. You might also want to look
at

Btw contributor is associated with the editor in plugin.xml. e.g.

<editor
name="Orbeon Log Event Editor"
icon="orbeon/oxfstudio/ui/log.gif"
class=" orbeon.oxfstudio.eclipse.monitor.log4j.editors.LogEventEdito r "
id=" orbeon.oxfstudio.eclipse.monitor.log4j.editors.LogEventEdito r "
contributorClass='orbeon.oxfstudio.eclipse.xml.editor.MultiP ageXMLEditorContributor'
>

( LogEventEditor isa MultipageXMLEditor... )

-- Regards, d
Re: StatusLine of TextEditor in a MultiPageEditor [message #277398 is a reply to message #277387] Fri, 10 December 2004 03:31 Go to previous message
Eclipse UserFriend
Originally posted by: debianuser.debianuser.de

thnaks a lot, that did it !
foo@bar.com schrieb:
> On Thu, 09 Dec 2004 22:32:03 +0100, debianuser
> <debianuser@debianuser.de> wrote:
>
>> Benson Cheng schrieb:
>>
>>> I have a MultiPageEditor which has two pages, one is a subclass of
>>> the TextEditor and the other one is a TreeViewer. What I want is
>>> when its in the TextEditor page, I want the status line to show
>>> |Writable|Insert|Line:Col| like the other text editor, how can I
>>> accomplish this?
>>> Thanks,
>>> Benson.
>>>
>> Hi,
>> I am having exactly the same problem. any ideas???
>>
>>
>> thanks
>
>
> Take a look here
> http://cvs.sourceforge.net/viewcvs.py/orbeon/studio/src/plug ins/orbeon.oxfstudio.eclipse/src/orbeon/oxfstudio/eclipse/xm l/editor/
>
>
> . In particular look at MultiPageXML*.java. You might also want to
> look at
>
> Btw contributor is associated with the editor in plugin.xml. e.g.
>
> <editor
> name="Orbeon Log Event Editor"
> icon="orbeon/oxfstudio/ui/log.gif"
> class=" orbeon.oxfstudio.eclipse.monitor.log4j.editors.LogEventEdito r "
> id=" orbeon.oxfstudio.eclipse.monitor.log4j.editors.LogEventEdito r "
>
> contributorClass='orbeon.oxfstudio.eclipse.xml.editor.MultiP ageXMLEditorContributor'
>
> >
>
> ( LogEventEditor isa MultipageXMLEditor... )
>
> -- Regards, d
>
>
Previous Topic:Plugin activation
Next Topic:Renaming projects
Goto Forum:
  


Current Time: Thu May 29 06:59:26 EDT 2025

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

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

Back to the top