- This topic has 9 replies, 3 voices, and was last updated 19 years, 1 month ago by Kapil Kapre.
-
AuthorPosts
-
glgreenMemberThis message has not been recovered.
Kapil KapreMemberThis message has not been recovered.
lujhuangMemberI have a few java packages, and I want to create their uml counterparts. When I selected a java package and tried to drag it into the class diagram pane, MyUML won’t let me. How can I create uml packages by dragging java packages? Can you help?
Kapil KapreMember@lujhuang wrote:
I have a few java packages, and I want to create their uml counterparts. When I selected a java package and tried to drag it into the class diagram pane, MyUML won’t let me. How can I create uml packages by dragging java packages? Can you help?
lujhuang ,
You need to select the java files inside the package and drag them into the Class Diagram. (You can use SHIFT to select multiple java files )
Hope this helps,
Kapil
lujhuangMember@support-kapil wrote:
You need to select the java files inside the package and drag them into the Class Diagram. (You can use SHIFT to select multiple java files )
That I did. But I want to create uml classes in a uml package (by dragging the java classes). Right now, after I created a uml package on the class diagram pane, I can’t open it (by double clicking it), and cannot move uml classes into the uml package created. Is there any reason why I cannot add a uml class to a uml package? My env. is:
windows xp pro w/ sp3
eclipse 3.1.0
myeclipse 4.0.m3 GA
sun jdk-1.5.0_5[The ideal situation is that MyUML lets me drag java packages from package explorer onto the class diagram and automatically creates the corresponding uml packages, with the uml classes in them. I understand this feature is in the works, so I am not asking it right now.]
Kapil KapreMember@lujhuang wrote:
@support-kapil wrote:
You need to select the java files inside the package and drag them into the Class Diagram. (You can use SHIFT to select multiple java files )
That I did. But I want to create uml classes in a uml package (by dragging the java classes). Right now, after I created a uml package on the class diagram pane, I can’t open it (by double clicking it), and cannot move uml classes into the uml package created. Is there any reason why I cannot add a uml class to a uml package?
When you drag and drop java files from the pkg explorer into the uml class diagram the UML components are placed in the correct package. (you can verify this by clicking on any class and checking the namespace) The packages created are *not* added to the uml class diagram but they *are* present in the UML model. You can see these in the outlie view and drag them in if you need. If you specifically need packages to be created and placed in a diagram automatically you can try using the UML Reverse Engineering wizard. (under UML menu). Does this help?
lujhuangMemberI got it a little bit now, by using the wizard. However, if there are 2 classes in 2 different java packages, e.g. net.core.Engine and net.admin.EngineManager, and EngineManager has an Engine as its property, then the wizard won’t show this association. Is this true or am I not using the wizard right? What I really like to see is the association between Engine and EngineManager is captured somehow.
Here is the playaround code:
// EngineManager class:
package net.lessons.myuml.engineadmin;
import net.lessons.myuml.engine.Engine;
public class EngineManager {
private Engine engine;
public Engine getEngine() {
return engine;
}public void setEngine(Engine engine) {
this.engine = engine;
}
}// Engine class:
package net.lessons.myuml.engine;public class Engine {
}/// note that they are in 2 different packages
Kapil KapreMember@lujhuang wrote:
I got it a little bit now, by using the wizard. However, if there are 2 classes in 2 different java packages, e.g. net.core.Engine and net.admin.EngineManager, and EngineManager has an Engine as its property, then the wizard won’t show this association. Is this true or am I not using the wizard right? What I really like to see is the association between Engine and EngineManager is captured somehow.
Here is the playaround code:
// EngineManager class:
package net.lessons.myuml.engineadmin;
import net.lessons.myuml.engine.Engine;
public class EngineManager {
private Engine engine;
public Engine getEngine() {
return engine;
}public void setEngine(Engine engine) {
this.engine = engine;
}
}// Engine class:
package net.lessons.myuml.engine;public class Engine {
}/// note that they are in 2 different packages
If you drag these two specific classes into a fresh class diagram from pkg explorer MyUML Should create the association. (Note : You need to enable Java attributes as UML Associations under UML Reveng preferences)
Can you try that?
lujhuangMember@support-kapil wrote:
If you drag these two specific classes into a fresh class diagram from pkg explorer MyUML Should create the association. (Note : You need to enable Java attributes as UML Associations under UML Reveng preferences)
Can you try that?I tried that and it worked. MyUML still has some way to go to be really useful, but keep up the good work 🙂
Kapil KapreMember@lujhuang wrote:
@support-kapil wrote:
If you drag these two specific classes into a fresh class diagram from pkg explorer MyUML Should create the association. (Note : You need to enable Java attributes as UML Associations under UML Reveng preferences)
Can you try that?I tried that and it worked. MyUML still has some way to go to be really useful, but keep up the good work 🙂
lujhuang,
Good to hear. We are totally commited to improving the quality of this tool, so you should see us polishing up this tool in the comming releasees. We love to get feedback from our users , so if there is anything that annoys you / suggestions / bugs / etc , it would be great if you could fire a quick email to support@genuitec.com or just post here in the forums.
Thanks,
-Kapil -
AuthorPosts