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 68765 - [multiview] Find command is not enabled
Summary: [multiview] Find command is not enabled
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@utilities
URL:
Keywords:
: 65577 69952 81374 (view as bug list)
Depends on: 81117
Blocks: 81655
  Show dependency tree
 
Reported: 2005-11-15 20:51 UTC by carlos4x4
Modified: 2006-09-29 17:00 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
simple test case (NB module project) (11.15 KB, application/octet-stream)
2006-09-21 23:26 UTC, Nathan Fiedler
Details
Patch for the utilities module. (849 bytes, patch)
2006-09-27 14:03 UTC, Miloslav Metelka
Details | Diff
binary patch for branch 'release55_dev' (7.36 KB, application/octet-stream)
2006-09-27 18:59 UTC, Marian Petras
Details
source code patch for branch 'release55' (1000 bytes, patch)
2006-09-27 19:01 UTC, Marian Petras
Details | Diff
binary patch for branch 'release55' (7.36 KB, application/octet-stream)
2006-09-27 19:02 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carlos4x4 2005-11-15 20:51:38 UTC
Hello,

I have a class extended form Object and the "Find" command in Toolbars work 
fine, but if I select a class extended from JFrame or JPanel whit form 
asosiated, the "Find" command in Toolbars appears disabled.

Carlos
Comment 1 Jan Stola 2005-11-16 15:12:48 UTC
It seems that the ActionMap in lookup is not correctly updated. Probably
an issue of multiview - reassigning for evaluation.

Note that the Find action is correctly enabled when you open the form by Edit
action. The Find action is not enabled if you open the form by Open action
and then switch to the Source tab (but Ctrl+F shortcut works even it this case).
Comment 2 Tomas Pavek 2005-12-06 18:02:55 UTC
*** Issue 69952 has been marked as a duplicate of this issue. ***
Comment 3 Lukas Hasik 2005-12-06 18:20:42 UTC
*** Issue 65577 has been marked as a duplicate of this issue. ***
Comment 4 Marian Mirilovic 2006-01-03 10:53:39 UTC
Too late for NB5.0, please reevaluate.
Comment 5 Lukas Hasik 2006-02-08 18:21:16 UTC
*** Issue 65577 has been marked as a duplicate of this issue. ***
Comment 6 Milos Kleint 2006-09-06 10:14:23 UTC
possibly related to #81117 ?
Comment 7 Nathan Fiedler 2006-09-21 23:25:54 UTC
This issue affects everyone with a multiview and ActionMaps installed in the
MultiViewElements -- raising the priority (will attach a simple test case).
Comment 8 Nathan Fiedler 2006-09-21 23:26:27 UTC
Created attachment 34349 [details]
simple test case (NB module project)
Comment 9 Nathan Fiedler 2006-09-21 23:27:42 UTC
*** Issue 81374 has been marked as a duplicate of this issue. ***
Comment 10 Milos Kleint 2006-09-22 08:48:40 UTC
depends on resolution of #81117, might be a duplicate, but for sure can tell
once 81117 is fixed.
Comment 11 Milos Kleint 2006-09-25 15:23:41 UTC
since 81117 was moved to editor, moving this one as well. according to my
evaluation they have the same root of the problem
Comment 12 Miloslav Metelka 2006-09-26 12:28:41 UTC
I was able to reproduce and I'll attempt to fix this on the editor side.
Comment 13 Miloslav Metelka 2006-09-27 14:02:40 UTC
The problem is in fact in the utilities module. The editor properly installs its
find action impl into the jeditorpane so it should work fine. However the
utilities module installs its own find action impl into the top component's
action map under some circumstances in the FindActionManager. Normal
CloneableEditor is skipped but the exclusion does not work for multiview case.


The output from the logger for CallbackSystemAction follows.
Correct state for the non-multiview editor (and also expected state for Source
view of multiview):
FINE: Action for key: org.openide.actions.FindAction is:
org.netbeans.editor.ext.ExtKit$FindAction@969129

Incorrect state after switch from design view to source view:

FINE: Action for key: org.openide.actions.FindAction is:
org.openide.util.actions.NodeAction$DelegateAction@1b1c85e[delegate=org.netbeans.modules.search.SearchPerformer@2c842c]

Attaching a possible fix for the utilities module. The
MultiViewCloneableTopComponent is not public so I've only added class name check
which is ugly of course but could be considered as a minimalistic patch for 5.5.
Comment 14 Miloslav Metelka 2006-09-27 14:03:44 UTC
Created attachment 34587 [details]
Patch for the utilities module.
Comment 15 Miloslav Metelka 2006-09-27 14:04:54 UTC
Reassigning to utilities module.
Comment 16 Milos Kleint 2006-09-27 14:34:11 UTC
instead of checking CloneableEditor, one should check for
CloneableEditorSupport.Pane interface which covers both multiview components and
the CloneableEditor
Comment 17 Marian Petras 2006-09-27 16:19:19 UTC
Fixed in the trunk - using CloneableEditorSupport.Pane as Milos Kleint suggested.

Modified file:
   utilities/src/org/netbeans/modules/search/FindActionManager.java   (1.10)

Diff:
http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/FindActionManager.java?r1=1.9&r2=1.10&diff_format=u
Comment 18 Marian Petras 2006-09-27 17:23:54 UTC
Committed to branch 'release55_dev'.

Modified file:
 utilities/src/org/netbeans/modules/search/FindActionManager.java (1.8.32.1.14.1)

Diff:
http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/FindActionManager.java?r1=1.8.32.1&r2=1.8.32.1.14.1&diff_format=u
Comment 19 Marian Petras 2006-09-27 18:59:25 UTC
Created attachment 34605 [details]
binary patch for branch 'release55_dev'
Comment 20 Marian Petras 2006-09-27 19:00:05 UTC
I attached a binary patch for branch 'release55_dev' (for testing purposes).
Comment 21 Marian Petras 2006-09-27 19:01:19 UTC
Created attachment 34608 [details]
source code patch for branch 'release55'
Comment 22 Marian Petras 2006-09-27 19:02:02 UTC
Created attachment 34609 [details]
binary patch for branch 'release55'
Comment 23 Marian Petras 2006-09-27 19:05:12 UTC
I have attached a source code patch and also a binary patch for branch 'release55'.

To apply the binary patch, download the .jar file and put it to subdirectory

    ide7/modules/patches/org-netbeans-modules-utilities

of your NetBeans installation directory. (You may need to create the "patches"
directory first.)
Comment 24 Jiri Prox 2006-09-27 21:32:38 UTC
verified by QA, can be merged to release55 branch
Comment 25 Marian Petras 2006-09-29 17:00:01 UTC
Committed to branch 'release55'.

Modified file:
 utilities/src/org/netbeans/modules/search/FindActionManager.java (1.8.32.2)

Diff:
http://utilities.netbeans.org/source/browse/utilities/src/org/netbeans/modules/search/FindActionManager.java?r1=1.8.32.1&r2=1.8.32.2&diff_format=u