Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Eclipse Integration (loosing classes!)

2 views
Skip to first unread message

Dave Couture

unread,
Feb 22, 2007, 11:33:08 AM2/22/07
to
Hi,

I'm currenctly building a Eclipse extension who initialize diagrams based on
their stereotype. I'm testing my extension using the "Run As -> Eclipse
Application". When a made a test, I add classes into a diagram, I close
Eclipse, and when I open it again, the classes were gone! I'm not loosing
anything else except classes... Here is the way I add classes into my
diagram.

this._diagramme = diagramme;
this._paquetage = (Package)this._diagramme.getOwner();
this._classesFactory =
ClassesFactory.REGISTRY.getFactory(this._paquetage.getIProject(),
this._paquetage.getSession());
@SuppressWarnings("unchecked") public void ajouterClass(String nom, String
stereotype) {


Class classe = this._classesFactory.createClass();
classe.setName((nom.equalsIgnoreCase(DecorateurElement.P_NOM_PARENT) ?
this._paquetage.getName() : nom));
classe.setPropertyValue("stereotype", stereotype);
this._paquetage.getOwnedMembers().add(classe);

}


Could someone help?

Regards,

Dave


ElenaA

unread,
Feb 23, 2007, 2:31:09 AM2/23/07
to
I don't have such problems executing similar code - classes don't disappaer
after closing Eclipse.
Do classes disappear from the model, or just from the diagram? In the latter
case, from what diagram? What do you mean saying that you add classes to
diagram - I can see that you add them to a package only...
One more question: are you adding classes to design UML20 project, or java
one? Note that it's not currently possible to create source code elements
(like java classes) via open Api, so youe code will create design classes in
java projewct


"Dave Couture" <dave_c...@dmr.ca> wrote in message
news:45dd...@newsgroups.borland.com...

Dave Couture

unread,
Feb 26, 2007, 10:53:17 PM2/26/07
to
Hi,

I'm adding class to a UML20 project. Yes, i'm also adding classes to package
but since a package is linked to a class diagram, adding classes to the
package make them appear on the diagram. I got the problem in those
conditions:
- I'm testing my plugin (it is not deployed);
- My projet open on a class diagram;
- I'm adding classes on the opened diagram; and
- I'm closing Together without leaving the package.

I'll tried in deployed mode.

Regards,

Dave


"ElenaA" <Elena.A...@borland.com> a écrit dans le message de news:
45de9811$1...@newsgroups.borland.com...

0 new messages