Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8717511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:19:22+00:00 2026-06-13T06:19:22+00:00

I need to update status line editor-specific information. I already have my own implementation,

  • 0

I need to update status line editor-specific information. I already have my own implementation, but I would like to take a look how is eclipse contribution item, which shows line number/column position in status line is implemented. Can anyone point me, where could I find the source code?

Thanks in advance,
AlexG.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:19:24+00:00Added an answer on June 13, 2026 at 6:19 am

    I’ve been looking into it, it’s quite involved, and I’m not sure I got the complete picture, but in case this helps someone…

    The declarative way of binding an Editor with the contributions to the StatusLine (and Menu and Toolbar) is through IEditorActionBarContributor class. This class is declared for a editor type in plugin.xml – and typically a single instance is created for each editor type (several running instances of a same editor type will share a IEditorActionBarContributor instance, calling its doSetActiveEditor() method when activated), and it will be disposed when when the last running editor of that type is closed.

    Lets take as an example how the default text editor in Eclipse updates the “Insert/Override” info in the status line (from Eclipse 3.7)

    The default text editor is declared in org.eclipse.ui.editors‘s plugin.xml (some lines trimmed) as:

     <extension point="org.eclipse.ui.editors">
          <editor  name="%Editors.DefaultTextEditor"
                class="org.eclipse.ui.editors.text.TextEditor"
                contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
                id="org.eclipse.ui.DefaultTextEditor">
          </editor>
     </extension>
    

    TextEditorActionContributor is the key. What interest us is implemented in the parent class BasicTextEditorActionContributor; it defines (statically) the 4 status fields (STATUS_FIELD_DEFS) and it stores internally a fixed map (fStatusFields) of each statusField (the spec, say) to a StatusLineContributionItem object). When called from the Eclipse UI, it registers the 4 fields in the status line (the titles, basically) in the method contributeToStatusLine(IStatusLineManager statusLineManager) And each time a editor is activated, it passes to it -in doSetActiveEditor(IEditorPart part)– the full set of StatusLineContributionItems , prepared with the corresponding actionHandlers. The editor understands all this because it implements ITextEditorExtension.setStatusField().

    In the case of AbstractTextEditor, it has an private field of (inner class) type ToggleOverwriteModeAction, which calls

    toggleOverwriteMode()->handleInsertModeChanged()->updateStatusField("InputMode")
    

    The editor looks if it has a statusField stored with this category, if so it will call IStatusField.setText("Insert" / "Overwrite") and this will result in the update of the status line message.

    This is an example, but I guess it gives the general idea: an instance of EditorActionContributor, binded to a editor type, mantains a list of the StatusLineContributionItem to be updated, and the editor must write into the objects of this list when the corresponding status changes. In this way, the editor is decoupled from the status line (it doesn’t know if/how a status change will be displayed in the UI).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to automate an IM client to update a status every few hours,
I need to update more than one update statements, but all should work on
I need to update the primary key for a record but it's also the
My App need to update the status and add images to the update, so
I have a few bash scripts I run, but they can take several hours
I need to update my .htaccess file to redirect permanently all URLs from http://example.com/pages/5604/article/something/?page=299
I need to update time info in a DateTime. I get a string in
I need to update a json list of object via url post data. For
I need to update a form in AX to use a complex drop down
I need to update the Notes field in my table tblMain by concatenating the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.