Author: jfuerth
Date: Mon Mar 30 13:20:55 2009
New Revision: 2962
Modified:
wiki/CutCopyPasteFeature.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/CutCopyPasteFeature.wiki
==============================================================================
--- wiki/CutCopyPasteFeature.wiki (original)
+++ wiki/CutCopyPasteFeature.wiki Mon Mar 30 13:20:55 2009
@@ -22,20 +22,50 @@
* Anything in the playpen that can be selected
* Tables
* Columns
- * Relationships
+ * Relationships?
+ * Cut: just delete
+ * Copy: sure, why not?
+ * Paste into playpen after a copy: Not reasonable
+ * Paste into playpen after a cut: Like undoing the delete
+ * Paste as text: could be relationship name, or the names of the two
tables involved
* What about the OLAP playpen?
* We should be able to apply all the same ideas to it as the relational
playpen. The more that comes "for free" because of the way we've
implemented things, the better.
= Paste =
-The meaning of the paste operation has to be decided when the paste
happens, based on context. In Swing DnD nomenclature, we talk about "Data
Flavors" accepted by the target of the paste operation, which could be
inside another Java application, or native applications on the system
that's hosting the JRE. Let's enumerate the possible scenarios:
+The meaning of the paste operation has to be decided when the paste
happens, based on context. In Swing DnD nomenclature, we talk about "Data
Flavors" accepted by the target of the paste operation, which could be
inside another Java application or a native application on the system
that's hosting the JRE. Let's enumerate the possible scenarios:
-== Text ==
+== Pasting into an Architect Playpen ==
-== An Architect Playpen ==
+This is the most common anticipated use case. In cases where the copy and
paste mirrors a drag and drop operation in terms of source and target
objects, it should do the same thing as the drag and drop would have done.
For example: select a source schema, copy it, select playpen, then paste.
This should be functionally identical to dragging the same source schema
into the playpen. One question would be where to locate the components in
the playpen (since the drop operation provides a location but the paste
does not).
-== Another SQL Power Swing app ==
+For operations that have no drag and drop counterpart, such as pasting a
text selection into the playpen, we may be able to do some useful things
with a (potentially multi-line) text selection:
+
+ * Create a table per line of text when the paste target is playpen
+ * Create a column per line of text when the paste target is a table (we
have the "modeling something that was in Excel" use case in mind here, so
this should be tested to ensure it works)
+
+== Pasting as Text ==
+
+This will be the usual case when pasting into a native app.
+
+Possible representations of, for example, a SQLTable include:
+
+ * The table's name
+ * The table's name followed by a bulleted list of column names
+ * DDL that creates the table (which dialect?)
+ * An XML snippet in .architect project file format
+
+I think the most sensible is the first option. You can already get the
text of a DDL statement into the system clipboard via the DDL Generator,
which also lets you specify the dialect and target schema name. And pasting
XML is not all that appealing of an idea.
+
+The same ideas can be applied to the other object types.
+
+== Pasting into another SQL Power Swing app ==
=== MatchMaker ===
-=== Wabit ===
\ No newline at end of file
+=== Wabit ===
+
+
+= Supporting changes to Drag and Drop =
+
+We don't currently support the Drag and Drop COPY operation for
playpen-to-playpen column drags. They're always done as MOVE. Swing already
supports the ability to change between MOVE and COPY by holding down a
modifier key during the drag operation. We should pay attention to and
respect these flags now that we're implementing copy and paste in the
playpen.
\ No newline at end of file