Paste context menu is always disabled RRS feed

  • Question

  • I have upgraded my 2008 DSL to 2010 and cannot get the Paste menu option to be work.

    I have enabled the copy and paste functionality on the upgraded DSL and can happily Cut/Copy items from the diagram, running in the experimental hive. However, when I try to paste the items (onto the same diagram), the paste menu item never gets enabled.

    Debugging the code seems to show that my Model domain class (ExampleModel in the post above) is being put onto the clipboard as a root element and not the actual element (ExampleElement).

    My DSL is based on the Nested Shapes blog post (http://blogs.msdn.com/jmprieur/archive/2008/09/03/dsl-tools-support-of-nested-shapes-in-visual-studio-2008-sp1.aspx) and I wonder if this could be causing the problem?

    Has anyone else come across this? Do I need to re-model my diagram to use a new technique for nested shapes? Or can I not see the wood for the trees?




    Wednesday, May 12, 2010 1:39 PM


All replies

  • Hello Ged.

    1/ Did you change the copy closure to what you need using the copy closure properties on the roles? (see http://blogs.msdn.com/jmprieur/archive/2009/07/22/copy-cut-paste-of-model-elements.aspx)

    2/ Did you select the right target when attempting to paste?


    Best regards

    Sunday, May 16, 2010 9:29 PM
  • Hi Ged,

    Can you please provide more details for JM to help resolve your question? Thanks!

    Esther Fan | User Education | If a post answers your question, please click "Mark As Answer" for that post. Thanks!
    Thursday, May 20, 2010 8:40 PM
  • I too get this problem. I migrated a 2008 DSL to 2010 and enabled the CopyPaste function on the editor. I've also set the propagate copy values, but cannot get the right-click paste menu item to work - it's always disabled.

    What am I missing?

    Thursday, May 27, 2010 4:30 AM
  • OK... admittedly I'm the problem. (aka... is a PEBKAC - Problem Exists Between Keyboard and Chair)

    It all depends on what the setting is for copy propagation and also on which side of the association you are setting it. I found that if I do not copy for the relation from the model to the element, but to copy both the link and target of the element, I can then copy the element and paste the element to the model.

    It could vary since your domain model will be different to mine.

    Thursday, May 27, 2010 7:09 AM