Quantcast
Channel: Oracle Bloggers
Viewing all articles
Browse latest Browse all 19780

Superseding NetBeans Platform Status Line Element Providers

$
0
0

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.


Viewing all articles
Browse latest Browse all 19780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>