How is eclipse line number status line contribution item implemented?

后端 未结 3 2025
执笔经年
执笔经年 2021-01-20 03:55

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

3条回答
  •  孤独总比滥情好
    2021-01-20 04:41

    I'm not exactly sure what you are asking for, but there is a concrete implementation of IStatusLineManager here: org.eclipse.jface.action.StatusLineManager

    Typically, if you want to access the status line and you have a handle for an editor, you can do something like this (borrowed from org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction:

    private IStatusLineManager getStatusLineManager() {
        return fEditor.getEditorSite().getActionBars().getStatusLineManager();
    }
    

提交回复
热议问题