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 50556

Summary: Paste on package always disabled
Product: java Reporter: Jiri Skrivanek <jskrivanek>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: CLOSED WONTFIX    
Severity: blocker CC: jrojcek
Priority: P3 Keywords: UI
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    

Description Jiri Skrivanek 2004-10-18 13:39:06 UTC
In Projects view Paste action is always disabled
on a package but copy action is enabled. On the
other hand the paste action gets enabled when you
copy a folder from Files view. It is a little bit
inconsistens. Steps to follow:

1)
- open a java project in Projects view
- on a package click Copy item in context menu
- open context menu on any package but paste is
always disabled
2)
- in Files view click Copy item on a folder
- go to the projects view and open context menu on
a package => Paste item is enabled

Build 20041018-0707, JDK1.5.0, WindowsXP.
Comment 1 Jesse Glick 2004-10-18 20:38:06 UTC
Up to Jano to specify.
Comment 2 jrojcek 2004-10-21 13:31:50 UTC
Also in the second case the Paste action should be disabled.

As we present the packages as a list, it shouldn't be possible to paste folder into a 
package.
Comment 3 Jesse Glick 2004-10-21 17:11:36 UTC
Jano please make sure the UI spec says this explicitly.
Comment 4 Tomas Zezula 2004-10-25 13:48:04 UTC
There is no way how to distinguish the DataObject from the DataFloder
in the Transferable, except of calling getTransferData () which is not
cheap operation, calling getTransferable () in the createPasteTypes ()
is not good idea, since it is called when the pop up menu is created.
The folder in the physical view is treated as any other physical
resource (not as a package).
Comment 5 Jiri Skrivanek 2004-10-25 13:59:01 UTC
OK.