Bug 202740 - Find... (Ctrl-F) is disabled for no reason.
Find... (Ctrl-F) is disabled for no reason.
Status: REOPENED
Product: editor
Classification: Unclassified
Component: Search
8.2
PC Windows 7 x64
: P3 with 13 votes (vote)
: 7.3
Assigned To: Milutin Kristofic
issues@editor
:
: 202738 207216 208218 212424 222706 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-27 15:13 UTC by swpalmer
Modified: 2017-09-12 08:36 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description swpalmer 2011-09-27 15:13:20 UTC
Product Version = NetBeans IDE 7.1 Beta (Build 201109222201)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) Client VM 21.0-b17

Somehow I've gotten into a state where Find is not enabled in my Java source file.
Comment 1 Milutin Kristofic 2011-10-03 09:04:26 UTC
I need a description, how to get to that state. Otherwise, I don't know how to fix that, since it never happens to me.
Comment 2 ceklock 2011-10-04 17:30:04 UTC
For me Ctrl+F is working.

Make sure you have focus on the editor window.
Comment 3 swpalmer 2011-10-21 15:41:27 UTC
Focus is not the issue.
I currently have this happening again.  Find is disabled, ctrl-F won't work.  The editor has focus.

I would love to know how it gets into this state.. but it has happened a few times now so I think we should leave this bug opened until we can figure out how to reproduce it.

Is there anything that I can do once I'm already in this state to help narrow down what the problem might be?
Comment 4 swpalmer 2011-10-21 15:45:04 UTC
Note that when this happens and I click in the project view, the Find action is enabled and Ctrl-F will activate "Find in Projects".  When I click back on an editor view the Find action is disabled again.  (Replace action is also disabled)
Comment 5 Svata Dedic 2011-10-21 16:28:59 UTC
*** Bug 202738 has been marked as a duplicate of this bug. ***
Comment 6 Milutin Kristofic 2011-10-26 14:33:34 UTC
There can be many reasons:
1, No bottom sidebar for Searchbar - if you open new file (new editor) is find working again? (When a file is opened searchbar creates an invisible bar where shows when it's invoked)

2. No Searchbar - Searchbar is singleton - just one instance. Maybe it's something wrong with this class - Can you repair find action only by restarting netbeans?

3. Action background - Does invoking action (Ctrl+F) come to searchbar? Is alt+ left arrow or alt + right arrow working (history go back and forward) ? They are close related to find action.

These were my first thoughts. It will be best to reproduce it and start debugging. 

I am changing to priority p4 until we have clue or more users complaining.
Comment 7 swpalmer 2011-11-28 19:39:40 UTC
1. This happens when the bottom search bar is showing.  Ctrl-F Find still doesn't work after opening a new file.
2. So far.
3. No. Ctrl-F has no observable effect.  Alt-Left/Right works as expected.

New symptoms:

Since I noticed that the Find: bar was open this time I typed some new text in the search box there, pressed enter. Nothing happened (the item should have been found).  Then I hit next and it found the OLD text and actually reverted the Find: combo box to showing the old text.

If I highlight some text in the editor first and then hit Ctrl-F that string is highlighted everywhere in the code.  I.e. it seems to do a part of a find of the selected text.  The Find CTRL-F itme in the Edit menu is still disabled.  The Find bar does not show the new text - until I hit the next or previous button, then it shows the string that was selected when I pressed CTRL-F.
Comment 8 swpalmer 2011-11-28 21:08:18 UTC
CTRL-F press is recorded like this in the uigestures log...

<record>
  <date>2011-11-28T16:05:22</date>
  <millis>1322514322589</millis>
  <sequence>6029</sequence>
  <logger>org.netbeans.ui.actions.editor</logger>
  <level>FINE</level>
  <thread>26</thread>
  <message>UI_ACTION_EDITOR</message>
  <key>UI_ACTION_EDITOR</key>
  <catalog>&lt;null&gt;</catalog>
  <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+F,when=1322514322588,modifiers=Ctrl] on org.openide.text.QuietEditorPane[,0,-9208,1220x13445,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@1764546,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=109,g=109,b=109],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],kit=org.netbeans.modules.editor.java.JavaKit@1f89bca,typeHandlers=]</param>
  <param>java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Ctrl+F,when=1322514322588,modifiers=Ctrl] on org.openide.text.QuietEditorPane[,0,-9208,1220x13445,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.basic.BasicBorders$MarginBorder@1764546,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=java.awt.Color[r=0,g=0,b=0],disabledTextColor=javax.swing.plaf.ColorUIResource[r=109,g=109,b=109],editable=true,margin=java.awt.Insets[top=0,left=0,bottom=0,right=0],selectedTextColor=javax.swing.plaf.ColorUIResource[r=255,g=255,b=255],selectionColor=javax.swing.plaf.ColorUIResource[r=51,g=153,b=255],kit=org.netbeans.modules.editor.java.JavaKit@1f89bca,typeHandlers=]</param>
  <param>org.netbeans.modules.editor.impl.SearchAndReplaceBarHandler$IncrementalSearchForwardAction[incremental-search-forward]</param>
  <param>org.netbeans.modules.editor.impl.SearchAndReplaceBarHandler$IncrementalSearchForwardAction@110480d</param>
  <param>incremental-search-forward</param>
</record>
Comment 9 jandersen 2012-01-18 18:44:21 UTC
I'm experiencing this exact same issue sporadically. Closing and opening Netbeans seems to resolve the issue, but a fix would be great.  Below are the details of my Netbeans installation:

Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_23; Java HotSpot(TM) 64-Bit Server VM 19.0-b09
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 10 amercado 2012-02-08 18:28:30 UTC
I too am experiencing this problem. I generally leave netbeans running for weeks at a time before a restart. NEVER had this problem with netbeans 7.0. restarting does fix the problem, but it is very sporadic. Here are my installation details....

Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_20; Java HotSpot(TM) Client VM 16.3-b01
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 11 wrprice 2012-02-22 23:21:12 UTC
Bug 207415 sounds like a dup of this one.  I had previously posted a comment there but this one has more comments/confirmations.  I can also confirm the described behavior.  Haven't been able to find a reproducible trigger yet.


Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 12 wrprice 2012-02-22 23:21:34 UTC
*** Bug 207415 has been marked as a duplicate of this bug. ***
Comment 13 netfeld 2012-02-24 15:23:49 UTC
The editor has focus. With Ctrl-F the searchbar widget doesn't get the focus. Even if you manually set the focus into the searchbar combo field and click the Next button, the search forget the last input and searches the last word in the Find pulldown. 


Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: Windows XP version 5.1 running on x86; Cp1252; de_DE (nb)
Comment 14 atlioddsson 2012-03-01 11:37:02 UTC
I'm experiencing the exact same problem as swpalmer:
* Ctrl+F doesn't move the focus to the search bar (although it opens up if it's closed)
* Manually setting the focus to the search bar searches for the last searched word (not the word I enter), and then ultimately removes what I entered and replaces it with the last searched text.
* Edit > Find menu item is disabled
* Unable to reproduce but happens every few days (and forces me to restart Netbeans)

* Highligting a word in the Editor and pressing Ctrl-F and then F3 will however start searching for the highlighted word

This never happened in previous versions (6.5-7.0.1)
Comment 15 Milutin Kristofic 2012-03-27 12:57:17 UTC
*** Bug 207216 has been marked as a duplicate of this bug. ***
Comment 16 Milutin Kristofic 2012-03-27 12:58:38 UTC
*** Bug 208218 has been marked as a duplicate of this bug. ***
Comment 17 wdenis 2012-04-02 13:27:12 UTC
Happens for me on WinXP.
jdk1.6.0_21
Comment 18 swpalmer 2012-04-02 20:36:32 UTC
I just reproduced this.  All that I did was go over to a colleague's desk, use Remote Desktop to connect to my computer that was running NetBeans.. I didn't use NB, but when I went back to my desk and unlocked the screen Netbeans was in this state.
Comment 19 atlioddsson 2012-04-02 20:43:25 UTC
Then I'd like to add that I'm always working remotely with Netbeans (although I don't get this problem consistently).  My development machine is in a different country than I.
Comment 20 wrprice 2012-04-04 18:36:31 UTC
Remote Desktop is also common in my workflow.

I tried to find a correlation to MSTSC back when I made my previous comments on this bug, but I couldn't reproduce at that time.  I'm not sure exactly what the trigger is.
Comment 21 bhulse 2012-04-23 19:54:51 UTC
I also see this problem with both 7.1 and 7.1.1. It works fine for some period time (hours / days) then the editor stops responding to ctrl-f. All the same symptoms described above with the find text box. Only solution I've found is a restart of the IDE.
Comment 22 dheffelfinger 2012-05-03 09:12:45 UTC
I was experiencing this problem it was very frustrating. It used to happen consistently when locking my PC for the day and leaving NetBeans running overnight.

The next morning CTRL+F would not work and I had to restart NetBeans.

I recently upgraded to NetBeans 7.2 and the problem went away.
Comment 23 atlioddsson 2012-05-03 09:25:22 UTC
@dheffelfinger, I assume you mean 7.1.2, right?
Comment 24 codesharkc 2012-05-03 13:32:44 UTC
Add me to the list of user's experiencing this behavior.
Comment 25 atlioddsson 2012-05-04 13:55:35 UTC
I'm afraid I got this problem as well in v. 7.1.2
Comment 26 jmborer 2012-05-04 14:21:36 UTC
Even worse: I've run into it on 7.2 but less often than before.
Comment 27 idclaar 2012-05-11 18:14:14 UTC
Just had to add my two cents on this one.  I've been experiencing this since moving to 7.1 (now on 7.1.1.)  I also remote to my box sometimes, but that doesn't seem to be the cause since it happens even if I don't work from home at night (unless someone else is remoting to my box from IT without me knowing.)  I use LogMeIn for remote connection.  Ctrl+F will bring the find toolbar up, but it doesn't bet focus as it does when the app is newly started (i.e. the cursor is in the search textbox and any text there is highlighted.)  This behavior seems to begin after the app has been running for about a day.  One other thing I've noticed is that selecting a file tab doesn't give focus to the file contents (i.e. the cursor position is not displayed in the scrollbar), and I have to actually click in the file for it to get focus.  This happens for all files, including files that I know I had placed the cursor in.  When the IDE is newly started, any file that is opened gets focus and the cursor is placed at row 1, column 1.  When the bad behavior is occurring, any file (including newly opened ones) need to be clicked in to gain focus.  May be part of the problem or just a symptom/side effect.  I have a 15 projects that all work together, and restarted means re-indexing and ClearCase plugin re-statussing, so I hope this can be fixed soon :)
Comment 28 Milutin Kristofic 2012-05-14 10:28:15 UTC
*** Bug 212424 has been marked as a duplicate of this bug. ***
Comment 29 Milutin Kristofic 2012-05-29 11:26:21 UTC
Thank you all for feedback. I clean some code in 7.2, before and after beta, where I smell some problems. We will see if I was lucky to find it. Otherwise I am still trying to find a root of the problem.
Comment 30 ehs 2012-06-01 08:07:32 UTC
This problem is also stopping me from being able to use NetBeans as search is absolutely critical to me.
Comment 31 Milutin Kristofic 2012-06-04 10:01:46 UTC
PanPetr, if you have reproducible steps, you can increase to P1, otherwise please leave it to P4.
Comment 32 JamesB41 2012-06-21 13:51:56 UTC
Just wanted to add that I've been experiencing this as well and it's infuriating.  I have to restart the IDE several times a day, exactly as described above.  I use Remote Desktop (both in and outbound) but that doesn't seem to be directly related to when it happens for me.  I have a weird feeling it might be related to DisplayFusion...but that's purely speculation.  In the meantime I'm going to try to downgrade to a prior version and see if it goes away because it's maddening at the moment.
Comment 33 jocafi 2012-06-21 14:28:18 UTC
Following instructions of mkristofic I changed the priority to P1:
 
CTRL+F and CTRL+H does not work sometimes. Try to replicate using the steps below:

1) Open a big /complex project with related projects, java and xml files and tailored bean components that appear on your tools palette.

2) Clear, Build and Compile

3) Run the project in debug mode

4) Leave Netbeans open and the project running for almost 6-10 hours without touching the PC

5) Come back to the pc, open a java file in the Netbeans editor. After that open a xml file.

6) Try to use CTRL+F or CTRL+H. It should not work.

If the steps above do not work, try to add the step 4.5) Put the PC to sleep, wait 1 minute, wake up the pc.

I hope it works for you! This error is really annoying.
Comment 34 Milutin Kristofic 2012-06-21 14:58:31 UTC
Every day, I open netbeans project and work on netbeans for 6-10 hours, but it has not happened. Maybe I need to try work on remote desktop. You can make it P1 if you have simple reasonable steps.
Comment 35 jocafi 2012-06-21 15:59:07 UTC
I work on Netbeans during many hours too and as the.
It is a shame that I lost my time to receive such an answer and to know that the steps to try to reproduce a very annoying intermittent error will not be used. 

I would put simple reasonable steps if the error was not intermittent and easily reproducibly, although a "Find and Replace" solution is very simple and should not be a problem for any kind of developer. The old "Search window" (Netbeans 7.0 and earlier) WAS working before someone messed up the Netbeans code in recent versions.

I will not change the priority anymore because there will be more and more excuses. But think that human beings like you are behind the posts and votes here and they decide what to do and which direction to take.
Comment 36 JamesB41 2012-06-25 20:58:51 UTC
I mentioned above that I thought my issue might be related to DisplayFusion, so I disabled it.  Left my computer running for several days and Control+F functionality is fine now.  It used to fail (requiring IDE restart) several times a day.  Hasn't happened since.  Hope this helps someone.
Comment 37 Sejm 2012-07-24 17:06:08 UTC
The comment on 2012-03-01 11:37:02 UTC and the one immediately before describe the problem I experience on NB 7.1.2 on Windows 7.

This bug is very frustrating. It makes NB almost unusuable as an IDE -- amazing as it may otherwise be. Opening a file and jumping to a specific code fragment is a critical feature.


Here's a workaround others can use:

1. Type the words that you want to find into your code (including regex).
2. Select the text that you just typed.
3. Hit CTRL+F.
   *** Note: It will not put your text in the Find box; that's okay.
4. You can set the options in the find bar (such as for regex)
5. Hit F3 to search (note: the find field in the bar stays at the previous text) or click the next button (note: once you do, the text in the field will change).


This bug has been opened for a year and people post to it every month.
Comment 38 JamesB41 2012-08-01 21:32:31 UTC
Sounds odd but the latest version of Starcraft II (1.5.0) seems to also cause this problem for me...but it happens immediately.  I'm fairly convinced this has something to do with other applications that are fullscreen.
Comment 39 jayhurley 2012-08-13 17:52:45 UTC
quite sorry for lack of easy repro steps, but this happens at least once/day for me, very frustrating to have to shutdown netbeans and restart it. fwiw i use logmein, both ways on this machine, but have had the case where the it's working fine, then stops working, and have not remotely accessed the machine or used to to remote to another during the interim period.
Comment 40 Marian Mirilovic 2012-09-13 10:20:08 UTC
14 votes -> P2
Comment 41 jayhurley 2012-09-13 18:12:25 UTC
for me, there is a very strong correlation between accessing the symptomatic machine remotely via logmein. Netbeans is up the whole time. I go to another box, reach back over via lmi, and when I get back, the ctrl-f search in editor is funked as described by the others... identical problem description.
Comment 42 dheffelfinger 2012-09-13 18:50:33 UTC
I was accessing the computer remotely through logmein as well.

However, for me the issue disappeared once I upgraded to NetBeans 7.1.2.

Doesn't happen on 7.2 or on the nightly builds for 7.3.
Comment 43 zombat 2012-09-13 20:14:15 UTC
My experience is the same as dheffelfinger's.  With Netbeans 7.1, remote logins (using Windows Remote Desktop) would cause CTRL-F to not work.  I've been curious if it could have had something to do with window events, as my main machine was a two-monitor high-res setup, but I usually remoted in with a single-screen laptop, forcing Netbeans to redraw to a much smaller size.

However, the issue has not reoccurred for me since upgrading to 7.2.
Comment 44 zombat 2012-09-13 20:16:36 UTC
I should clarify that it only happened sometimes.  I tried to find reproducible steps, but I didn't find anything conclusive.
Comment 45 Milutin Kristofic 2012-09-18 16:11:01 UTC
I collected some stats:

5 no version - wdenis, codesharkc, JamesB41, jocafi, jayhurley 
2 7.1 Beta - swpalmer, atlioddsson
7 7.1 - jandersen, amercado, wrprice, netfeld, jmborer, fallenangel321
2 7.1.1 - bhulse, idclaar  
2 7.1.2 - allanodriscoll,Sejm
not in 7.1.2 - dheffelfinger 
1 7.2 dev - jmborer
2 not in 7.2 dheffelfinger, zombat

I don't see any comment about nb 7.2, or nb 7.3 dev. If there is still problem, please reopen and describe if you think it's problem with remote desktop, hibernating, by other fullscreen application or something new.
Comment 46 11223344 2012-11-09 09:34:42 UTC
I was getting this in 7.2.1, using intellij keymap. Several key bindings could potentially stop working including control-f, control-shift-n, control-p.
A workaround for me was to duplicate the keymap from "keymap->manage profiles" to a new name, export it, then reimport. Since doing that I have had no problems.
Comment 47 swpalmer 2012-11-26 14:22:47 UTC
Happening again with NB 7.3 201211200002

I still believe this is related to Remote Desktop.  I came in this morning after having worked from home via Remote Desktop.  CTRL-F in the editor has no effect. Actually it does have an effect, it BEEPs.  The Edit menu shows that Find... and Replace... are both disabled.

All editor tabs have Find disabled, but opening a new Editor tab for a new file has an enabled Find action. - but it remains disabled for all the other opened tabs.

Closing and reopening the files works around the issue.
Comment 48 Milutin Kristofic 2012-11-26 16:57:23 UTC
*** Bug 222706 has been marked as a duplicate of this bug. ***
Comment 49 Milutin Kristofic 2012-11-26 17:41:02 UTC
If you have problems, there is a Bug #222562 where we are trying to find a source of problems. Please consider to help with you logs.
Comment 50 Milutin Kristofic 2012-11-28 12:40:05 UTC
Please if you have this problem with find action, read bug #222562 and help us to track issue.

*** This bug has been marked as a duplicate of bug 222562 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo