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 49597 - Wrong storage format of shortcuts for some actions
Summary: Wrong storage format of shortcuts for some actions
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2004-09-27 15:49 UTC by Petr Hrebejk
Modified: 2008-12-22 22:49 UTC (History)
2 users (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 Petr Hrebejk 2004-09-27 15:49:56 UTC
For some strange reason the shorcut editor uses
different storage mechanism for different actions.

E.g. adding shorcut to "System Exit" action stores
.shadow file in the config/Shortcuts folder. But
for Build project action it tries to create
.instance file and a record in .nbattrs which
obviously fails with ClassNotFoubdException.

Steps to reproduce:
1) Go to shorcuts editor 
2) choose some action from the Project folder e.g.
Close Project
3) Add shorcut to the action
4) Close the shorcut editor
5) Look into the console output to see the exception
6) Look into config/Shorctuts flder to see the
wierd files
Comment 1 Petr Hrebejk 2004-09-27 15:50:29 UTC
Marking as regression as it used to work.
Comment 2 Petr Hrebejk 2004-09-27 16:52:09 UTC
Sorry. You have to set the shortcut on some acrtion which is not a
singleton. I.e. rather use "Build project" than "Close project" 
Comment 3 Jaroslav Tulach 2004-10-05 11:54:23 UTC
Sometimes IDO was GCed while the dialog was opened, sometimes not.

Checking in src/org/netbeans/core/ActionsPanel.java;
/cvs/core/src/org/netbeans/core/ActionsPanel.java,v  <-- 
ActionsPanel.java
new revision: 1.38; previous revision: 1.37
done
Processing log script arguments...
More commits to come...
Checking in test/unit/src/org/netbeans/core/ShortcutsFolderTest.java;
/cvs/core/test/unit/src/org/netbeans/core/ShortcutsFolderTest.java,v 
<--  ShortcutsFolderTest.java
new revision: 1.4; previous revision: 1.3
done
Comment 4 _ tboudreau 2004-10-09 12:46:31 UTC
Jarda, any chance you could get the test for this also to pass in test-single mode?

Testcase: 
testApplyChangeToFactoryActionIssue49597(org.netbeans.core.ShortcutsFolderTest):
	FAILED
It is DataShadow expected:<class org.openide.loaders.DataShadow> but was:<class 
org.openide.loaders.InstanceDataObject>
junit.framework.AssertionFailedError: It is DataShadow expected:<class 
org.openide.loaders.DataShadow> but was:<class 
org.openide.loaders.InstanceDataObject>
    at 
org.netbeans.core.ShortcutsFolderTest.testApplyChangeToFactoryActionIssue49597(Shortc
utsFolderTest.java:470)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.netbeans.junit.NbTestCase.run(NbTestCase.java:119)

Comment 5 Jaroslav Tulach 2004-10-11 08:18:02 UTC
Tim! What are you talking about!? Your last commit broke the test and
you are asking me to fix it?

Fixed.
Comment 6 Zdenek Konecny 2005-07-25 12:37:56 UTC
Closed, too old