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 87822 - Drag and drop of views is not supported
Summary: Drag and drop of views is not supported
Status: CLOSED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: John Baker
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2006-10-24 05:05 UTC by _ jimdavidson
Modified: 2007-01-31 17:30 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
DatabaseMetaDataTransfer diff (3.08 KB, text/plain)
2006-12-08 07:37 UTC, John Baker
Details
ViewNode diff (2.95 KB, text/plain)
2006-12-08 07:41 UTC, John Baker
Details
DbMetaDataTransferProvider diff (1.03 KB, text/plain)
2006-12-08 07:42 UTC, John Baker
Details
explorer.plist diff - change seems to be required for DnD, without only Click+Click works (496 bytes, text/plain)
2006-12-08 07:44 UTC, John Baker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ jimdavidson 2006-10-24 05:05:35 UTC
Using NB5.5 and Visual Web Pack: drag a DB view from the runtime window onto the
form.  No meaningful transfer object is created, so the designer cannot use the
connection information.

Doing the same thing with a DB table causes a DatabaseMetadataTransfer instance
to be created, which contains all the information needed on the receiving end. 
Dragging a view should do something similar.

There is no convenient workaround for this limitation.
Comment 1 _ jimdavidson 2006-10-24 05:08:23 UTC
DB columns should probably be treated in a similar way, although right now we
don't do anything with drag/drop of columns.
Comment 2 Andrei Badea 2006-10-24 10:38:54 UTC
Not a defect, dnd for views was never requested by the VWP team. Dragging
columns is already supported on the form_promoh branch, which will be eventually
integrated into trunk.
Comment 3 John Baker 2006-12-06 04:02:00 UTC
The comment about columns is a red herring for this issue - dnd of views

Comment 4 John Baker 2006-12-06 04:05:58 UTC
I have made modifications to the DB Explorer and dbapi in my workspace and along
with changes to the VWP, DnD of Views is working.

I'll write-up the changes and provide diffs.

Since users may only have permission to access to Views, not Tables, a fix for 
DnD of Views should go in the next NB update
Comment 5 John Baker 2006-12-08 07:37:04 UTC
Created attachment 36571 [details]
DatabaseMetaDataTransfer diff
Comment 6 John Baker 2006-12-08 07:41:04 UTC
Drag and drop of Views may be an enhancement for DB Explorer, however, 
unfortunately, this is a serious regression for Visual Web Pack.  The product,
Creator 2, included the feature to Drag and Drop Views, mainly, for users who
just had permission to read/write data in Views, not Tables.

The same feature is required for Visual Web Pack.  In order to support Drag and
drop of Views, a new DataFlavor for Views and implementation of clipboardCopy
for Views are required.

I have available low-risk enhancements that need to be applied for the next update
 release of NetBeans.    Attached are the diffs of the files that needed to be
modified.
Comment 7 John Baker 2006-12-08 07:41:51 UTC
Created attachment 36572 [details]
ViewNode diff
Comment 8 John Baker 2006-12-08 07:42:58 UTC
Created attachment 36573 [details]
DbMetaDataTransferProvider diff
Comment 9 John Baker 2006-12-08 07:44:07 UTC
Created attachment 36574 [details]
explorer.plist diff - change seems to be required for DnD, without only Click+Click works
Comment 10 Andrei Badea 2006-12-08 10:24:29 UTC
Looks good.

There are a few unneeded whitespace changes, please remove them. Also the empty
line after getViewDataFlavor() in DbMetaDataTransferProvider.

"table" is used instead of "view" in two places in DatabaseMetaDataTransfer.

After making these changes I guess you can just reassign to yourself and commit
to trunk, or let me know and I will do it.
Comment 11 John Baker 2006-12-20 03:41:31 UTC
Andrei, thanks for reviewing the changes.  I've cleaned up the whitespace and 
corrected table/view

Integration was made to the trunk:

Checking in db/src/org/netbeans/modules/db/explorer/DbMetaDataTransferProvider.j
ava;
/cvs/db/src/org/netbeans/modules/db/explorer/DbMetaDataTransferProvider.java,v
<--  DbMetaDataTransferProvider.java
new revision: 1.3; previous revision: 1.2
done
Checking in db/src/org/netbeans/modules/db/explorer/nodes/ViewNode.java;
/cvs/db/src/org/netbeans/modules/db/explorer/nodes/ViewNode.java,v  <--  ViewNod
e.java
new revision: 1.20; previous revision: 1.19
done
Checking in db/src/org/netbeans/modules/db/resources/explorer.plist;
/cvs/db/src/org/netbeans/modules/db/resources/explorer.plist,v  <--  explorer.pl
ist
new revision: 1.75; previous revision: 1.74
done
Checking in db/dbapi/src/org/netbeans/modules/db/api/explorer/DatabaseMetaDataTr
ansfer.java;
/cvs/db/dbapi/src/org/netbeans/modules/db/api/explorer/DatabaseMetaDataTransfer.
java,v  <--  DatabaseMetaDataTransfer.java
new revision: 1.3; previous revision: 1.2
done
Comment 12 John Baker 2006-12-20 03:48:17 UTC
Should have also stated that this is now fixed in the trunk
Comment 13 Andrei Badea 2007-01-05 23:30:52 UTC
Looks fine, it can be integrated in the release_551 branch.
Comment 14 John Baker 2007-01-07 19:42:17 UTC
Checking in db/src/org/netbeans/modules/db/explorer/DbMetaDataTransferProvider.j
ava;
/cvs/db/src/org/netbeans/modules/db/explorer/DbMetaDataTransferProvider.java,v
<--  DbMetaDataTransferProvider.java
new revision: 1.1.4.2.24.3; previous revision: 1.1.4.2
done
Checking in db/src/org/netbeans/modules/db/explorer/nodes/ViewNode.java;
/cvs/db/src/org/netbeans/modules/db/explorer/nodes/ViewNode.java,v  <--  ViewNod
e.java
new revision: 1.18.26.1.24.3; previous revision: 1.18.26.1
done
Checking in db/src/org/netbeans/modules/db/resources/explorer.plist;
/cvs/db/src/org/netbeans/modules/db/resources/explorer.plist,v  <--  explorer.pl
ist
new revision: 1.70.56.1.2.4.20.3; previous revision: 1.70.56.1.2.4
done
Checking in db/dbapi/src/org/netbeans/modules/db/api/explorer/DatabaseMetaDataTr
ansfer.java;
/cvs/db/dbapi/src/org/netbeans/modules/db/api/explorer/DatabaseMetaDataTransfer.
java,v  <--  DatabaseMetaDataTransfer.java
new revision: 1.1.4.4.24.3; previous revision: 1.1.4.4
done
Comment 15 _ alexpetrov 2007-01-31 17:29:19 UTC
The bug has been verified on NB 5.5.1 VWP build #070130 (NB 5.5.1 build
#200701231036).
Comment 16 _ alexpetrov 2007-01-31 17:30:00 UTC
The bug has been verified on NB 5.5.1 VWP build #070130 (NB 5.5.1 build
#200701231036).