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 63989 - Rename not supported in layers
Summary: Rename not supported in layers
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 65485
  Show dependency tree
 
Reported: 2005-09-09 14:40 UTC by Geertjan Wielenga
Modified: 2005-11-08 16:26 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 Geertjan Wielenga 2005-09-09 14:40:08 UTC
Build 20050907-1515 on Windows XP

1. Right-click node in System Filesystem Browser.
2. Choose Rename.
3. Type new name.
4. Click OK.
Two problems:
(a) Node is not renamed.
(b) Exception is rteurned:

java.lang.UnsupportedOperationException: XXX
	at
org.netbeans.modules.apisupport.project.layers.WritableXMLFileSystem.rename(WritableXMLFileSystem.java:457)
	at org.openide.filesystems.AbstractFileObject.rename(AbstractFileObject.java:501)
	at org.openide.filesystems.MultiFileObject.rename(MultiFileObject.java:1086)
	at org.openide.loaders.FileEntry$Folder.rename(FileEntry.java:366)
	at org.openide.loaders.MultiDataObject.handleRename(MultiDataObject.java:471)
	at org.openide.loaders.DataFolder.handleRename(DataFolder.java:630)
	at org.openide.loaders.DataObject$1Op.run(DataObject.java:585)
	at org.openide.loaders.DataObject$1WrapRun.run(DataObject.java:765)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:96)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:450)
	at
org.openide.loaders.DataObjectPool.runAtomicActionSimple(DataObjectPool.java:159)
	at org.openide.loaders.DataObject.invokeAtomicAction(DataObject.java:782)
	at org.openide.loaders.DataObject.rename(DataObject.java:595)
	at
org.netbeans.modules.refactoring.ui.FolderRenameHandlerImpl.handleRename(FolderRenameHandlerImpl.java:36)
	at org.openide.loaders.DataFolder$FolderNode.setName(DataFolder.java:1228)
	at org.openide.nodes.FilterNode.setName(FilterNode.java:440)
	at org.openide.actions.RenameAction.performAction(RenameAction.java:68)
	at org.openide.util.actions.NodeAction$3.run(NodeAction.java:531)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47)
	at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:527)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
	at
javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
	at java.awt.Component.processMouseEvent(Component.java:5488)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jesse Glick 2005-09-09 18:20:38 UTC
Yes, I never implemented rename.
Comment 2 Jesse Glick 2005-11-07 00:21:20 UTC
Also needed a patch in AbstractFileObject, which was passing incorrect args to
its impl.

committed   * Up-To-Date  1.14       
apisupport/project/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystem.java
committed   * Up-To-Date  1.12       
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/layers/WritableXMLFileSystemTest.java
committed   * Up-To-Date  1.2        
openide/fs/src/org/openide/filesystems/AbstractFileObject.java
Comment 3 pzajac 2005-11-08 15:43:28 UTC
Nice feature. 
There is only one small problem. The rename is done in awt-event-queue. For
example a obscured use case if I rename Editer/text/CSS folder it takes few
seconds. Can I have fill another one issue?
Comment 4 Jesse Glick 2005-11-08 16:26:21 UTC
The rename itself should take a trivial amount of time, regardless of how many
subfolders there are; all it does it replace the name="..." attr. If you see EQ
being blocked it is probably for some other reason (e.g. XML Layer display
refreshing, or perhaps some Filesystems inefficiency). Feel free to file a
lower-priority PERFORMANCE bug with thread dumps, but I doubt I will look at it
for 5.0 unless it is a real problem.