Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - real-time-systems

Pages: [1]
1
Hello,

the Project Browser window has the ability to move elements from one package into another package.
It would be nice, if this can be done with the Java API.
Unfortunately i can not find any method to move an element from a collection of one package into the collection of another package.

org.sparx.Package.GetElements() returns a collection (org.sparx.Collection).
The only method to extened a collection is AddNew(String name, String type).
It seems to me that i have to remove the element from the original package and must create a new element within the destination package.

Is there any other way to move elements?
Thanks a lot!

2
Hello,
if try to update a connector (org.sparx.Connector) i get the following Java exception from the API.

Quote
Exception in thread "main" java.lang.Exception: I
at org.sparx.Connector.comUpdate(Native Method)
at org.sparx.Connector.Update(Connector.java:538 )

The following sample code prints some properties of a connector and tries to update the connector.

Quote
eaConnector = rep.GetConnectorByID(1952);
System.out.println("id=" + eaConnector.GetConnectorID());
System.out.println("type=" + eaConnector.GetType());
System.out.println("subtype=" + eaConnector.GetSubtype());
System.out.println("dir=" + eaConnector.GetDirection());
System.out.println("stereotype=" + eaConnector.GetStereotype());
eaConnector.Update();

If the connector is an Association or a Generalization no exception is thrown.
But if this connector is an include or extend within a UseCase diagramm the exception is thrown!

The exception is thrown with EA 7.0 Buld 813 and Build 818.

Can anybody help me?
Is there a java API (and SSJavaCOM.dll) that works?

Pages: [1]