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 203271 - can't search in diff window
Summary: can't search in diff window
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks: 213397
  Show dependency tree
 
Reported: 2011-10-06 23:49 UTC by tbrunhoff
Modified: 2012-06-01 12:26 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
search working (118.02 KB, image/png)
2011-10-07 08:09 UTC, Ondrej Vrabec
Details
screenshot of ide (262.98 KB, image/png)
2011-10-07 17:00 UTC, tbrunhoff
Details
screenshot of condition 3 (325.39 KB, image/png)
2011-10-07 17:27 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tbrunhoff 2011-10-06 23:49:27 UTC
If I do a subversion diff against local changes I get a very nice diff window, with options for viewing it graphically or in legacy context diff. I can navigate all views with the scroll bar... and nothing else.

Problems:
- I can do some navigation, but only the right hand graphical view. These include "Go to declaration" and "find usages"
- I'd really like to be able to search one side or the other.
- In lieu of searching it would at least be useful to click in the edit window and get the diff-view to line up.

Think of this as having the same functionality as 'svn diff | less' so that you can find your way around a very big file.

Product Version: NetBeans IDE Dev (Build 201110050601)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.13-92.fc14.x86_64 running on i386; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.netbeans/dev/var/cache
Comment 1 tbrunhoff 2011-10-06 23:51:57 UTC
> I can do some navigation, but only the right hand graphical view
... and whatever navigation I do only affects the edit window, not the diff window.

Some edit functionality is present, like copy and paste.
Comment 2 Ondrej Vrabec 2011-10-07 08:08:49 UTC
I must say i don't fully follow your request, as far as i know search works (Ctrl+F) in the diff view and when you're searching in the right pane the left view lines up with the position in the right view. Please explain again more thoroughly (step by step) what bothers you.
Comment 3 Ondrej Vrabec 2011-10-07 08:09:18 UTC
Created attachment 111629 [details]
search working
Comment 4 tbrunhoff 2011-10-07 17:00:42 UTC
Created attachment 111669 [details]
screenshot of ide

When I have a diff-window and hit ctrl-f, I get a Find dialog box, like in the attached screenshot... I don't get the search bar like I get in the edit window. The Find dialog box highlights all instances of the "Find What" text, and it shows the description of the instances found in the status line at the bottom of the ide, but it does *not* scroll the diff window to the current selection, and it does not highlight the selected text in blue.
Comment 5 tbrunhoff 2011-10-07 17:03:59 UTC
Another condition: 
- open a diff window open
- type ctrl-f (this find dialog opens)
- click 'close'

This causes the ide to switch to the last used edit window. It should not switch.
Comment 6 tbrunhoff 2011-10-07 17:27:03 UTC
Created attachment 111671 [details]
screenshot of condition 3

Condition #3:
- open file A in the editor (smpte377.h in the screenshot)
- open file B in the editor (container.cc in the screenshot)
- make changes to file B and open a (subversion) diff window on file B (container.cc [Diff] in the screenshot)
- undock the diff window and move it aside.
- in the edit window select file A (very important)
- click in the right side of the diff window, and type ctrl-f (the Find dialog pops up)
- type text into the "Find What" box that occurs in file B and the diff window, but *does not* occur in file A. Click 'Find'

As illustrated, "lowerBound" is highlighted in yellow in the diff window, but the status bar in the lower right shows "lowerBound not found".  Clearly the find box is searching the editor window, *not* the diff window.
Comment 7 tbrunhoff 2011-10-07 17:28:07 UTC
These problems are not difficult to find. If you don't have QA sequences like the ones I have described, someone should add them.
Comment 8 Ondrej Vrabec 2011-10-07 19:42:05 UTC
mito, i think it works fine (except for the problem described in comment #5) but according to the reporter there are still some issues with Find... in the diff view. Can you take a look?
Comment 9 Milutin Kristofic 2011-10-12 09:37:43 UTC
I know search in diff is not ideal. However, it has not been possible to use searchbar yet and this is a solution to have at least some search option. This are minor bugs in deprecated search functionality -> P4
Comment 10 tbrunhoff 2011-10-12 15:56:52 UTC
P4 is fine.

I did notice yesterday that I was able to search in the diff window in ways that did not work earlier. So there is some other condition where searching does not work at all (which you probably have not experienced).  I'll have to figure out how to get there and write it down.
Comment 11 Milutin Kristofic 2012-05-23 15:14:20 UTC
Ondra helped me to implement searchbar for diff. 

http://hg.netbeans.org/jet-main/rev/b632d8c030bf
Comment 12 Quality Engineering 2012-05-25 05:46:55 UTC
Integrated into 'main-golden', will be available in build *201205250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b632d8c030bf
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #203271 - can't search in diff window