Home » Modeling » UML2 » how to setSource&setTarget for ControlFlow in Activity??
| |
Re: how to setSource&setTarget for ControlFlow in Activity?? [message #477086 is a reply to message #477084] |
Thu, 13 March 2008 01:22 |
xiaoqiang Messages: 20 Registered: July 2009 |
Junior Member |
|
|
James Bruck 写道:
> What's an 'ActionModel' ? is it an ActivityNode?
> If so then your code should work. What is the error you are running into?
>
> - James.
>
>
> "xiaoqiang" <jqzhao1985@gmail.com> wrote in message
> news:fr7ias$fns$1@build.eclipse.org...
>> Hi all,
>> I am creating a ControlFlow in Activity Diagram programmatically,
>> the codes are:
>> ActionModel am1=new ActionModel();
>> ActionModel am2=new ActionModel();
>> org.eclipse.uml2.uml.ControlFlow controlFlow=(ControlFlow)
>> activity.createEdge(name, UMLPackage.Literals.CONTROL_FLOW);
>> controlFlow.setSource(am1);
>> controlFlow.setTarget(am2);
>>
>> But,the code can't run successfully.I am not very familiar with the UML2
>> API,so I want the correct code.
>>
>> Thank you very much! I am appreciated your reply.
>> -xiaoqiang
>
>
Hi James,
Thank you very much for caring for my question.
Now,'ActionModel' is not an ActivityNode.
I need to set both the ControlFlow's source and target be an action,so,I
want to know the relationship between 'org.eclipse.uml2.uml.Action'
and 'org.eclipse.uml2.uml.ActivityNode'.
Thanks.
-xiaoqiang
|
|
|
Re: how to setSource&setTarget for ControlFlow in Activity?? [message #477087 is a reply to message #477086] |
Thu, 13 March 2008 01:40 |
xiaoqiang Messages: 20 Registered: July 2009 |
Junior Member |
|
|
xiaoqiang 写道:
> James Bruck 写道:
>> What's an 'ActionModel' ? is it an ActivityNode?
>> If so then your code should work. What is the error you are running into?
>>
>> - James.
>>
>>
>> "xiaoqiang" <jqzhao1985@gmail.com> wrote in message
>> news:fr7ias$fns$1@build.eclipse.org...
>>> Hi all,
>>> I am creating a ControlFlow in Activity Diagram programmatically,
>>> the codes are:
>>> ActionModel am1=new ActionModel();
>>> ActionModel am2=new ActionModel();
>>> org.eclipse.uml2.uml.ControlFlow controlFlow=(ControlFlow)
>>> activity.createEdge(name, UMLPackage.Literals.CONTROL_FLOW);
>>> controlFlow.setSource(am1);
>>> controlFlow.setTarget(am2);
>>>
>>> But,the code can't run successfully.I am not very familiar with the UML2
>>> API,so I want the correct code.
>>>
>>> Thank you very much! I am appreciated your reply.
>>> -xiaoqiang
>>
> Hi James,
> Thank you very much for caring for my question.
> Now,'ActionModel' is not an ActivityNode.
> I need to set both the ControlFlow's source and target be an action,so,I
> want to know the relationship between 'org.eclipse.uml2.uml.Action'
> and 'org.eclipse.uml2.uml.ActivityNode'.
> Thanks.
> -xiaoqiang
Hi James,
I have solved this problem by getNode(String name).
I am extremely grateful to you.Thanks to eclipse newsgroup.
Cheers.
-xiaoqiang
|
|
| |
Re: how to setSource&setTarget for ControlFlow in Activity?? [message #626214 is a reply to message #477084] |
Thu, 13 March 2008 01:22 |
xiaoqiang Messages: 20 Registered: July 2009 |
Junior Member |
|
|
James Bruck 写道:
> What's an 'ActionModel' ? is it an ActivityNode?
> If so then your code should work. What is the error you are running into?
>
> - James.
>
>
> "xiaoqiang" <jqzhao1985@gmail.com> wrote in message
> news:fr7ias$fns$1@build.eclipse.org...
>> Hi all,
>> I am creating a ControlFlow in Activity Diagram programmatically,
>> the codes are:
>> ActionModel am1=new ActionModel();
>> ActionModel am2=new ActionModel();
>> org.eclipse.uml2.uml.ControlFlow controlFlow=(ControlFlow)
>> activity.createEdge(name, UMLPackage.Literals.CONTROL_FLOW);
>> controlFlow.setSource(am1);
>> controlFlow.setTarget(am2);
>>
>> But,the code can't run successfully.I am not very familiar with the UML2
>> API,so I want the correct code.
>>
>> Thank you very much! I am appreciated your reply.
>> -xiaoqiang
>
>
Hi James,
Thank you very much for caring for my question.
Now,'ActionModel' is not an ActivityNode.
I need to set both the ControlFlow's source and target be an action,so,I
want to know the relationship between 'org.eclipse.uml2.uml.Action'
and 'org.eclipse.uml2.uml.ActivityNode'.
Thanks.
-xiaoqiang
|
|
|
Re: how to setSource&setTarget for ControlFlow in Activity?? [message #626216 is a reply to message #477086] |
Thu, 13 March 2008 01:40 |
xiaoqiang Messages: 20 Registered: July 2009 |
Junior Member |
|
|
xiaoqiang 写道:
> James Bruck 写道:
>> What's an 'ActionModel' ? is it an ActivityNode?
>> If so then your code should work. What is the error you are running into?
>>
>> - James.
>>
>>
>> "xiaoqiang" <jqzhao1985@gmail.com> wrote in message
>> news:fr7ias$fns$1@build.eclipse.org...
>>> Hi all,
>>> I am creating a ControlFlow in Activity Diagram programmatically,
>>> the codes are:
>>> ActionModel am1=new ActionModel();
>>> ActionModel am2=new ActionModel();
>>> org.eclipse.uml2.uml.ControlFlow controlFlow=(ControlFlow)
>>> activity.createEdge(name, UMLPackage.Literals.CONTROL_FLOW);
>>> controlFlow.setSource(am1);
>>> controlFlow.setTarget(am2);
>>>
>>> But,the code can't run successfully.I am not very familiar with the UML2
>>> API,so I want the correct code.
>>>
>>> Thank you very much! I am appreciated your reply.
>>> -xiaoqiang
>>
> Hi James,
> Thank you very much for caring for my question.
> Now,'ActionModel' is not an ActivityNode.
> I need to set both the ControlFlow's source and target be an action,so,I
> want to know the relationship between 'org.eclipse.uml2.uml.Action'
> and 'org.eclipse.uml2.uml.ActivityNode'.
> Thanks.
> -xiaoqiang
Hi James,
I have solved this problem by getNode(String name).
I am extremely grateful to you.Thanks to eclipse newsgroup.
Cheers.
-xiaoqiang
|
|
|
Goto Forum:
Current Time: Thu Apr 18 02:32:45 GMT 2024
Powered by FUDForum. Page generated in 0.01886 seconds
|