Book a Demo

Author Topic: EA and Eclipse integration: some hints  (Read 2530 times)

astradss

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
EA and Eclipse integration: some hints
« on: August 14, 2009, 07:04:27 am »
This explains (maybe this has common interest, so therefore I started this thread):
1. How to add EA integration into multiple Eclipse instances
2. How to solve path issues in model if the Eclipse workspace is changed

I have been using EA and Eclipse together in a dual screen setup. EA on one screen and Eclipse on the other. No matter if I change the model or the code, the other is updated in realtime. Very nice.

But I run many different versions of Eclipse for various reason. The MDG Eclipse integration installer only supports one install to a specific Eclipse directory, and if you try to run the installer again you are forced to remove the integration before a new Eclipse version can be installed to.

I needed in the first place to have the integration working with a Eclipse PHP version and 3 different Java versions. I had an old Eclipse for mobile development and would like to try if the integration was working with the lastest Eclipse Pulsar Galileo version. So I had to install the integration manually. I did following:
a. copy all "org.sparx.*" files from the Eclipse plugin directory where you originally installed the MDG Eclipse integration, to the new Eclipse plugin directory.
b. copy the "manifests" directory from the original Eclipse directory (placed in "eclipse\configuration\org.eclipse.osgi") to the new Eclipse directory in the same relative path.
c. start the new Eclipse and a new menu called "Enterprise Architect" is available etc.

I have just tried this with the new "Pulsar for Mobile Java Developers" (Galileo) and it seems to be working without problems. Still more testing is needed, but real-time code/model update is working and I can jump from model to code without problem.

The next problem I encountered was that with the new Eclipse installation (Pulsar) I also used a new working directory for various reasons. So when I started EA and Eclipse I could jump from the model to code, but the model was initially not updated when I change the code and the other way around. I then re-imported the code from the new workspace directory, without deleting the old classes in the model. The net result was two of each class in the model and I could create a class diagram with two classes (not instances) from the same package and with the same name. No matter which of the two classes I selected, a "view source" or F12 jump to the right code in the correctly new workspace (so both classes jump to the code in the same workspace). But when I change the code only one of the classes was updated with the new code and also if I changed the model only one of the classes resulted in changes in the code. This was solved by doing following:
a. my model is in an eap file which is version controlled. I reverted to the latest version in the trunk (which is the last checked in model from the old workspace).
b. I went into the menu "settings/local paths" and defined a new local path ID with the absolute path set to the old workspace.
c. in the same menu, after the local path was defined, I applied that path (all absolute paths in the model was now replaced with the local path ID).
d. I then changed the local path ID to be associated with the absolute path to the new workspace directory and saved that (I did not use the apply button in this case).
e. after this the code sync in both direction was working with real-time update again.

Why is this important? If a user checks out the model from subversion to another absolute workspace directory, the path is updated in the local path menu (again no "apply" or "Expand Path", just save the new path after changing it.

I hope this information can help other people with similar problems.

I found some problems with the EA/Eclipse integration that could result in improvements I and will document those in the feature request part of the forum. The basic problem is that EA link to Eclipse via a global setting and not per project and per package, which means that you have to have one single Eclipse installation active at the time, but you can switch globally.

br,
astradss

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: EA and Eclipse integration: some hints
« Reply #1 on: August 14, 2009, 09:04:08 pm »
Well done!

Well written!

Thank you.
No, you can't have it!