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 34800 - Removal of keyboard shortcuts works only for *.instance, not e.g. *.xml
Summary: Removal of keyboard shortcuts works only for *.instance, not e.g. *.xml
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 34801 46591 (view as bug list)
Depends on:
Blocks: 17597
  Show dependency tree
 
Reported: 2003-07-08 17:50 UTC by Mike Cepek
Modified: 2008-12-23 14:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cepek 2003-07-08 17:50:44 UTC
While researching Issue 34798 and others (TBD), I saw 
shortcuts that I had removed reappear.  To reproduce:

1) "File" -> "New" -> "Ant Build Scripts" -> "ShortCut to 
Target"
2) Check only "Add a keyboard shortcut" in the next screen
3) Specify the target of an Ant build.xml file
4) In the next screen specify a shortcut key combination 
(e.g. Ctrl-B) and remember it
5) Finish the "New Wizard - Shortcut to Target" dialog
6) "Tools" -> "Keyboard Shortcuts"
7) Click on the "Shortcuts" button at the top
8) Find your shortcut key, select it, click the "Remove" 
button, then the "Close" button
9) Repeat steps 6 and 7 above
10) Notice that the shortcut you "removed" is still there.
Comment 1 Mike Cepek 2003-07-08 17:57:42 UTC
See also issue 34801.
Comment 2 Jesse Glick 2003-07-08 21:18:45 UTC
I see in org.netbeans.core.ShortcutsFolder.applyChanges:

if (r.add) {
    if (InstanceDataObject.find (f, r.instanceName (), r.instanceClass
()) == null) {
        InstanceDataObject.create(f, r.instanceName(), r.instanceClass());
    }
} else {
    InstanceDataObject.remove(f, r.instanceName(), r.instanceClass());
}

which assumes all shortcuts are *.instance files. Of course this won't
work for Ant scripts at all. Even shabbier, it doesn't check the
return value to see if it did anything and to warn you when it doesn't.

Workaround: right-click Filesystems, choose Customize. Click Default
System, set Hidden to False. Close dialog. Under Filesystems ->
Default System -> Shortcuts, find the unwanted one. Delete it.
Comment 3 Jesse Glick 2003-07-08 21:21:05 UTC
*** Issue 34801 has been marked as a duplicate of this issue. ***
Comment 4 David Simonek 2004-01-09 13:51:49 UTC
Planned for promo-D.
Comment 5 Jaroslav Tulach 2004-09-30 16:49:36 UTC
I already have similiar bug 49597.
Comment 6 Jaroslav Tulach 2004-10-05 13:54:32 UTC
cvsgrep -i X.diff  | xargs runsocks cvs ci -m "#34800: Now the removal
of shortcuts checks the objects name and does not use just
InstanceDataObject.remove"
Checking in core/src/org/netbeans/core/ShortcutsFolder.java;
/cvs/core/src/org/netbeans/core/ShortcutsFolder.java,v  <-- 
ShortcutsFolder.java
new revision: 1.21; previous revision: 1.20
done
Processing log script arguments...
More commits to come...
Checking in core/test/unit/src/org/netbeans/core/ShortcutsFolderTest.java;
/cvs/core/test/unit/src/org/netbeans/core/ShortcutsFolderTest.java,v 
<--  ShortcutsFolderTest.java
new revision: 1.5; previous revision: 1.4
done
Processing log script arguments...
More commits to come...
Checking in openide/src/org/openide/filesystems/MemoryFileSystem.java;
/cvs/openide/src/org/openide/filesystems/MemoryFileSystem.java,v  <--
 MemoryFileSystem.java
new revision: 1.3; previous revision: 1.2
Comment 7 Jaroslav Tulach 2004-10-13 16:25:44 UTC
*** Issue 46591 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Danek 2005-07-22 11:33:09 UTC
closing
Comment 9 Quality Engineering 2008-12-23 14:22:37 UTC
This issue had *2 votes* before move to platform component