Bug 178649 - Attribute in the 'for' loop is not refactored
Attribute in the 'for' loop is not refactored
Status: VERIFIED FIXED
Product: javafx
Classification: Unclassified
Component: Unsupported
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: J Bachorik
issues@javafx
68patch1-verified
:
Depends on:
Blocks: 173077
  Show dependency treegraph
 
Reported: 2009-12-15 04:50 UTC by Alexandr Scherbatiy
Modified: 2010-01-28 04:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
screenshot of IDE after Refactoring > Rename on contacts in "list.contacts" (27.70 KB, image/png)
2009-12-15 08:54 UTC, Lukas Hasik
Details
The result of rename refactoring on the provided source (144.01 KB, image/png)
2009-12-16 04:36 UTC, J Bachorik
Details
Refactoring result screenshot (83.79 KB, image/png)
2009-12-16 05:20 UTC, Alexandr Scherbatiy
Details
IDE log file with the exception stack trace (54.10 KB, text/plain)
2009-12-16 05:22 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-12-15 04:50:45 UTC
NetBeans-JavaFX-Soma:  #66

  Product Version         = NetBeans IDE 6.8 RC1 (Build 200911252200)
(#3c4d4f8d3d55)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun
Microsystems Inc.

Steps to reproduce:

- Copy the code to the editor:
---------------------------------------------
class ContactList{
    public var contacts: Contact[];
}

class Contact{}

var list = ContactList{};

for(contact in list.contacts){
    println(contact);
}
---------------------------------------------

- Select the 'contacts' attribute in the 'list.contacts' expression:
  'for(contact in list.contacts){'
 and rename it to 'contacts2'

The 'contacts' attribute is not refactored.
Comment 1 J Bachorik 2009-12-15 05:03:31 UTC
This is weird. It seems as if the IDE you are using is rather outdated. Please, make sure that the build contains changeset http://hg.netbeans.org/javafx/rev/b7a28b1cd91c
When I try to reproduce the problem on the trunk build everything works as expected.
Comment 2 Lukas Hasik 2009-12-15 08:54:59 UTC
Created attachment 92616 [details]
screenshot of IDE after Refactoring > Rename on contacts in "list.contacts"

I can reproduce it with Product Version: NetBeans IDE Dev (Build javafx-main-118-on-091215) from http://smetiste/builds/netbeans/6.8/fixes/2009-12-14_18-00-34/zip/
Comment 3 J Bachorik 2009-12-15 13:53:52 UTC
Obviously this is not fixed in the 6.8 branch. It is fixed in trunk by http://hg.netbeans.org/javafx/rev/b7a28b1cd91c
Comment 4 Alexandr Scherbatiy 2009-12-16 04:19:02 UTC
I use the NetBeans-JavaFX-Soma Build #67 (Dec 16, 2009 12:00:35 AM) 

It uses JavaFX plugin sources from the trunk.

The issue is reproduced on this build.
Comment 5 J Bachorik 2009-12-16 04:36:01 UTC
I don't know what is going on with building the IDE with JavaFX plugin but if you use http://msice.czech.sun.com:8080/hudson/view/All/job/javafx-main/lastSuccessfulBuild/artifact/nbbuild/NetBeans-dev-javafx-main-120-on-091215-full.zip to verify this issue you will see that it is fixed.
I hope somebody will point out a reference source for the trunk binaries - and it should be the one that builds reliably. This reopening and closing of the issue is just a waste of time for all involved parties :(
Comment 6 J Bachorik 2009-12-16 04:36:46 UTC
Created attachment 92659 [details]
The result of rename refactoring on the provided source
Comment 7 Alexandr Scherbatiy 2009-12-16 05:18:44 UTC
Ok.

The issue is reproduced in the NetBeans IDE Dev 
(Build javafx-main-120-on-091215) from:

http://msice.czech.sun.com:8080/hudson/view/All/job/javafx-main/lastSuccessfulBuild/artifact/nbbuild/NetBeans-dev-javafx-main-120-on-091215-full.zip

There is the exception in the IDE log file:

WARNING [org.netbeans.api.javafx.source.JavaFXSource]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.javafx.refactoring.impl.RefactoringActionsProvider$TextComponentTask.run(RefactoringActionsProvider.java:500)
WARNING [org.netbeans.api.javafx.source.JavaFXSource]:   - thread dump follows:
WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:250)
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1206)
	at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:243)
	at org.netbeans.modules.javafx.refactoring.impl.RefactoringActionsProvider$TextComponentTask.run(RefactoringActionsProvider.java:500)
	at org.netbeans.modules.javafx.refactoring.impl.javafxc.SourceUtils.invokeAfterScanFinished(SourceUtils.java:631)
	at org.netbeans.modules.javafx.refactoring.impl.RefactoringActionsProvider.doRename(RefactoringActionsProvider.java:216)
	at org.netbeans.modules.refactoring.api.impl.ActionsImplementationFactory.doRename(ActionsImplementationFactory.java:83)
	at org.netbeans.modules.refactoring.spi.impl.RenameAction.performAction(RenameAction.java:62)
	at org.netbeans.modules.refactoring.spi.impl.RefactoringGlobalAction.performAction(RefactoringGlobalAction.java:132)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:296)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:127)
	at org.netbeans.modules.openide.util.ActionsBridge.implPerformAction(ActionsBridge.java:83)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:64)
	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:123)
	at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:284)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266)
	at java.awt.Component.processMouseEvent(Component.java:6263)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at java.awt.Component.processEvent(Component.java:6028)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
	at java.awt.Container.dispatchEventImpl(Container.java:2085)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 8 Alexandr Scherbatiy 2009-12-16 05:20:23 UTC
Created attachment 92663 [details]
Refactoring result screenshot
Comment 9 Alexandr Scherbatiy 2009-12-16 05:22:05 UTC
Created attachment 92664 [details]
IDE log file with the exception stack trace
Comment 10 Alexandr Scherbatiy 2009-12-16 05:39:20 UTC
I used the clean userdir.
Comment 11 J Bachorik 2009-12-16 06:56:16 UTC
Ok. It seems that the trigger is selecting the whole token or putting the cursor after the last char of the token (like "for(contact in list.contacts|){").
If you place the cursor anywhere inside the token the refactoring works fine.
Comment 12 Alexandr Scherbatiy 2009-12-16 07:04:27 UTC
Yes, I use mouse-double click to select the attribute.

I tried to place a cursor inside the token and it works.
Comment 13 J Bachorik 2010-01-04 05:38:48 UTC
fixed in http://hg.netbeans.org/javafx/rev/e0f1eb0b18a4
Comment 14 Alexandr Scherbatiy 2010-01-12 07:15:43 UTC
verified in NetBeans-JavaFX-Soma: #93
Comment 15 rbalada 2010-01-27 06:56:45 UTC
The changeset has been ported into release68_fixes branch as http://hg.netbeans.org/javafx/rev/e026da9cc566

Please verify in next NB 6.8 fixes build
Comment 16 Alexandr Scherbatiy 2010-01-28 04:06:57 UTC
Verified in NB 6.8 Patch1 2010-01-28_00-36-51


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