facebook

Can’t delete generalization

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #238757 Reply

    idfbins
    Member

    I have two classes in my class diagram where class B inherits from Class A. It turned out that I had the inheritance backwards. I wanted Class A to inherit from class B so I am trying to reverse this. I have deleted the generalization arrow from the diagram. But after deleting the generaliazation, I cannot make Class A inherit from Class B. When I drag the generalization arrow from class B to Class A nothing happens. Does anyone have any ideas?

    #238775 Reply

    Kapil Kapre
    Member

    jfrankman,
    Delet e key in the Diagram Editor is ‘Delet e From Diagram’. Open up the Outline view and hit the dropdown box and choose Package Centric. Weed out that pesky generalization and hit delet e(Since you are in Outline View and not in any ‘diagram’ as such Delet e key here means Delet e from Model). You should now be able to create that new generalization. Next time you want to ‘Delet e from Model’ you can right click that element in diagram editor and use that option.

    #238776 Reply

    Kapil Kapre
    Member

    Sorry for the ‘Delet e’ with space.. 🙂 Forum security..

    #238778 Reply

    idfbins
    Member

    That makes sense. I will make sure I use the outline to delete things.

    #238816 Reply

    Annie Xie
    Member

    I read this thread and applied your suggestion to delete an extreneous class in my model in “outline” panel under “package centric”. But after I select “delet e from model”, and answered “yes” to the warning
    message “This action will permanently delete in the model. Note: this action can not be undone”, nothing happened. Did I miss something? I really need to clean up my model quickily so I can move on. Any help would be greatky appreciated. Thanks

    #238830 Reply

    Kapil Kapre
    Member

    Could you provide some more information as to exactly what steps you performed so that we can replicate them our side?

    #238953 Reply

    Annie Xie
    Member

    I created a new class called ServiceRequest with attribute type “Document”, and the generated java code craeted Document.java automatically. Then I edited the source code file ServiceRequest.java to import
    org.w3c.dom.Document so I no longer need the generated Document.java. But it stays in the model and every tiem I regenerate the java code, it keeps this java file. There are several other classes like this one I
    can not get rid of. My generated java code is quite poluted by these unwanted classes.

    #238959 Reply

    Kapil Kapre
    Member

    @anniexie wrote:

    I created a new class called ServiceRequest with attribute type “Document”, and the generated java code craeted Document.java automatically. Then I edited the source code file ServiceRequest.java to import
    org.w3c.dom.Document so I no longer need the generated Document.java. But it stays in the model and every tiem I regenerate the java code, it keeps this java file. There are several other classes like this one I
    can not get rid of. My generated java code is quite poluted by these unwanted classes.

    Modifying the java file wont affect the UML model. You will need to make MyUML aware of your change. Simply drag and drop the java file into the class diagram that should sort things out for you.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Can’t delete generalization

You must be logged in to post in the forum log in