Superseding NetBeans Platform Status Line Element Providers

When you've included the Plain Editor modules, so that you can for example create basic code completion (as discussed here in this blog), you automatically end up with status line elements, which maybe you don't want.

Here's how to fix that:

import java.awt.Component;
import javax.swing.JLabel;
import org.openide.awt.StatusLineElementProvider;
import org.openide.util.lookup.ServiceProvider;

@ServiceProvider(
        service = StatusLineElementProvider.class,
        supersedes = {
   "org.netbeans.progress.module.ProgressVisualizerProvider",
   "org.netbeans.core.ui.notifications.StatusLineElement",
   "org.netbeans.modules.editor.impl.StatusLineFactories$LineColumn",
   "org.netbeans.modules.editor.impl.StatusLineFactories$TypingMode"
        })
public class DemoStatusLineElementProvider implements StatusLineElementProvider {

    @Override
    public Component getStatusLineElement() {
        return new JLabel("hello");
    }
    
}

You may not want to suppress all of the above, e.g., suppressing the progress bar is probably not smart, but at least now you know how to do so. Hope this helps, Henry, and the rest of the cool development team at Björn Lundén Information in Sweden.

Comments:

http://www.youtube.com/watch?v=YKUOB8MN4Kc

It does, thank you!
/Henry A

Posted by Henry A on February 15, 2013 at 12:55 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today