Hover text for Marker in Eclipse plugin

后端 未结 2 1460
小鲜肉
小鲜肉 2021-01-06 15:22

I have a custom editor with problem markers. The markers display correctly in the "problems" view with icon, location and text, and the problem icons display corre

2条回答
  •  独厮守ぢ
    2021-01-06 15:49

    In your class that extends org.eclipse.jface.text.source.SourceViewerConfiguration, just include the following:

    @Override
    public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
        return new DefaultAnnotationHover();
    }
    

    this includes the text of all markers of a line in the hover text of the problem marker in the margins of the text editor.

提交回复
热议问题