- This topic has 7 replies, 3 voices, and was last updated 19 years, 1 month ago by Kapil Kapre.
-
AuthorPosts
-
idfbinsMemberI 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?
Kapil KapreMemberjfrankman,
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.
Kapil KapreMemberSorry for the ‘Delet e’ with space.. 🙂 Forum security..
idfbinsMemberThat makes sense. I will make sure I use the outline to delete things.
Annie XieMemberI 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
Kapil KapreMemberCould you provide some more information as to exactly what steps you performed so that we can replicate them our side?
Annie XieMemberI 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.
Kapil KapreMember@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.
-
AuthorPosts