Author Topic: Where can I find Java API or Java code example?  (Read 4052 times)

P

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Where can I find Java API or Java code example?
« on: June 10, 2009, 08:35:49 pm »
Hi everybody!

I'm using Eclipse and Enterprise Architect 7.1 library (eaapi.jar). I must use the Java api to update the EA model, such as create a new class diagram, add a new class, attributes and so on.
All samples that I find are in Visual Basic 6.0 or C#...nothing java samples!!
Please help me! I would need at least a full documentation about the API of this library!

Thanks very much!

Guido Spadotto

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #1 on: June 10, 2009, 09:11:05 pm »
You can find some basic installation instructions here:
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/setup.html

I've not been able to find "real" Java examples, but if you look at
http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/codeexamples.html and keep in mind that for any Object.attribute in VB there should be the corresponding getters and setters in Java, you should be able to start.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #2 on: June 11, 2009, 08:47:20 am »
You'll find a Java sample in your EA install directory (at least with EA 7.5).

The documentation for the interface is available at http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/theautomationinterface.html

As you've said, use getters and setters for the attributes though.  (Same as you would need to do for C++.)

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #3 on: June 11, 2009, 09:17:09 am »
Hi P,

As Simon mentioned, there is a Java sample shipped with version 7.5 If you don't have version 7.5 or don't plan to upgrade, please feel free to send an email to [email protected] marked for my attention and we'll send a copy back to you in reply.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

P

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #4 on: June 11, 2009, 11:59:07 am »
Thank you very much for all support. I will sent mail to request for Java API and sample code.  :D

P

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #5 on: June 12, 2009, 03:03:21 pm »
I have sent mail to [email protected]. But nothing happen. I haven't got any response back. It's very hard for me to coding without API. Even I can learn from VB example, but there are many thing I have to guess. I have to doubt that what's this parameter used for from example.

For example,

t = method.Parameters.AddNew("TestParam","string")

I don't know that what the second parameter ("string") is used for.  :(

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #6 on: June 12, 2009, 03:19:01 pm »
I sent a reply to your email at about midday yesterday. Try checking your spam filters etc to see if it hasn't got caught up there.
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

P

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Where can I find Java API or Java code example
« Reply #7 on: June 13, 2009, 05:23:44 am »
Hi,

Sorry, Michael. No any mails from sparxsystems (even in Spam folder). You might send to the wrong email. My email is [email protected]. Could you please try again?

Thank you,
P.