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 238595 - IllegalArgumentException: No highlight contains the caret.
Summary: IllegalArgumentException: No highlight contains the caret.
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: All All
: P4 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks: 215138
  Show dependency tree
 
Reported: 2013-11-20 09:55 UTC by Jiri Prox
Modified: 2016-07-07 07:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205430


Attachments
stacktrace (3.47 KB, text/plain)
2013-11-20 09:55 UTC, Jiri Prox
Details
stacktrace (3.47 KB, text/plain)
2013-11-20 13:30 UTC, Jiri Prox
Details
stacktrace (3.47 KB, text/plain)
2013-12-05 04:00 UTC, MackSix
Details
stacktrace (3.47 KB, text/plain)
2013-12-10 10:27 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2013-11-20 09:55:12 UTC
Build: NetBeans IDE Dev (Build 20131114-afedfaa97c4d)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b49, Java(TM) SE Runtime Environment, 1.8.0-ea-b107
OS: Windows 7

User Comments:
jiriprox: IAE when invoking instant rename in second file

Steps to reproduce:
1) invoke instant rename
2) switch to another file
3) invoke instant rename in current file
-> exception is thorwn and the content of editor disappears




Stacktrace: 
java.lang.IllegalArgumentException: No highlight contains the caret.
   at org.netbeans.modules.refactoring.java.plugins.InstantRefactoringPerformer.<init>(InstantRefactoringPerformer.java:178)
   at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.doInstantRename(RefactoringActionsProvider.java:138)
   at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.invokeInstantRename(RefactoringActionsProvider.java:127)
   at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.doRename(RefactoringActionsProvider.java:97)
   at org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.doRename(ActionsImplementationFactory.java:91)
   at org.netbeans.modules.refactoring.spi.impl.RenameAction.performAction(RenameAction.java:77)
Comment 1 Jiri Prox 2013-11-20 09:55:14 UTC
Created attachment 142390 [details]
stacktrace
Comment 2 Jiri Prox 2013-11-20 13:30:54 UTC
Created attachment 142402 [details]
stacktrace

Calling Rename on keyword
Comment 3 MackSix 2013-12-05 04:00:30 UTC
Created attachment 142847 [details]
stacktrace

1. Opened Java source file.
2. Pressed Ctrl+F
3. Pressed Ctrl+R

This exception was thrown.
Comment 4 MackSix 2013-12-10 10:27:42 UTC
Created attachment 143003 [details]
stacktrace

1. In the editor, hghlight the keyword "class" in a java source file
2. Press Ctrl+F and notice the word appears in Find Toolbar field.
3. Press Ctrl+R and this Exception happens

Repeatable
Comment 5 MackSix 2013-12-10 10:39:46 UTC
Actually, you can just highlight the keyword "class" and press Ctrl+R and this exception it thrown.

Repeatable
Comment 6 MackSix 2013-12-10 11:04:23 UTC
This also happens with keywords "enum" and "new".
Comment 7 Exceptions Reporter 2013-12-10 17:48:44 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=205430
Comment 8 Ralph Ruijs 2014-01-07 23:38:37 UTC
The instant rename popup has been disabled in 8.0 (bug 215138, comment 7)
Comment 9 Martin Balin 2016-07-07 07:18:49 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss