Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » create package in a eclipse plugin
create package in a eclipse plugin [message #476646] Mon, 19 November 2007 16:09 Go to next message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
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 a eclipse plugin [message #476654 is a reply to message #476646] Wed, 21 November 2007 11:31 Go to previous messageGo to next message
Eclipse UserFriend
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 #476656 is a reply to message #476654] Wed, 21 November 2007 17:59 Go to previous messageGo to next message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
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 #476664 is a reply to message #476656] Thu, 22 November 2007 14:12 Go to previous message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
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 11:31 Go to previous message
Eclipse UserFriend
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 17:59 Go to previous message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
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 14:12 Go to previous message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
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.
>>>
>>>
>
>
Previous Topic:Re: Ecore2UMLProfile
Next Topic:Stereotype property typed with other stereotype
Goto Forum:
  


Current Time: Fri Apr 26 19:01:33 GMT 2024

Powered by FUDForum. Page generated in 0.03823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top