create package in a eclipse plugin [message #476646] |
Mon, 19 November 2007 11:09  |
Eclipse User |
|
|
|
Hi,
I'm writing a eclipse plugin,which will create some uml models by using
UML2.
I wrote following code in the plugin and call it
public void run(IAction action)
{
...
// create uml package
org.eclipse.uml2.uml.Package
paket=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createPackag e();
paket.setName("package");
// export uml model
...
}
The plugin returned without giving any answers or error message to me. So
I set one breakpoints on each line and step into. On the first line, in
which the package should be created, it went to the EventTable and sent
some event to Workbench. Then it went to an exception in the runEventLoop
: "java.lang.NoClassDefFoundError: org/eclipse/uml2/uml/UMLFactory". I
step out and resumed. It stopped on the first line and returned.
The code works very well when I put them in a single main method.
Is there something I've missed? I am new to Plugin.
|
|
|
|
|
Re: create package in an eclipse plugin [message #476664 is a reply to message #476656] |
Thu, 22 November 2007 09:12  |
Eclipse User |
|
|
|
The problem has been solved. I used the old path of referenced packages
Zengyu Lu wrote:
> Yes, I did. The plugin kann be compiled and started.
>
>
> ElenaA wrote:
>
>> a stupid question: have you added org.eclipse.uml2.uml plugin you your
>> plugin dependencies?
>
>> "Zengyu Lu" <sizeluuu@gmail.com> wrote in message
>> news:f8844a45166073120450513bd1cd10b2$1@www.eclipse.org...
>>> Hi,
>>>
>>> I'm writing an eclipse plugin,which will create some uml models by
>>> using UML2.
>>>
>>> I wrote following code in the plugin and call it
>>>
>>> public void run(IAction action)
>>> {
>>> ..
>>> // create uml package
>>>
>>> org.eclipse.uml2.uml.Package
>>> paket=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createPackag e();
>>> paket.setName("package");
>>>
>>> // export uml model
>>> ..
>>> }
>>>
>>> The plugin returned without giving any answers or error message to
>>> me. So I set one breakpoints on each line and step into. On the first
>>> line, in which the package should be created, it went to the
>>> EventTable and sent some event to Workbench. Then it went to an
>>> exception in the runEventLoop : "java.lang.NoClassDefFoundError:
>>> org/eclipse/uml2/uml/UMLFactory". I step out and resumed. It stopped
>>> on the first line and returned.
>>>
>>> The code works very well when I put them in a single main method.
>>>
>>> Is there something I've missed? I am new to Plugin.
>>>
>>>
>
>
|
|
|
Re: create package in a eclipse plugin [message #625554 is a reply to message #476646] |
Wed, 21 November 2007 06:31  |
Eclipse User |
|
|
|
Originally posted by: Elena.Alekseeva.borland.com
a stupid question: have you added org.eclipse.uml2.uml plugin you your
plugin dependencies?
"Zengyu Lu" <sizeluuu@gmail.com> wrote in message
news:f8844a45166073120450513bd1cd10b2$1@www.eclipse.org...
> Hi,
>
> I'm writing a eclipse plugin,which will create some uml models by using
> UML2.
>
> I wrote following code in the plugin and call it
>
> public void run(IAction action)
> {
> ..
> // create uml package
>
> org.eclipse.uml2.uml.Package
> paket=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createPackag e();
> paket.setName("package");
>
> // export uml model
> ..
> }
>
> The plugin returned without giving any answers or error message to me. So
> I set one breakpoints on each line and step into. On the first line, in
> which the package should be created, it went to the EventTable and sent
> some event to Workbench. Then it went to an exception in the runEventLoop
> : "java.lang.NoClassDefFoundError: org/eclipse/uml2/uml/UMLFactory". I
> step out and resumed. It stopped on the first line and returned.
>
> The code works very well when I put them in a single main method.
>
> Is there something I've missed? I am new to Plugin.
>
>
|
|
|
Re: create package in an eclipse plugin [message #625556 is a reply to message #476654] |
Wed, 21 November 2007 12:59  |
Eclipse User |
|
|
|
Yes, I did. The plugin kann be compiled and started.
ElenaA wrote:
> a stupid question: have you added org.eclipse.uml2.uml plugin you your
> plugin dependencies?
> "Zengyu Lu" <sizeluuu@gmail.com> wrote in message
> news:f8844a45166073120450513bd1cd10b2$1@www.eclipse.org...
>> Hi,
>>
>> I'm writing an eclipse plugin,which will create some uml models by using
>> UML2.
>>
>> I wrote following code in the plugin and call it
>>
>> public void run(IAction action)
>> {
>> ..
>> // create uml package
>>
>> org.eclipse.uml2.uml.Package
>> paket=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createPackag e();
>> paket.setName("package");
>>
>> // export uml model
>> ..
>> }
>>
>> The plugin returned without giving any answers or error message to me. So
>> I set one breakpoints on each line and step into. On the first line, in
>> which the package should be created, it went to the EventTable and sent
>> some event to Workbench. Then it went to an exception in the runEventLoop
>> : "java.lang.NoClassDefFoundError: org/eclipse/uml2/uml/UMLFactory". I
>> step out and resumed. It stopped on the first line and returned.
>>
>> The code works very well when I put them in a single main method.
>>
>> Is there something I've missed? I am new to Plugin.
>>
>>
|
|
|
Re: create package in an eclipse plugin [message #625564 is a reply to message #476656] |
Thu, 22 November 2007 09:12  |
Eclipse User |
|
|
|
The problem has been solved. I used the old path of referenced packages
Zengyu Lu wrote:
> Yes, I did. The plugin kann be compiled and started.
>
>
> ElenaA wrote:
>
>> a stupid question: have you added org.eclipse.uml2.uml plugin you your
>> plugin dependencies?
>
>> "Zengyu Lu" <sizeluuu@gmail.com> wrote in message
>> news:f8844a45166073120450513bd1cd10b2$1@www.eclipse.org...
>>> Hi,
>>>
>>> I'm writing an eclipse plugin,which will create some uml models by
>>> using UML2.
>>>
>>> I wrote following code in the plugin and call it
>>>
>>> public void run(IAction action)
>>> {
>>> ..
>>> // create uml package
>>>
>>> org.eclipse.uml2.uml.Package
>>> paket=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createPackag e();
>>> paket.setName("package");
>>>
>>> // export uml model
>>> ..
>>> }
>>>
>>> The plugin returned without giving any answers or error message to
>>> me. So I set one breakpoints on each line and step into. On the first
>>> line, in which the package should be created, it went to the
>>> EventTable and sent some event to Workbench. Then it went to an
>>> exception in the runEventLoop : "java.lang.NoClassDefFoundError:
>>> org/eclipse/uml2/uml/UMLFactory". I step out and resumed. It stopped
>>> on the first line and returned.
>>>
>>> The code works very well when I put them in a single main method.
>>>
>>> Is there something I've missed? I am new to Plugin.
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03531 seconds