X

Geertjan's Blog

  • February 9, 2013

Superseding NetBeans Platform Status Line Element Providers

Geertjan Wielenga
Product Manager

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.

Join the discussion

Comments ( 1 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.