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 82627 - [File DnD into IDE support] File from IDE cannot be cut-pasted to filemanager
Summary: [File DnD into IDE support] File from IDE cannot be cut-pasted to filemanager
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
: 90694 (view as bug list)
Depends on:
Blocks: 90372
  Show dependency tree
 
Reported: 2006-08-14 16:12 UTC by Tomas Danek
Modified: 2008-12-22 13:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (1.55 KB, text/plain)
2006-12-12 17:18 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-08-14 16:12:45 UTC
NetBeans IDE Dev (Build 200608131800)
1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-b02
Windows XP version 5.1 running on x86
en_US (nb); Cp1252

1) create java project
2) select Main.java file, invoke from popup Cut (or use CTRL+X)
3) try to paste it somwhere in filemanager e.g. C:\ - paste action is
disabled/ctrl+v also does not work.

note: copy action works fine.
Comment 1 Stanislav Aubrecht 2006-09-12 10:53:39 UTC
it's a problem with java refactoring as it adds its own wrapper to java file
transferables so the operating system doesn't see the support file dnd flavor.

reassigning to refactoring team for evaluation
Comment 2 Stanislav Aubrecht 2006-09-12 10:54:36 UTC
note that cut & paste works fine for non-java files like html or text files
Comment 3 Jan Becicka 2006-12-12 14:00:26 UTC
*** Issue 90694 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2006-12-12 17:16:49 UTC
Problem was, that refactoring clipboard convertor converted multi flavor
transferables into one, refactoring transferable.

Checking in
refactoring/api/src/org/netbeans/modules/refactoring/impl/ClipboardConvertor.java;
/cvs/refactoring/api/src/org/netbeans/modules/refactoring/impl/ClipboardConvertor.java,v
 <--  ClipboardConvertor.java
new revision: 1.7; previous revision: 1.6
done
Checking in
refactoring/java/src/org/netbeans/modules/refactoring/java/ui/RefactoringActionsProvider.java;
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/ui/RefactoringActionsProvider.java,v
 <--  RefactoringActionsProvider.java
new revision: 1.11; previous revision: 1.10
done
Checking in ide/test/qa-functional/src/validation/IDEValidation.java;
/cvs/ide/test/qa-functional/src/validation/IDEValidation.java,v  <-- 
IDEValidation.java
new revision: 1.179; previous revision: 1.178
done

Problem partially fixed. Now DnD of 2 or more files does not invoke refactoring.
This problem can be fixed in openide/explorer.
Please review/improve/commit this patch. Thanks.

Comment 5 Jan Becicka 2006-12-12 17:18:53 UTC
Created attachment 36617 [details]
Proposed patch
Comment 6 Stanislav Aubrecht 2007-01-09 15:49:28 UTC
patch integrated to trunk

/cvs/openide/explorer/src/org/openide/explorer/view/DragDropUtilities.java,v 
<--  DragDropUtilities.java
new revision: 1.12; previous revision: 1.11
Comment 7 Tomas Danek 2007-01-16 17:12:21 UTC
is it possible to delete source file? That's the logic of Cut action...currently
the file is copied..
Comment 8 Stanislav Aubrecht 2007-02-15 14:31:56 UTC
> is it possible to delete source file? That's the logic of Cut action...currently
> the file is copied..

unfortunately, there are not suitable hooks in java's Transferable nor in
Clipboard classes. so there's now way of knowing that the actual cut operation
was performed somewhere outside java and the original file should be removed...