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 54028 - Searched text doesn't propagate from project search to editor search
Summary: Searched text doesn't propagate from project search to editor search
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Martin Roskanin
Depends on: 54446
  Show dependency tree
Reported: 2005-01-26 15:32 UTC by Roman Strobl
Modified: 2007-11-05 13:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Strobl 2005-01-26 15:32:39 UTC
[Netbeans 200501251900; JDS R3; JDK 1.5.0_01]

According to spec for 4.1 text which is searched
in projects view should be automatically filled in
search in editor. This functionality doesn't work
for me. Marking as P2 because this functionality
is highlighted in the rewrite document.
Comment 1 Martin Roskanin 2005-01-27 09:57:12 UTC
It works for me in current build. Please note, that searched string
will be added in shareable history only if the file, where the string
was found was open.

I have already updated UsersView, sorry for confusion.

/cvs/editor/www/doc/Proposals/Find/UsersView.html,v  <--  UsersView.html
new revision: 1.3; previous revision: 1.2
Comment 2 Roman Strobl 2005-01-27 10:22:21 UTC
Yes, that was the case, I didn't open the file. 

There is still one scenario where this fails - user might search in
projects, see the results and then open the file from projects view -
not from search results. In that case the string will not propagate to
the find dialog. I suggest to review the design, IMO the string should
be either added always or right after anything was found (clicking on
search results is too restrictive). 
Comment 3 Martin Roskanin 2005-01-27 11:03:36 UTC
Roman is right.

There are two things that should be taken into consideration.
1. adding to shareable history
2. highlighting the searched string

I suggest following:
1. [SearchHistory.add] After explorer find action performing, the
string is added into shareable history reagardless it was found or
not. (Empty string should not be addded of course) The same behaviour
is implemented in editor module find dialog.

2. [SearchHistory.setLastSelected] Highlighting and setting explorer
search string active in editor (F3 for example) will be performed only
if user will open file in editor from Search Result

Do you agree?
Comment 4 Martin Roskanin 2005-02-02 09:24:29 UTC
fixed in [maintrunk]

/cvs/editor/src/org/netbeans/modules/editor/,v  <--
new revision: 1.115; previous revision: 1.114

/cvs/openidex/src/org/openidex/search/,v  <--
new revision: 1.2; previous revision: 1.1
Comment 5 Jaroslav Tulach 2005-02-03 09:25:49 UTC
The fix is not complete as it contains api change and misses
attributes of such change as described at 54446.
Comment 6 Martin Roskanin 2005-02-03 09:50:14 UTC

/cvs/openidex/src/org/openidex/search/,v  <--
new revision: 1.3; previous revision: 1.2

/cvs/editor/src/org/netbeans/modules/editor/,v  <--
new revision: 1.116; previous revision: 1.115
Comment 7 Martin Roskanin 2005-02-15 09:19:08 UTC
fixed in [maintrunk]

/cvs/editor/src/org/netbeans/modules/editor/,v  <--
new revision: 1.117; previous revision: 1.116

/cvs/openidex/,v  <--
new revision: 1.34; previous revision: 1.33

/cvs/openidex/api/apichanges.xml,v  <--  apichanges.xml
new revision: 1.4; previous revision: 1.3

/cvs/openidex/src/org/openidex/search/,v  <--
new revision: 1.4; previous revision: 1.3

new revision: 1.2; previous revision: 1.1
Comment 8 Roman Strobl 2005-02-21 13:18:25 UTC
Verified in 200502201900.