This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 70944 - Mnemonics in NBM projects
Summary: Mnemonics in NBM projects
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
: 81376 90402 103860 (view as bug list)
Depends on: 213683
  Show dependency tree
Reported: 2006-01-03 13:44 UTC by Tomas Pavek
Modified: 2012-06-06 16:14 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2006-01-03 13:44:58 UTC
Inspired by issue 70911...

Using mnemonics (org.openide.awt.Mnemonics) is desirable in NetBeans module
projects. We should consider turning them on by default in this case. Also
dependency on utilities module (org.openide.awt) should be added automatically
(as suggested in issue 70911).

Perhaps it could work the way that when a new form is created (which has not the
mnemonics option set yet) and assuming the global mnemonics option is true, we'd
try to add org.openide.awt to classpath, then check if Mnemonics class is there
and if yes, then set the given form's mnemonics to true, otherwise to false.

This way forms created in NBM projects would use mnemonics by default and
standard java projects would not (only in the case thay have Mnemonics on
classpath added manually).
Comment 1 Jesse Glick 2006-01-04 17:12:46 UTC
That's one option. Here's another: make it work much like swing-layout. So

1. Leave the Mnemonics flag off for regular forms. Leave the Mnemonics flag on
for NBM-related forms, but roll back issue #70911 (i.e. do not forcibly add a
dep on org.openide.awt to modules for forms which do not already use Mnemonics;
the New Project Template form does already use Mnemonics so this wizard would
continue to add a dep on org.openide.awt, as it did independently of #70911).

2. Make a j2se-type library containing just the Mnemonics class and ship it with
the IDE, including sources.

3. Change the form editor to detect when (1) a form is created which is already
set to call Mnemonics on at least one label/button, or (2) a label/button on an
existing form is modified to include text which would involve a Mnemonics call;
and in such cases to request that ProjectClassPathExtender add the new library.

3a. You might want to actually check the value of the text string (whether
hardcoded or from bundle) - include a call to Mnemonics if and only if the text
string actually includes an ampersand. This would avoid gratuitous calls.

4. Enhance apisupport's ProjectClassPathExtender to add a dep on org.openide.awt
in place of adding the new library. (No change would be needed for j2seproject.)
Comment 2 Tomas Pavek 2006-07-31 08:36:03 UTC
*** Issue 81376 has been marked as a duplicate of this issue. ***
Comment 3 Tomas Pavek 2006-12-04 17:22:04 UTC
*** Issue 90402 has been marked as a duplicate of this issue. ***
Comment 4 Tomas Pavek 2007-05-21 17:52:01 UTC
*** Issue 103860 has been marked as a duplicate of this issue. ***