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 69035 - Copy & Cut shortcuts not functional after invoking of OD
Summary: Copy & Cut shortcuts not functional after invoking of OD
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords: REGRESSION
: 68976 (view as bug list)
Depends on: 69077
Blocks:
  Show dependency tree
 
Reported: 2005-11-21 12:41 UTC by Max Sauer
Modified: 2007-11-05 13:44 UTC (History)
4 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 Max Sauer 2005-11-21 12:41:06 UTC
After Invoking and confirmation of OD, all shortcuts for cut and copy actions
stop working.

Steps to reproduce:
-------------------
1) Start IDE with fresh userdir
2) Open a j2se project
3) Open a java file
4) Invoke Tools|Options
5) Press OK
--> Inside Editor, no shortcuts for above mentioned actions do work. This bug
makes OD unusable for most users.

[200511201900, JDK 1.6.0 beta, solaris 10/sparc]
Comment 1 Jan Jancura 2005-11-21 16:02:27 UTC
Copy&Cut actions are disabled -> I am not disabling them. Should be some mystery
in editor.
Comment 2 Max Sauer 2005-11-21 16:33:51 UTC
Looks like it has been interduced somewhere between 200511151900 and 200511161900.
Comment 3 Petr Hrebejk 2005-11-22 12:10:52 UTC
Some more info.

This issue is probably two bugs in one. 

1) Editors in dialogs (e.g. breakpoint customization) do not handle the
copy/paste/delete at all. No matter if pening the options dialog or not. After
talk to Jarda it seems that there are two possible solutions for that. a) core
will fix the actions to work in modal dialogs (those opened using
DialogDisplayer) b) Hanz will set shortcuts for both actions global and editor

2) After opening OD and closing it using OK button. The shortcuts stop working
for the opened editor. Newly opened files work fine. Seems like something what
happens after clicing OK screws up the shortcuts in currently opened editors.
Comment 4 Martin Roskanin 2005-11-22 15:16:36 UTC
*** Issue 68976 has been marked as a duplicate of this issue. ***
Comment 5 Miloslav Metelka 2005-11-22 17:44:39 UTC
I was able to reproduce for cut action. I have debugged it and it seems that the
editor's cut action is disabled. The code that beeps is TopComponent:851. I'll
check the editor's code responsible for updating of the enabled status.
Comment 6 Miloslav Metelka 2005-11-22 21:34:27 UTC
I've finally found the problem - there are two physical instances of the
BaseKit.CutAction. One of them gets its enabled status set properly but the
other one is physically used by the o.o.actions.CutAction and the OD dialog
probably triggers this somehow. See CloneableEditor:199 to see the delegation of
the actions between editor and CE top component.
 Although there is a specialized construction that should avoid this problem
(see BaseKit.cutActionDef) - it's only instance-level so if two kit instances
get created it's out of luck. I'll make it on static level, that should help.
Comment 7 Miloslav Metelka 2005-11-23 08:59:57 UTC
Fixed in trunk:
Checking in libsrc/org/netbeans/editor/BaseKit.java;
/cvs/editor/libsrc/org/netbeans/editor/BaseKit.java,v  <--  BaseKit.java
new revision: 1.145; previous revision: 1.144

I have attempted to ensure that this will not cause a memory leak and I've
entered issue 69151 but it does not seem to be related to this integration.
Comment 8 Max Sauer 2005-11-25 07:38:35 UTC
Verified in 200511241900.