TaT FixNavigatorModeInRCPApp

Fix Navigator Mode in NetBeans Platform Application

Contributed By; Anton Epple

Brief Overview

When you create a new NetBeans Platform Application and use the default platform, [there’s a little bug|http://www.netbeans.org/issues/show_bug.cgi?id=153848 you should be aware of. When you create a new Window Component the Wizard will let you choose from the set of available Positions (i.e. Modes) in your Platform. That’s nice, but sometimes it doesn’t work.

Problem Statement

Tanja Drüke has referred to this problem during her talk at the NetBeans Demo Camp in Munich. She had added some Window Components to the Navigator mode in her application, but it simply wouldn’t show up there. Instead the Windows would always go to Explorer Mode instead.

Tips & Tricks

She finally fixed that by creating her own mode simply copying the mode definition from Navigator, which is a clever & pragmatic way - but what’s the reason for this bug?

  • Actually the wizard shows all modes in the platform you’re using (the IDE in that case) and doesn’t care if the Modules defining the mode is also part of your application.
  • The Navigator Mode isn’t part of the platform (although it probably should be), and by default doesn’t get added to a new Platform Application.
  • When the application is running, the Window System won’t find the mode and add it to the default mode instead, which is Explorer.

Adapted from http://eppleton.sharedhost.de/blog/?p=306

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo