• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Visual Studio Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Download
 
 
Support
 
 
Community
 
 
Forums
 
 
 
Visual Studio Developer Center > Visual Studio Forums > Visual Studio Extensibility > Deleting a reference from a CompartmentShape?
Ask a questionAsk a question
Search Forums:
  • Search Visual Studio Extensibility Forum Search Visual Studio Extensibility Forum
  • Search All Visual Studio Forums Search All Visual Studio Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerDeleting a reference from a CompartmentShape?

  • Thursday, August 21, 2008 9:55 AMSmorgoOfFJS Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    It's day 2 of my effort to create a DSL. Day 1 went pretty well, just a few issues to deal with.

    I could do with some help with this one, though.

    I have

    ClassA references ClassB (a many-to-many relationship)

    ClassA is represented by a Compartment Shape, ClassAShape

    ClassB is represented as a Compartment Item in ClassAShape, but also has it's own ClassBShape directly on the model surface

    I establish the relationship by connecting ClassAShape to ClassBShape. I don't have (or want) a physical connector on the design surface between the two shapes. Instead, my ClassB appears in the relevant compartment in ClassAShape.

    So far, so good.

    Now, if I right-click and Delete the Compartment Item for ClassB from the ClassAShape, it deletes ClassB from the model completely. What I want, is for it to simply remove the relationship.

    Any advice?

    Regards,
    Steve

    •  
    • ReplyReply
    • QuoteQuote
     

Answers

  • Saturday, August 30, 2008 4:37 AMJean-Marc PrieurMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0
    Steve.

    I wrote a post on my blog explaining why the behavior is this one (thanks for letting me discover it), and how you can solve your problem specifying your intent (compartment items represent links, and not ClassBs)
    Jean-Marc
    • Marked As Answer byJean-Marc PrieurMSFT, ModeratorSaturday, August 30, 2008 4:37 AM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Friday, August 29, 2008 11:56 AMJean-Marc PrieurMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Hello Steve

    I have reproduced your problem, and will try to help you. Im currently working on it. Indeed, I'm wondering if we should remove the related ClassB since, after all, this is a reference relationship and not an embedding. I'll try to provide you with an answer quickly.


    I have, however a question (by curiosity). How do you add a classB compartment item classA representing Compartment shape, if you do not have connectors between your Compartment ClassAShape and your ClassBShapes?
    Jean-Marc
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement