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 259112 - rename is broken
Summary: rename is broken
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 13:33 UTC by fordfrog
Modified: 2016-05-07 09:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fordfrog 2016-05-03 13:33:55 UTC
having a valid code and pressing ctrl+r starts rename refactoring. that works fine. but after first character is pressed to rename the variable, cursor moves to another instance of the variable being renamed and next pressing character changes just the variable where the cursor is and rename is finished/interrupted.

not sure if it is related, but creating import using ctrl+space after a class name adds the import but the cursor does not stay at the position but is moved in front of the newly created import line.

these issues were introduced in nightly builds since 20160502.
Comment 1 fordfrog 2016-05-03 13:35:33 UTC
looking at log file, i found this exception:

INFO [org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider]: doRename: TreePathHandle[delegate:TreeDelegate[kind:IDENTIFIER, enclosingElement:ElementHandle[kind=METHOD; sigs=com.fordfrog.osgi.images.ImageUtils crop ([BIIII)[B ], file:/home/fordfrog/src/fordfrog/osgi/com.fordfrog.osgi.images.git/src/main/java/com/fordfrog/osgi/images/ImageUtils.java@68005b37:1f2a0fca]]
java.lang.NullPointerException: selected
	at org.netbeans.modules.refactoring.java.ui.RenameRefactoringUI$2.create(RenameRefactoringUI.java:449)
	at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$1.createRefactoringUI(ContextAnalyzer.java:117)
	at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:378)
	at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:303)
	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:486)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:137)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:204)
	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:201)
	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176)
	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:141)
	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:88)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:201)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:104)
	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:436)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:407)
	at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:385)
	at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:153)
	at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.doFullRename(RefactoringActionsProvider.java:154)
	at org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider.doRename(RefactoringActionsProvider.java:101)
	at org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.doRename(ActionsImplementationFactory.java:91)
	at org.netbeans.modules.refactoring.spi.impl.RenameAction.performAction(RenameAction.java:77)
	at org.netbeans.modules.refactoring.spi.impl.RefactoringGlobalAction$ContextAction.actionPerformed(RefactoringGlobalAction.java:197)
	at org.netbeans.modules.java.editor.rename.InstantRenamePerformer.doFullRename(InstantRenamePerformer.java:284)
	at org.netbeans.modules.java.editor.rename.InstantRenamePerformer.invokeInstantRename(InstantRenamePerformer.java:267)
	at org.netbeans.modules.java.editor.rename.InstantRenameAction.actionPerformed(InstantRenameAction.java:62)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2873)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2836)
	at java.awt.Component.processEvent(Component.java:6312)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4762)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 2 fordfrog 2016-05-03 14:40:37 UTC
this also affects filling method parameters (when the parameters appear in boxes and one can navigate through them by tab or enter). also when saving edited file, cursor sometimes moves elsewhere.
Comment 3 fordfrog 2016-05-07 09:13:28 UTC
it's fixed in nightly build 20160507